Is there any way to use the tcpdump command in such a way to capture only the sequence numbers(or in fact grab it) of the packets and store it in a variable?
I need to do this from inside a C++ program. Any help appreciated.
(I am using nemesis-tcp to send the packets from one system and tcpdump command to capture these packets at the receiver)
You can use the pcap library and the official walk-through is a very good introduction. Especially look at the
seqin tcp_header.