Issues with using ioctl and SIOCGARP to get ARP entry on Linux Kernal
Hi ,
I am using Linux 2.6 Fedora 12.
I am using ioctl(s,SIOCGARP,&areq,sizeof(struct arpreq) ) command to query the kernel to get the mac address for a given IP address.
What I have seen is whenever I query the kernel to get the MAC I do get the MAC but for some reason after the ARP age out I don't see the arp entry again back when I get the new packet. If I commented out the IOCTL code after ARP age-out when next packet comes from the SRC IP Kernel do add it back to the ARP table.
Does anybody has seen this issue ?
Any help is appreciated.
-Thanks
|