Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2007 12:43:57 +1000
From:      Alan Garfield <alan@fromorbit.com>
To:        freebsd-net@freebsd.org
Subject:   Re: rtentry and rtrequest
Message-ID:  <1176950637.4175.59.camel@hiro.auspc.com.au>

next in thread | raw e-mail | index | archive | help
On Wed, 2007-04-18 at 19:56 +0100, Bruce M. Simpson wrote:

> The ARP code is pretty well documented in TCP/IP Illustrated Volume 2 
> and hasn't really significantly changed. Whilst I personally dislike how 
> reentry happens in some of the paths, it works. 

Might have to this book to my collection. The information available on
the net isn't all that conclusive (when is it ever :).

> In BSD, ARP lives in the 
> routing table, which can be confusing to newcomers; such entries have 
> the RTF_LLINFO flag set.

You're telling me about confusing to newcomers! :)


>  From the sounds of it, if you are having to fake MAC addresses, you 
> would be better off just enabling static mode ARP on the interface, 
> possibly also enabling IFF_SMART ('manages own routes') on your 
> interface and explicitly purging and re-adding your ARP entries from 
> within your driver rather than trying to hack the rtrequest code to 
> munge things on the fly. arp_rtrequest() is driver-independent code and 
> will get hooked up to your code anyway when the net/ framework notices 
> that your driver is one of IFT_ETHER.

This sounds like the right way. I think static ARP and IFF_SMART would
fix my little issue. Are there any examples of using IFF_SMART in the
kernel code base?

Thanks,
Alan.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1176950637.4175.59.camel>