diff options
author | João Valverde <j@v6e.pt> | 2021-09-29 18:32:28 +0100 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-09-30 13:59:28 +0000 |
commit | 5362d0c31b83fd7eb812f3215918504496c2f56a (patch) | |
tree | 8db56bb5b91a21371aeda3cbb273c953b851f522 /extcap | |
parent | 0173ea0ec1f87f2ab40c45eedb0ca1c1f77eea8e (diff) | |
download | wireshark-5362d0c31b83fd7eb812f3215918504496c2f56a.tar.gz wireshark-5362d0c31b83fd7eb812f3215918504496c2f56a.tar.bz2 wireshark-5362d0c31b83fd7eb812f3215918504496c2f56a.zip |
ws_getopt: Rename struct and macros
This is part of the API and should also be renamed to avoid conflicts.
Diffstat (limited to 'extcap')
-rw-r--r-- | extcap/androiddump.c | 24 | ||||
-rw-r--r-- | extcap/ciscodump.c | 6 | ||||
-rw-r--r-- | extcap/dpauxmon.c | 8 | ||||
-rw-r--r-- | extcap/etl.c | 8 | ||||
-rw-r--r-- | extcap/etwdump.c | 12 | ||||
-rw-r--r-- | extcap/extcap-base.h | 20 | ||||
-rw-r--r-- | extcap/randpktdump.c | 18 | ||||
-rw-r--r-- | extcap/sdjournal.c | 8 | ||||
-rw-r--r-- | extcap/ssh-base.h | 20 | ||||
-rw-r--r-- | extcap/sshdump.c | 12 | ||||
-rw-r--r-- | extcap/udpdump.c | 10 |
11 files changed, 73 insertions, 73 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c index 4720223273..1767ef0ee6 100644 --- a/extcap/androiddump.c +++ b/extcap/androiddump.c @@ -198,19 +198,19 @@ enum { OPT_CONFIG_BT_LOCAL_TCP_PORT }; -static struct option longopts[] = { +static struct ws_option longopts[] = { EXTCAP_BASE_OPTIONS, - { "help", no_argument, NULL, OPT_HELP}, - { "version", no_argument, NULL, OPT_VERSION}, - { "adb-server-ip", required_argument, NULL, OPT_CONFIG_ADB_SERVER_IP}, - { "adb-server-tcp-port", required_argument, NULL, OPT_CONFIG_ADB_SERVER_TCP_PORT}, - { "logcat-text", optional_argument, NULL, OPT_CONFIG_LOGCAT_TEXT}, - { "logcat-ignore-log-buffer", optional_argument, NULL, OPT_CONFIG_LOGCAT_IGNORE_LOG_BUFFER}, - { "logcat-custom-options", required_argument, NULL, OPT_CONFIG_LOGCAT_CUSTOM_OPTIONS}, - { "bt-server-tcp-port", required_argument, NULL, OPT_CONFIG_BT_SERVER_TCP_PORT}, - { "bt-forward-socket", required_argument, NULL, OPT_CONFIG_BT_FORWARD_SOCKET}, - { "bt-local-ip", required_argument, NULL, OPT_CONFIG_BT_LOCAL_IP}, - { "bt-local-tcp-port", required_argument, NULL, OPT_CONFIG_BT_LOCAL_TCP_PORT}, + { "help", ws_no_argument, NULL, OPT_HELP}, + { "version", ws_no_argument, NULL, OPT_VERSION}, + { "adb-server-ip", ws_required_argument, NULL, OPT_CONFIG_ADB_SERVER_IP}, + { "adb-server-tcp-port", ws_required_argument, NULL, OPT_CONFIG_ADB_SERVER_TCP_PORT}, + { "logcat-text", ws_optional_argument, NULL, OPT_CONFIG_LOGCAT_TEXT}, + { "logcat-ignore-log-buffer", ws_optional_argument, NULL, OPT_CONFIG_LOGCAT_IGNORE_LOG_BUFFER}, + { "logcat-custom-options", ws_required_argument, NULL, OPT_CONFIG_LOGCAT_CUSTOM_OPTIONS}, + { "bt-server-tcp-port", ws_required_argument, NULL, OPT_CONFIG_BT_SERVER_TCP_PORT}, + { "bt-forward-socket", ws_required_argument, NULL, OPT_CONFIG_BT_FORWARD_SOCKET}, + { "bt-local-ip", ws_required_argument, NULL, OPT_CONFIG_BT_LOCAL_IP}, + { "bt-local-tcp-port", ws_required_argument, NULL, OPT_CONFIG_BT_LOCAL_TCP_PORT}, { 0, 0, 0, 0 } }; diff --git a/extcap/ciscodump.c b/extcap/ciscodump.c index d9cdb46218..0fa67f60e7 100644 --- a/extcap/ciscodump.c +++ b/extcap/ciscodump.c @@ -76,10 +76,10 @@ enum { OPT_REMOTE_COUNT }; -static struct option longopts[] = { +static struct ws_option longopts[] = { EXTCAP_BASE_OPTIONS, - { "help", no_argument, NULL, OPT_HELP}, - { "version", no_argument, NULL, OPT_VERSION}, + { "help", ws_no_argument, NULL, OPT_HELP}, + { "version", ws_no_argument, NULL, OPT_VERSION}, SSH_BASE_OPTIONS, { 0, 0, 0, 0} }; diff --git a/extcap/dpauxmon.c b/extcap/dpauxmon.c index d668f20633..97c6a50431 100644 --- a/extcap/dpauxmon.c +++ b/extcap/dpauxmon.c @@ -51,13 +51,13 @@ enum { OPT_INTERFACE_ID, }; -static struct option longopts[] = { +static struct ws_option longopts[] = { EXTCAP_BASE_OPTIONS, /* Generic application options */ - { "help", no_argument, NULL, OPT_HELP}, - { "version", no_argument, NULL, OPT_VERSION}, + { "help", ws_no_argument, NULL, OPT_HELP}, + { "version", ws_no_argument, NULL, OPT_VERSION}, /* Interfaces options */ - { "interface_id", required_argument, NULL, OPT_INTERFACE_ID}, + { "interface_id", ws_required_argument, NULL, OPT_INTERFACE_ID}, { 0, 0, 0, 0 } }; diff --git a/extcap/etl.c b/extcap/etl.c index a4ff72e152..9a74e3ccc9 100644 --- a/extcap/etl.c +++ b/extcap/etl.c @@ -54,10 +54,10 @@ enum { OPT_LEVEL, }; -static struct option longopts[] = { - { "p", required_argument, NULL, OPT_PROVIDER}, - { "k", required_argument, NULL, OPT_KEYWORD}, - { "l", required_argument, NULL, OPT_LEVEL}, +static struct ws_option longopts[] = { + { "p", ws_required_argument, NULL, OPT_PROVIDER}, + { "k", ws_required_argument, NULL, OPT_KEYWORD}, + { "l", ws_required_argument, NULL, OPT_LEVEL}, { 0, 0, 0, 0 } }; diff --git a/extcap/etwdump.c b/extcap/etwdump.c index 29e7499841..8ec5407141 100644 --- a/extcap/etwdump.c +++ b/extcap/etwdump.c @@ -41,13 +41,13 @@ enum { OPT_PARAMS }; -static struct option longopts[] = { +static struct ws_option longopts[] = { EXTCAP_BASE_OPTIONS, - { "help", no_argument, NULL, OPT_HELP}, - { "version", no_argument, NULL, OPT_VERSION}, - { "iue", optional_argument, NULL, OPT_INCLUDE_UNDECIDABLE_EVENT}, - { "etlfile", required_argument, NULL, OPT_ETLFILE}, - { "params", required_argument, NULL, OPT_PARAMS}, + { "help", ws_no_argument, NULL, OPT_HELP}, + { "version", ws_no_argument, NULL, OPT_VERSION}, + { "iue", ws_optional_argument, NULL, OPT_INCLUDE_UNDECIDABLE_EVENT}, + { "etlfile", ws_required_argument, NULL, OPT_ETLFILE}, + { "params", ws_required_argument, NULL, OPT_PARAMS}, { 0, 0, 0, 0 } }; diff --git a/extcap/extcap-base.h b/extcap/extcap-base.h index bb7911ca38..2bc74f656a 100644 --- a/extcap/extcap-base.h +++ b/extcap/extcap-base.h @@ -40,16 +40,16 @@ #define EXTCAP_BASE_OPTIONS \ - { "extcap-interfaces", no_argument, NULL, EXTCAP_OPT_LIST_INTERFACES}, \ - { "extcap-version", optional_argument, NULL, EXTCAP_OPT_VERSION}, \ - { "extcap-dlts", no_argument, NULL, EXTCAP_OPT_LIST_DLTS}, \ - { "extcap-interface", required_argument, NULL, EXTCAP_OPT_INTERFACE}, \ - { "extcap-config", no_argument, NULL, EXTCAP_OPT_CONFIG}, \ - { "capture", no_argument, NULL, EXTCAP_OPT_CAPTURE}, \ - { "extcap-capture-filter", required_argument, NULL, EXTCAP_OPT_CAPTURE_FILTER}, \ - { "fifo", required_argument, NULL, EXTCAP_OPT_FIFO}, \ - { "debug", no_argument, NULL, EXTCAP_OPT_DEBUG}, \ - { "debug-file", required_argument, NULL, EXTCAP_OPT_DEBUG_FILE} + { "extcap-interfaces", ws_no_argument, NULL, EXTCAP_OPT_LIST_INTERFACES}, \ + { "extcap-version", ws_optional_argument, NULL, EXTCAP_OPT_VERSION}, \ + { "extcap-dlts", ws_no_argument, NULL, EXTCAP_OPT_LIST_DLTS}, \ + { "extcap-interface", ws_required_argument, NULL, EXTCAP_OPT_INTERFACE}, \ + { "extcap-config", ws_no_argument, NULL, EXTCAP_OPT_CONFIG}, \ + { "capture", ws_no_argument, NULL, EXTCAP_OPT_CAPTURE}, \ + { "extcap-capture-filter", ws_required_argument, NULL, EXTCAP_OPT_CAPTURE_FILTER}, \ + { "fifo", ws_required_argument, NULL, EXTCAP_OPT_FIFO}, \ + { "debug", ws_no_argument, NULL, EXTCAP_OPT_DEBUG}, \ + { "debug-file", ws_required_argument, NULL, EXTCAP_OPT_DEBUG_FILE} typedef struct _extcap_parameters { diff --git a/extcap/randpktdump.c b/extcap/randpktdump.c index ad74474e93..070aa53df2 100644 --- a/extcap/randpktdump.c +++ b/extcap/randpktdump.c @@ -42,16 +42,16 @@ enum { OPT_TYPE }; -static struct option longopts[] = { +static struct ws_option longopts[] = { EXTCAP_BASE_OPTIONS, - { "help", no_argument, NULL, OPT_HELP}, - { "version", no_argument, NULL, OPT_VERSION}, - { "maxbytes", required_argument, NULL, OPT_MAXBYTES}, - { "count", required_argument, NULL, OPT_COUNT}, - { "delay", required_argument, NULL, OPT_DELAY}, - { "random-type", no_argument, NULL, OPT_RANDOM_TYPE}, - { "all-random", no_argument, NULL, OPT_ALL_RANDOM}, - { "type", required_argument, NULL, OPT_TYPE}, + { "help", ws_no_argument, NULL, OPT_HELP}, + { "version", ws_no_argument, NULL, OPT_VERSION}, + { "maxbytes", ws_required_argument, NULL, OPT_MAXBYTES}, + { "count", ws_required_argument, NULL, OPT_COUNT}, + { "delay", ws_required_argument, NULL, OPT_DELAY}, + { "random-type", ws_no_argument, NULL, OPT_RANDOM_TYPE}, + { "all-random", ws_no_argument, NULL, OPT_ALL_RANDOM}, + { "type", ws_required_argument, NULL, OPT_TYPE}, { 0, 0, 0, 0 } }; diff --git a/extcap/sdjournal.c b/extcap/sdjournal.c index 40f9efe94b..eefd6ea7c2 100644 --- a/extcap/sdjournal.c +++ b/extcap/sdjournal.c @@ -50,11 +50,11 @@ enum { OPT_START_FROM }; -static struct option longopts[] = { +static struct ws_option longopts[] = { EXTCAP_BASE_OPTIONS, - { "help", no_argument, NULL, OPT_HELP}, - { "version", no_argument, NULL, OPT_VERSION}, - { "start-from", required_argument, NULL, OPT_START_FROM}, + { "help", ws_no_argument, NULL, OPT_HELP}, + { "version", ws_no_argument, NULL, OPT_VERSION}, + { "start-from", ws_required_argument, NULL, OPT_START_FROM}, { 0, 0, 0, 0} }; diff --git a/extcap/ssh-base.h b/extcap/ssh-base.h index 11a6d62043..260525fd5e 100644 --- a/extcap/ssh-base.h +++ b/extcap/ssh-base.h @@ -28,16 +28,16 @@ #endif #define SSH_BASE_OPTIONS \ - { "remote-host", required_argument, NULL, OPT_REMOTE_HOST}, \ - { "remote-port", required_argument, NULL, OPT_REMOTE_PORT}, \ - { "remote-username", required_argument, NULL, OPT_REMOTE_USERNAME}, \ - { "remote-password", required_argument, NULL, OPT_REMOTE_PASSWORD}, \ - { "remote-interface", required_argument, NULL, OPT_REMOTE_INTERFACE}, \ - { "remote-filter", required_argument, NULL, OPT_REMOTE_FILTER}, \ - { "remote-count", required_argument, NULL, OPT_REMOTE_COUNT}, \ - { "sshkey", required_argument, NULL, OPT_SSHKEY}, \ - { "sshkey-passphrase", required_argument, NULL, OPT_SSHKEY_PASSPHRASE}, \ - { "proxycommand", required_argument, NULL, OPT_PROXYCOMMAND} + { "remote-host", ws_required_argument, NULL, OPT_REMOTE_HOST}, \ + { "remote-port", ws_required_argument, NULL, OPT_REMOTE_PORT}, \ + { "remote-username", ws_required_argument, NULL, OPT_REMOTE_USERNAME}, \ + { "remote-password", ws_required_argument, NULL, OPT_REMOTE_PASSWORD}, \ + { "remote-interface", ws_required_argument, NULL, OPT_REMOTE_INTERFACE}, \ + { "remote-filter", ws_required_argument, NULL, OPT_REMOTE_FILTER}, \ + { "remote-count", ws_required_argument, NULL, OPT_REMOTE_COUNT}, \ + { "sshkey", ws_required_argument, NULL, OPT_SSHKEY}, \ + { "sshkey-passphrase", ws_required_argument, NULL, OPT_SSHKEY_PASSPHRASE}, \ + { "proxycommand", ws_required_argument, NULL, OPT_PROXYCOMMAND} typedef struct _ssh_params { gchar* host; diff --git a/extcap/sshdump.c b/extcap/sshdump.c index 2c3bb37c7a..0247bac08f 100644 --- a/extcap/sshdump.c +++ b/extcap/sshdump.c @@ -61,14 +61,14 @@ enum { OPT_REMOTE_NOPROM }; -static struct option longopts[] = { +static struct ws_option longopts[] = { EXTCAP_BASE_OPTIONS, - { "help", no_argument, NULL, OPT_HELP}, - { "version", no_argument, NULL, OPT_VERSION}, + { "help", ws_no_argument, NULL, OPT_HELP}, + { "version", ws_no_argument, NULL, OPT_VERSION}, SSH_BASE_OPTIONS, - { "remote-capture-command", required_argument, NULL, OPT_REMOTE_CAPTURE_COMMAND}, - { "remote-sudo", no_argument, NULL, OPT_REMOTE_SUDO }, - { "remote-noprom", no_argument, NULL, OPT_REMOTE_NOPROM }, + { "remote-capture-command", ws_required_argument, NULL, OPT_REMOTE_CAPTURE_COMMAND}, + { "remote-sudo", ws_no_argument, NULL, OPT_REMOTE_SUDO }, + { "remote-noprom", ws_no_argument, NULL, OPT_REMOTE_NOPROM }, { 0, 0, 0, 0} }; diff --git a/extcap/udpdump.c b/extcap/udpdump.c index 63b29253e8..be8f044a2d 100644 --- a/extcap/udpdump.c +++ b/extcap/udpdump.c @@ -72,14 +72,14 @@ enum { OPT_PAYLOAD }; -static struct option longopts[] = { +static struct ws_option longopts[] = { EXTCAP_BASE_OPTIONS, /* Generic application options */ - { "help", no_argument, NULL, OPT_HELP}, - { "version", no_argument, NULL, OPT_VERSION}, + { "help", ws_no_argument, NULL, OPT_HELP}, + { "version", ws_no_argument, NULL, OPT_VERSION}, /* Interfaces options */ - { "port", required_argument, NULL, OPT_PORT}, - { "payload", required_argument, NULL, OPT_PAYLOAD}, + { "port", ws_required_argument, NULL, OPT_PORT}, + { "payload", ws_required_argument, NULL, OPT_PAYLOAD}, { 0, 0, 0, 0 } }; |