Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hexdump ¶
Hexdump converts the dns message m to a hex dump Wireshark can import. See https://www.wireshark.org/docs/man-pages/text2pcap.html. This output looks like this:
00000 dc bd 01 00 00 01 00 00 00 00 00 01 07 65 78 61 000010 6d 70 6c 65 05 6c 6f 63 61 6c 00 00 01 00 01 00 000020 00 29 10 00 00 00 80 00 00 00 00002a
Hexdump will use log.Debug to write the dump to the log, each line is prefixed with 'debug: ' so the data can be easily extracted.
msg will prefix the pcap dump.
Example ¶
buf, _ := msg().Pack() h := hexdump(buf) fmt.Println(string(h))
Output: debug: 000000 00 0a 01 00 00 01 00 00 00 00 00 01 07 65 78 61 debug: 000010 6d 70 6c 65 05 6c 6f 63 61 6c 00 00 01 00 01 00 debug: 000020 00 29 10 00 00 00 80 00 00 00 debug: 00002a
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.