tcpdump mailing list archives
MSS Option & TTL Filter
From: Martin Defeche <martin.defeche () gmail com>
Date: Thu, 30 Apr 2009 15:17:03 +0200
Hello, I am developping a sniffer which its goal is to gather information about MSS and TTL, so I put a filer (tcp[tcpflags] & tcp-syn != 0) to catch only SYN or SYN ACK TCP packet. My problem is that I do not get all the packets (I compared with wireshark) and I do not understand why ! I have been searching since two days without any solutions ... I use the pcap_next function because I have to maintain a MySQL connection that could not fit with a pcap function with a callback. I purified my code to let you see only the sniffer part (very small). It's using pthread because I use two concurrent sniffer (IPv4 + IPv6 --> IPv6 is not present in the program). Please can you help me :) To compile : g++ --pedantic -Wall -O3 -g -W -pthread -I/usr/include sniffer.cpp -lpcap To run : ./a.out <IPv4 interface name> Thanks in advance
Attachment:
sniffer.cpp
Description:
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- MSS Option & TTL Filter Martin Defeche (Apr 30)