Make the packet-dump code work with a FIFO.

mkfifo /tmp/dnsmasq.pipe
dnsmasq --dumpfile=/tmp/dnsmasq.pipe ....
wireshark -i /tmp/dnsmasq.pipe

gives real-time display of network traffic in Wireshark.
This commit is contained in:
Simon Kelley
2024-11-27 16:03:13 +00:00
parent c6bc22adc7
commit 41d2ae3203
2 changed files with 17 additions and 9 deletions

View File

@@ -781,7 +781,7 @@ The address range can be of the form
must fall in the same /64 network, or prefix-length must be greater than or equal to 64 except that shorter prefix lengths than 64 are allowed only if non-sequential names are in use.
.TP
.B --dumpfile=<path/to/file>
Specify the location of a pcap-format file which dnsmasq uses to dump copies of network packets for debugging purposes. If the file exists when dnsmasq starts, it is not deleted; new packets are added to the end.
Specify the location of a pcap-format file which dnsmasq uses to dump copies of network packets for debugging purposes. If the file exists when dnsmasq starts, it is not deleted; new packets are added to the end. The file may be a named-pipe which Wireshark is listening to.
.TP
.B --dumpmask=<mask>
Specify which types of packets should be added to the dumpfile. The argument should be the OR of the bitmasks for each type of packet to be dumped: it can be specified in hex by preceding the number with 0x in the normal way. Each time a packet is written to the dumpfile, dnsmasq logs the packet sequence and the mask