diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2013-08-01 20:57:47 +0000 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2013-08-01 20:57:47 +0000 |
commit | 6c5e16185dfd4c9e955618f56ac8827ad7eda9e7 (patch) | |
tree | 99c0af1fac940b388377f29e82490e6f3fc6e262 /capture_opts.h | |
parent | 91382394d674190aa83995dd16e194378795f080 (diff) | |
download | wireshark-6c5e16185dfd4c9e955618f56ac8827ad7eda9e7.tar.gz wireshark-6c5e16185dfd4c9e955618f56ac8827ad7eda9e7.tar.bz2 wireshark-6c5e16185dfd4c9e955618f56ac8827ad7eda9e7.zip |
add --capture-comment to tshark
make sure that getopt() does not permute tshark's argv[] array
svn path=/trunk/; revision=51089
Diffstat (limited to 'capture_opts.h')
-rw-r--r-- | capture_opts.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/capture_opts.h b/capture_opts.h index a0fdbda5c7..cd98b56f7b 100644 --- a/capture_opts.h +++ b/capture_opts.h @@ -42,7 +42,15 @@ extern "C" { #endif /* __cplusplus */ -#define LONGOPT_NUM_CAP_COMMENT 0 +/* Attention: + for tshark, we're using a leading - in the optstring to prevent getopt() + from permuting the argv[] entries, in this case, unknown argv[] entries + will be returned as parameters to a dummy-option 1 + in short: we must not use 1 here */ + +/* this does not clash with tshark's -2 option which returns '2' */ +#define LONGOPT_NUM_CAP_COMMENT 2 + #ifdef HAVE_PCAP_REMOTE /* Type of capture source */ |