My program writes PCAP-NG files. I open them with Wireshark. Among others, my program writes in the Section Header Block its name and a description of the platform (options shb_ hardware, shb_ os, shb_ userappl) and for each Interface Description Block a description of the network interface and the capture filter (options if_ description and if_ filter). All these data i can see when i open the dump file with Wireshark and look at Statistics->Summary. My program writes other data in the dump file: in each Interface Description Block, it also writes the system name of the network interface, as well as its IPv4 addresses and its MAC address (options if_ name, if_ IPv4addr and if_ MACaddr). These latter data i can't see through Wireshark. Do i miss something in Wireshark's GUI or is there any utility that reads PCAP-NG files and puts out all these fields? asked 29 Sep '13, 02:36 ime-braun |
One Answer:
You can see the Interface name in the Statistics->Summary, if you take a look at the first column of the list below the capture file comments. Wireshark does not show IP addresses or MACs for interfaces at the moment, at least as far as I can tell. I've just updated TraceWrangler to show MAC and IP addresses in the PCAPng Structure Viewer, so if you run Windows somewhere you could use it to see them. Add your trace to the list, click on it, and select the "PCAPng Structure" Tab at the bottom. answered 29 Sep '13, 04:34 Jasper ♦♦ |
Hm, maybe I forgot to byte-swap the IP address, which would mean that I forgot it in two places - writing and reading the option :-) I'll have to check my code when I get home.
About the interface name - I didn't test yet what happens if both name and description are present, which is why I thought the name is in the summary.
Is there a way to access these fields (section header , interface description) from plugin dissector code written in C?