Re: rtentry and rtrequest



Alan Garfield wrote:
Hi all!

One word.... HOW! :)

I've no clue what this FreeBSD ARP stuff is all about, there is little
or no documentation, there are 14 different sock_addr's which seem to
have a bazillion different fields, and I cannot output a simple debug
statement without getting 'error: dereferencing pointer to incomplete
type' errors!

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. In BSD, ARP lives in the routing table, which can be confusing to newcomers; such entries have the RTF_LLINFO flag set.

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.

Regards,
BMS
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [PATCH][5/5] RapidIO support: net driver over messaging
    ... It's nothing like Ethernet, the only relation is that an Ethernet network ... It gives easy access to RIO messaging from userspace ... ARP works by the driver emulating a broadcast over RIO by sending the ...
    (Linux-Kernel)
  • em driver woes
    ... I first installed the 6.0-RELEASE using FTP install and everything was ... I then CVSUP'd to RELENG_6 which had an em driver update a few ... Did the world and kernel and booted, on the boot with the new kernel I ... Output of 'arp -an' showed that the gateway ARP was indeed in the arp ...
    (freebsd-net)
  • Fw: em devices not sending proper arp packets ...
    ... I forgot to add this isn't specific to the em driver, ... My work around is to set the arp cache timeout on our ... The bug you're seeing may be unrelated to the bug I was seeing, ... To unsubscribe, ...
    (freebsd-stable)
  • Re: rtentry and rtrequest
    ... would be better off just enabling static mode ARP on the interface, ... interface and explicitly purging and re-adding your ARP entries from ... that your driver is one of IFT_ETHER. ...
    (freebsd-net)
  • Re: Real-Time UDP non-blocking sockets in Linux
    ... If the driver notices that the card does not have a full DMA queue - ... that the ARP request would be generated, and _that_ would be sent to ... code that compiles under more than one compiler ...
    (comp.os.linux.networking)