tcpdump mailing list archives

LibPcap filter problem,


From: Eddie Harari <eddie.harari () gmail com>
Date: Mon, 27 Apr 2009 10:09:33 -0400

Hi ,

 I have a strange problem and would like to know what might be the problem (
maybe known issue ?).

 I have been programming an application that get packets from a Wi-Fi
network (monitor mode), i have set a simple filter
 "TCP" to fetch only tcp packets.

 for now this is very simple , i use the pcap_next_ex call to fetch the next
packet and print some data of that packet.


 while TCP dump "tcp" filter works perfectly, in my application this filter
does not seem to be working, (if i take off the filter the application gets
all the packets, but if filter is set it does not see anything).

 when i tested the application in my house environment the application
worked perfectly.

 pcap_compile() and pcap_setfilter() dont return an error , yet i dont get
the TCP packets.

 running my application and TCPDUMP at the same time shows me that there are
TCP packets on the network.

I sniff 1500 bytes from each packet ...

any idea ?
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: