Re: [tcpdump-workers] live capture Ethernet gives me zero-packets

2011-04-28 Thread Michael Richardson
> "Andrej" == Andrej van der Zee writes: >> (No, the "any" device doesn't give you Ethernet packets, even if, >> at the time you start the capture, the only interfaces on your >> machine are Ethernet interfaces. If you want to capture on a >> particular Ethernet device, use i

Re: [tcpdump-workers] live capture Ethernet gives me zero-packets

2011-04-27 Thread Guy Harris
On Apr 27, 2011, at 12:07 PM, Michael Richardson wrote: > I wrote some code C++, which I have placed under a do-anything license, > which disguishes between EN10B and LINKTYPE_LINUX_SLL/DLT_LINUX_SLL. I think there's another libpcap-based program out there that includes code to distinguish betw

Re: [tcpdump-workers] live capture Ethernet gives me zero-packets

2011-04-04 Thread Andrej van der Zee
Hi Guy, Thanks for the email. > (No, the "any" device doesn't give you Ethernet packets, even if, at the > time you start the capture, the only interfaces on your machine are Ethernet > interfaces. If you want to capture on a particular Ethernet device, use its > name, e.g. "eth0", in which cas

Re: [tcpdump-workers] live capture Ethernet gives me zero-packets

2011-04-04 Thread Guy Harris
On Apr 3, 2011, at 11:38 PM, Andrej van der Zee wrote: > I am trying to get started with a live capture using libpcap. Somehow I > cannot get the contents of a packet. It seems that all bytes are zeroed. > Here is the source code: ... > void callback(u_char * user, const struct pcap_pkt

[tcpdump-workers] live capture Ethernet gives me zero-packets

2011-04-03 Thread Andrej van der Zee
Hi, I am trying to get started with a live capture using libpcap. Somehow I cannot get the contents of a packet. It seems that all bytes are zeroed. Here is the source code: #include #include #include void callback(u_char * user, const struct pcap_pkthdr* pkthdr, const u_char * pkt) { fprin