--pcap implies --mode pcap, so you can leave --mode off.
What gets sent
Frames go out byte for byte as captured. Wireblast doesn’t rewrite addresses, recompute checksums, or renumber anything. What you captured is what leaves the NIC. The one exception is opt-in: give--src-mac or --dst-mac and the first 12 bytes of every frame are overwritten, so you can retarget a capture at a different next hop without editing the file.
--packet-size is ignored entirely. The capture decides the sizes.
File support
Both.pcap and .pcapng, read with a pure-Go parser. No libpcap, no cgo.
The whole file is read and validated before anything is attached to your NIC, so a bad file fails immediately rather than halfway through a run.
Wireblast summarises what it loaded:
Timing
Two modes, and the choice matters more than it looks.- rate (default)
- original
Ignores the capture’s timestamps and sends as fast as This is what you want for load testing with realistic packets.
--pps and --bps allow. The capture becomes a source of packet content; you control the pace.--pcap-timing original. Add --pps 50 and it takes 6.7s, because the rate limit is now the slower constraint.
Looping
--pcap-loop is on by default: the capture repeats until --duration expires. That’s what makes a short capture useful as a traffic source.
With looping on, every queue replays the whole capture independently, so throughput scales with queue count.
Turn it off to send the capture exactly once:
A one-pass replay runs on queue 0 only, so packets go out in capture order. That’s the point: order is what you’re preserving. It costs you the parallelism, which is the right trade when replaying a specific scenario.The run ends when the capture is exhausted, whatever
--duration says.Receiving replayed traffic
--rx-mode generated-flow can’t work here, because there are no generated flows to infer a return filter from:
Trimming a big capture
If a file is over the two-million-packet limit, Wireblast tells you how to cut it down:editcap ships with Wireshark. Since looping is on by default, a few thousand representative packets usually beats a giant file anyway.
A ready-made example
The examples directory ships a smallsample.pcap and two runnable scripts: 015-pcap-replay for rate-paced replay, and 016-pcap-original-timing for the recorded timing.