On Apr 06 12:30:56, Alessandro Baggi wrote: > Il 06/04/2011 08:25, Jan Stary ha scritto: > >On Apr 05 19:06:40, Alessandro Baggi wrote: > >>Ok, but my app must take those packet from the net for other > >>operation. > >Huh? tpcdump/pcap also "takes those packet from the net" of course. > > > >>For this purpose I can also build my own structure to see > >>arp parameter, but I'm trying to know how to use arphdr structure. > >Why exactly do you need to write your own code for this, > >replicating the functionality that already is in base? > > > >>Someone has experience about it? > >Yes, libpcap does it somehow. Look at its source. > > > >What is it that yo actually want to do? > > > Hi jan, i'm trying to make a program that map a specified MAC > address to a specified IP, and then get information by getting arp > packets for the specified nic to see if some host changes its IP.
You should have said that in your original post. Step by step we are getting to what you really want. So: why do you want to know that someone's IP address has changed? Also, there is 'arp -a' of of course.