Grabbing Sequence Numbers of a tcp-packet

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 seq in tcp_header.

Need Your Help

Using localstorage and checkboxes to customize a menu

jquery html5 forms local-storage

I have a configuration page with ON/OFF checkboxes that I would like to control whether or not an item in the menu is hidden or shown. character replacement in strings string character-replacement

How fast can I replace characters in a string?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.