Reversed MAC lookup inside FreeBSD kernel?

Khoa A. To takhoa at rice.edu
Fri Aug 29 09:17:23 PDT 2003


Hi,

I'm new to kernel code, and don't understand the structure of ARP table very
well.  Could someone please point me to the right direction for the
following problem I have:

I need to get a translation of MAC addresses to IP addresses in the kernel.
I saw some postings about how to translate MAC to IP in the user level, but
they seem to require the host to send a packet to that MAC address and some
other ways that also require the host to actually send some request packets
out.  All my MAC-IP addresses are already set statically using "arp -s" in
the ARP table.  When I'm in the kernel, how do I get a hold of the ARP table
and do some kind of reversed search to get the IP address out?

Thank you very much,
Khoa.



More information about the freebsd-net mailing list