Tips to packet different network frame

Some usefull tools for playing network frame

Some tools can send pcap file packets on NIC

tcpreplay

1
2
3
4
# tcpreplay -l 0 -i eth1 path-to-your-captured-file.pcap

// -l loop how many times, 0 for infinite
// -i interface where you want to send out

bittwist

1
# bittwist -i eth0 pcap-file.pcap 

playcap

The tool can play back Wireshark, tcpdump, and libpcap captures.
Maybe too old.

Packing and Decoding networking frame library

ryu (python)

https://osrg.github.io/ryu-book/en/html/index.html

libtins (c++)

http://libtins.github.io/

dpkt

https://doc.dpdk.org/guides/index.html