Re: ARP and libpcap

2011-04-06 Thread Jan Stary
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

Re: ARP and libpcap

2011-04-06 Thread Alessandro Baggi
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

Re: ARP and libpcap

2011-04-06 Thread Robert
On Wed, 06 Apr 2011 12:30:56 +0200 Alessandro Baggi alessandro.ba...@gmail.com wrote: 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. I can do

Re: ARP and libpcap

2011-04-06 Thread Jan Stary
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

Re: ARP and libpcap

2011-04-06 Thread Alessandro Baggi
Il 06/04/2011 15:26, Jan Stary ha scritto: of of course For some obscure reason :D, not really, to avoid problem as poisoning for insecure services.

Re: ARP and libpcap

2011-04-05 Thread Jan Stary
On Apr 04 21:03:58, Alessandro Baggi wrote: Hi list. I'm coding a little program with libpcap that captures ARP packet. Why? tcpdump arp In this program I try to cast an arphdr struct pointer to the packet, to read ARP packet parameters, and in this point I have the problem. tcpdump -e

Re: ARP and libpcap

2011-04-05 Thread Alessandro Baggi
: On Apr 04 21:03:58, Alessandro Baggi wrote: Hi list. I'm coding a little program with libpcap that captures ARP packet. Why? tcpdump arp In this program I try to cast an arphdr struct pointer to the packet, to read ARP packet parameters, and in this point I have the problem. tcpdump -e arp

Re: ARP and libpcap

2011-04-05 Thread Tomas Bodzar
Stary ha scritto: On Apr 04 21:03:58, Alessandro Baggi wrote: Hi list. I'm coding a little program with libpcap that captures ARP packet. Why? tcpdump arp In this program I try to cast an B arphdr struct pointer to the packet, to read ARP packet parameters, and in this point I have

ARP and libpcap

2011-04-04 Thread Alessandro Baggi
Hi list. I'm coding a little program with libpcap that captures ARP packet. In this program I try to cast an arphdr struct pointer to the packet, to read ARP packet parameters, and in this point I have the problem. This is the code of the callback pcap_loop function: void mac(u_char *args