Search code examples
linuxnetwork-programmingpacket

storing network data packets


how to store all messages flowing trough the network card (or only with given ip address) in linux operating system and store it to a file?


Solution

  • You should have a look to tcpdump / libcap. Of course there are many great packet sniffer based on these libraries that you can use to retrieve and store any traffic going through your network card.

    http://www.tcpdump.org/