Isnt it ARP ? i am providing an IP address as input and expect a MAC address as output. I went through the code in the kernel for ARP but i cant put my finger on a fn that would provide this functionality to other routines. arp_req_get() kind of does it but is defined as static in arp.c I dont want to redo the whole thing. Regards, Amit On Tue, 5 Jun 2001, Brad Bonkoski wrote: > Isn't this the same as RARP? Or Reverse ARP? > That code is in the kernel. > -Brad > > > -----Original Message----- > > From: Amit Kucheria [mailto:amitk@ittc.ukans.edu] > > Sent: Tuesday, June 05, 2001 10:48 AM > > To: linux-net@vger.kernel.org > > Subject: mac address lookup > > > > > > Hi all, > > > > I need a function in the ARP/ethernet code which gives me the > > mac address > > of a machine given its IP address. Is there any such function in the > > kernel ? > > > > The reason i need the function is because my device is not > > accessing the > > neighbour tables directly. I tried tracing the 'ioctl' > > suggestion below, > > but it wont work for me. > > > > Regards, > > Amit > > > > On Mon, 28 May 2001, Sarada Seshadri wrote: > > > > > > > > > What is the way to read the /proc filesystem from the kernel ? > > > > > > > > I cannot "ping" the machine since i am writing this code > > in the kernel. It > > > > should just look for the mac address of an ethernet > > device and return it. > > > > > > A user space program could get this info by an `ioctl > > (SIOCGIFHWADDR).' If > > > you look at the corresponding kernel code you could find a clue. > > > > > > -Sarada > > > > -- > > ^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^ > > 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 > > > -- ^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^ 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