udpreplay is a lightweight alternative to tcpreplay for replaying UDP unicast and multicast streams from a pcap file.
usage: udpreplay [-i iface] [-l] [-s speed] [-c millisec] [-r repeat]
[-t ttl] [-o outfile] [-n npkts] pcap
-i iface interface to send packets through
-l enable loopback
-c millisec constant milliseconds between packets
-r repeat number of times to loop data
-s speed replay speed relative to pcap timestamps
-t ttl packet ttl
-o outfile save incoming packets into the PCAP file
-n npkts replay max of npkts packets
-b enable broadcast (SO_BROADCAST)
$ udpreplay -i eth0 -o incoming.pcap example.pcap
udpreplay requires CMake 3.2 or higher,
g++ and libpcap-dev to build and install.
Building on Debian/Ubuntu:
sudo apt install cmake libpcap-dev g++
cd udpreplay
mkdir build && cd build
cmake ..
make
Building on RHEL/CentOS:
sudo yum install cmake3 libpcap-devel gcc-c++
cd udpreplay
mkdir build && cd build
cmake3 ..
make
Installing:
$ sudo make install
This project was created by Erik Rigtorp <[email protected]>.