How to get hardware address of a machine using ARP/Sysctl/Routing sockets??

2002-10-09 Thread yatin chalke
Hi, I want to get hardware address of any machine on a subnet using sysctl and routing sockets. I can search arp cache and return the hardware address if it is there. But if the hardware address is not in ARP cache then I cant retrieve it. Is there any way to get hardware address of any machine

Parsing route dump received using sysctl

2002-10-04 Thread yatin chalke
Hi, I am currently trying to get a route dump in freebsd4.4 using sysctl with NET_RT_DUMP. I am running into problems while parsing the returned rt_msghdr structures. The sockaddr structures returned after the rt_msghdr are messed up and it is not giving correct gateway or netmask. For ex: whe