In linux I use ifconfig to figure out which interface to listen to when capturing packets I know
I am specifically interested in recording traffic received from a specific peer. In linux my script creates a temporary socket just to use Thanks asked 17 Apr '13, 23:19 nhed |
2 Answers:
You can use dumpcap with option -M. That will print the IP address of the interfaces (unfortunately tshark does not know -M).
Example:
Regards answered 18 Apr '13, 01:30 Kurt Knochner ♦ edited 18 Apr '13, 01:31 |
You can use answered 17 Apr '13, 23:57 SYN-bit ♦♦ Sorry ... no correlation that I can see ... (18 Apr '13, 07:10) nhed |
And so we learn something new every day :-)
That's one reason why I'm here. Learning new things about a tool I'm using for quite some time ;-)
Is there any reason not to just dispense with the -M option and modify -D, -L and -S to simply print the added information that -M would have supplied? (Well actually, I'm not sure what, if anything, -M adds to the -S output, despite the help indicating, somewhat cryptically in my opinion that, "for -D, -L, and -S, produce machine-readable output".) And then of course, for tshark and wireshark to also display that added information in their -D and -L output as well.
+1
it prevents the header from being printed. Why is that better 'machine readable'? O.K. you don't have to handle that header, but skipping one line of input is not unsolvable ;-)
BTW: from the file dumpcap.c.
a comment of print_machine_readable_interfaces() says:
apparently, the output of 'dumpcap -D -M' is identical to 'dumpcap -D -Z none'.
OK, well -M has been around for a while now, since r22367, so I'll let those more familiar with it comment as to whether or not it's acceptable to remove it and change the -D, -M and -S behavior.