Re: function to get mac address in kernel

From: raghu arni (arni@caip.rutgers.edu)
Date: Fri May 25 2001 - 09:27:44 EST


you can get the list of addresses the system "knows" from /proc/net/arp.

If you do not find it then ping the machine which will add an entry to the
arp table and then re-read /proc/net/arp.

This is kind of cleaner because even if the method names change your code
need not change..

hth,
A

> Hi all,
>
> Is there a function in the kernel which will return the mac address when
> passed an IP address of a ethernet device ?
>
> I didnt understand what arp_bind_neighbour does.
>
> Regards,
> Amit
> --
> ^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
> Amit Kucheria
> EECS Grad. Research Assistant
> Team Niehaus || Room # 245E
> University of Kansas @ Lawrence
> (R)+1-(785)-830 8521 ||| (O)+1-(785)-864 7774
> ____________________________________________________
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
>

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org



This archive was generated by hypermail 2b29 : Thu May 31 2001 - 21:00:57 EST