Re: function to get mac address in kernel

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

 



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
> ____________________________________________________
>
>
> -
> : send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
>

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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux