tcpdump mailing list archives

Re: Initializing a device


From: Guy Harris <guy () alum mit edu>
Date: Fri, 6 Jan 2012 16:02:46 -0800


On Jan 6, 2012, at 8:16 AM, Jakub Zawadzki wrote:

On Fri, Jan 06, 2012 at 04:47:09PM +0100, Akos Vandra wrote:
Another reason why this is not a good approach: Let's get wireshark in
the picture. Let's say the user selected a canusb device. The only way
for wireshark to know what parameters (ex. baudrate) the canusb device
needs is if wireshark knows how the canusb device works. This is bad.
IMHO one of the main goals of libpcap would be to hide how the capture
device actually works from the user application, so that it can use a
device-independent way of getting packets.

IMHO user need to know what parameters he can (or need to) set, and
1/ He can use either enviroment variables,
like:
 CANUSB_BAUDRATE=2400 tcpdump -i canusb0
 USBRADIO0_CHANNEL=12 tcpdump -i usbradio0

2/ Capture from interfaces like:
 tcpdump -i canusb0:baudrate=2400,parity
or
 tcpdump -i usbradio0:channel=12

I used something like (2/) in nflog cause there was no other way,

but I agree possibility to add custom parameters would be great, and much
more user friendly!

Well, maybe.  From a command-line user's perspective, it's the difference between

        CANUSB_BAUDRATE=2400 tcpdump -i canusb0

and

        tcpdump -i canusb0:baudrate=2400

and

        tcpdump -i canusb0 -o baudrate=2400

and

        tcpdump -i canusb0 --baudrate 2400

and so on.  You have a bunch of parameters that have "short names" to use on the command line, types, and values.

From a GUI perspective, perhaps.  You'd have a dialog box that has, for example, a list of

        name: [value widget]

where the value widget might be a spinbox for numerical parameters, a combo box/option menu/whatever for 
enumerated-data-type parameters, a checkbox for Boolean parameters, and a text entry box for text parameters.  Either 
"name" would be the same as the command-line short name, or it'd be some "descriptive name" - perhaps there'd be a 
tooltip with a descriptive phrase.  That gets more complicated if your GUI app is internationalized; Wireshark isn't, 
and at least one developer whose mother tongue isn't English has argued against it:

        http://wiki.wireshark.org/Development/Translations

but I don't know whether everyone would agree with that, and there are other pcap-based network analyzers:

        http://ksniffer.sourceforge.net/

        http://sourceforge.net/projects/packetyzer/

so I don't want to assume it's tcpdump and Wireshark and nothing else.-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: