This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I have a Tiva-C 1294 LaunchPad. Now I am familiarizing the lwIP project. It is found that the Ethernet relevant initial functions are included in file:
“<TivaWare_Directory>/third_party/lwip-1.4.1/ports/tiva-tm4c129/netif/tiva-tm4c129.c"
But I don't find where and how this file is used in lwIP after looking through the example project: 'enet_lwip'
Could you give me some help on this?
Thanks,
Hi,
First you should read at least the file carefully - for example this snippet:
/**
* This function should do the actual transmission of the packet. The packet is
* contained in the pbuf that is passed to the function. This pbuf might be
* chained.
*
* @param psNetif the lwip network interface structure for this ethernetif
* @param p the MAC packet to send (e.g. IP packet including MAC addresses and type)
* @return ERR_OK if the packet coui32d be sent
* an err_t value if the packet coui32dn't be sent
*/
static err_t
tivaif_transmit(struct netif *psNetif, struct pbuf *p)
{
....
This one is declared static... which it means it is locally used by other function and you will not see directly where was used unless you examine the code.
Second, take care there are also ..../ports/include/netif/tivaif.h file which exposes the functions externally called by application to accomplish the wanted tasks.
Please consider for such cases to search yourself the code - usually use a good tool for that, such as Total Commander, not windows tools which are designed for childs, not for programmers. TC has the possibility to search a string (for example a function name) only in a folder like /lwip-1.4.1 and to show you all instances of that string, and you may examine the files one by one to see where that function is used. So you can see by yourself ...
Some other brands may have implemented some help tools to show you the hierarchy of the functions called, but only after compilation, but such tools may cost some extra money...