Hello Simon

I have reduced the function call as lldp_raw(struct netif *netif);

Since the packet needs to be constructed based on options, the functions
called by lldp_raw would be static. After constructing the packet lldp_raw
callsnetif->linkoutput(netif, p); The pbuf p is allocated in the function
lldp_raw.

Regards
Amit

On Wed, Aug 17, 2016 at 9:15 AM, Amit Ashara <ashara.a...@gmail.com> wrote:

> Hello Simon
>
> I can make the change for lldp_raw to be netif compliant and using
> internal functions in the lldp.c to construct the packet.
>
> Will it be OK in that case (along with the single port requirement)
>
> Regards
> Amit
>
> On Wed, Aug 17, 2016 at 9:12 AM, Simon Goldschmidt <goldsi...@gmx.de>
> wrote:
>
>> Amit Ashara wrote:
>> > I call the LLDP transmit function lldp_raw(struct netif *netif, const
>> struct eth_addr *ethsrc_addr)
>> > with the MAC address of the port. So if there are multiple ports each
>> with its MAC address, then
>> > that can be resolved by the 2nd argument of the function.
>>
>> That's not netif-portable. A netif driver has to implement
>> netif_linkoutput_fn(struct netif *netif, struct pbuf *p)
>> and there's no source MAC address passed. You can check the pbuf of
>> course, but that's not acceptable
>> for all TX packets.
>>
>> > Also if we put the use restriction of a single port, wouldn't that work
>> also?
>>
>> You can do that but you would limit the use of such a protocol
>> implementation.
>>
>> Simon
>>
>> _______________________________________________
>> 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

Reply via email to