Console application to extract UDP/IP-datagrams from .pcap file
- Reject all not UDP/IP packets (e.g, TCP/IP)
- Filter UDP-datagrams by IP-address or/and destination port
- Doesn't support IPv6
Mandatory argument: path to .pcap file
Optional arguments:
-a ADDRESS print only UDP-datagrams, were sent to address [ADDRESS] -p PORT print only UDP-datagrams, were sent to port [PORT]
1. Print all UDP-datagrams from file:
./print_pcap dump.pcap
2. Print only UDP-datagrams, were sent to address 192.168.1.22:
./print_pcap -a 192.168.1.22 dump.pcap
3. Print only UDP-datagrams, were sent to address 192.168.1.22:9991:
./print_pcap -a 192.168.1.22 -p 9991 dump.pcap
[Timestamp] [DstAddress] [DstPort] [PayloadSize]
- cmake (build system), compiler should support C++11
- libpcap (for .pcap parsing)