Wireshark mailing list archives

Re: extcap command line parameter format


From: Guy Harris <guy () alum mit edu>
Date: Thu, 26 Jul 2018 14:46:53 -0700

On Jul 23, 2018, at 11:37 AM, Guy Harris <guy () alum mit edu> wrote:

On Jul 20, 2018, at 10:12 AM, Jaap Keuter <jaap.keuter () xs4all nl> wrote:

Doesn’t this mean that all other command line parameters with values are to be generated with equal sign?

It's a requirement for any parameter where the value is optional.

It's not a requirement for any parameter where the value is required.

...so, for any non-Boolean parameter specific to your extcap program, *DO NOT MAKE THE ARGUMENT TO THE OPTION OPTIONAL*.

(For Boolean options, the extcap code either passes the option, *without* an argument, if the parameter is true, or 
doesn't pass the option at all if the parameter is false, so "optional argument" works, even with the *BSD/macOS 
getopt_long().)

For example, if you're using getopt_long() to parse your arguments, *DO NOT* use optional_argument for *ANY* 
non-Boolean options.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: