ARP command source code

Does anybody know where I can find the source code for the ARP command. I need to be able to inject an ARP request onto the network. I tried to use the QNX ported version of pcap, but found that it doesn’t support packet injection. Also, I wasn’t able to do it using raw sockets. I was hoping that I could get the ARP source code and find out how they are doing it. Ultimately, I’d like to send out an ARP request across the network and have it return the MAC address of a remote device. Thanks for your help.

Nevermind. I found the source code on foundry27. Apparently, the ARP command doesn’t send an ARP request it just looks up entries in the ARP table. Pinging the device will add the entry to the ARP table.

Check out the source for dhcp.client, in particular arp.c.

-seanb

community.qnx.com/integration/vi … 1&view=log