Hello Sergio LLDP is a multicast information only packet. It has the be sent at fixed time intervals. The second approach to have a separate driver and calling it in a timer function seems to be the approach. Again the receive packet is easy to process. The transmit needs to be thought and inserted . Let me run some experiments and run into issues rather than sending emails on phantom issues.
Regards Amit Ashara On Aug 4, 2016, at 9:31 AM, Sergio R. Caprile <scapr...@gmail.com> wrote: >> psNetif->linkoutput = tivaif_transmit; > >> If i check the tivaif_transmit function, "tivaif_transmit(struct >> netif *psNetif, struct pbuf *p)" it maps the pbuf to the MAC >> controller for transmission. It is this buffer that needs to be >> modified for LLDP frame. > > Not exactly. You need to allocate a pbuf, fill it with your data, give > it to tivaif_transmit(), and free it when it is done. Unless there is > some retransmission mechanism inside LLDP (which I don't know), then it > is done when the controller has it in its memory. Unless it is a > zero-copy driver (looks so, DMA perhaps?), in which "the controller > memory and the pbuf memory is the same space", so you need to know when > it has been transmitted to free it. I have no expertise in this area, > but there is this: > http://lwip.wikia.com/wiki/Writing_a_device_driver#Notes_on_Zero-Copy_Network_interface_drivers > >> However the call stack is always from TCP or DHCP (even when ARP is >> called which is a link layer packet). > > That is because you said you just needed the output phase ;^) > The stack is answering because it is receiving the datagrams. > Now you need to check your input to see why. You can go two paths, and I > suggest you take both, not necessarily in this order. > > (1) Go back to my first mail, where I've shown you code that explains this > > (2) Read this: > http://lwip.wikia.com/wiki/Writing_a_device_driver > > ARP is link layer but is part of the IP suite, so the stack supports ARP > and the link level driver has been configured to deliver ARP to lwIP > input function. > > > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users