lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] [lwip] arp_query() and network drivers design


From: leon . woestenberg
Subject: [lwip-users] [lwip] arp_query() and network drivers design
Date: Wed, 08 Jan 2003 22:45:21 -0000

Hello all,

considering ARP and network device drivers.

arp_query() is not implemented yet, but it design in arp.c is currently as
follows:

* arp_query() calls netif->output()
* netif->output() calls arp_lookup()

if the lookup fails

* netif->output() calls arp_query()

and we have ourselves a circle. (possibly the
reason arp_query() hasn't been implemented yet).

The current network driver API design has this assumption:

netif->output() expects an IP packet and the network driver
is responsible for obtaining the hardware address (by calling
ARP).

So, netif->output() is not re-usable for sending packets other
than IP. (This includes ARP).

The simplest solution would be to have two netif->output()
functions,
1) netif->output_ip() which is the current netif->output()
1) netif->output_link() which is the low level output function
of the network device driver.

ARP would then use the netif->output_link() function.

Or, similar, have an extra argument to netif->output()
that tells the device which link level the packet is on.

I would like to hear your comments on this. To comply
with DHCP specs, I need to ARP query the given
address.

Leon Woestenberg

note: in my own IP stack, the ARP lookup is done in the
IP layer. This is not better than lwIP does things, but by
accident it prevents the netif->output() circular dependency.


[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]