aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.h
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2021-09-29 18:32:28 +0100
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-09-30 13:59:28 +0000
commit5362d0c31b83fd7eb812f3215918504496c2f56a (patch)
tree8db56bb5b91a21371aeda3cbb273c953b851f522 /capture_opts.h
parent0173ea0ec1f87f2ab40c45eedb0ca1c1f77eea8e (diff)
ws_getopt: Rename struct and macros
This is part of the API and should also be renamed to avoid conflicts.
Diffstat (limited to 'capture_opts.h')
-rw-r--r--capture_opts.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/capture_opts.h b/capture_opts.h
index 84379403f3..dd5850d2c7 100644
--- a/capture_opts.h
+++ b/capture_opts.h
@@ -59,7 +59,7 @@ extern "C" {
#ifdef CAN_SET_CAPTURE_BUFFER_SIZE
#define LONGOPT_BUFFER_SIZE \
- {"buffer-size", required_argument, NULL, 'B'},
+ {"buffer-size", ws_required_argument, NULL, 'B'},
#define OPTSTRING_B "B:"
#else
#define LONGOPT_BUFFER_SIZE
@@ -67,7 +67,7 @@ extern "C" {
#endif
#ifdef HAVE_PCAP_CREATE
-#define LONGOPT_MONITOR_MODE {"monitor-mode", no_argument, NULL, 'I'},
+#define LONGOPT_MONITOR_MODE {"monitor-mode", ws_no_argument, NULL, 'I'},
#define OPTSTRING_I "I"
#else
#define LONGOPT_MONITOR_MODE
@@ -75,19 +75,19 @@ extern "C" {
#endif
#define LONGOPT_CAPTURE_COMMON \
- {"autostop", required_argument, NULL, 'a'}, \
- {"ring-buffer", required_argument, NULL, 'b'}, \
+ {"autostop", ws_required_argument, NULL, 'a'}, \
+ {"ring-buffer", ws_required_argument, NULL, 'b'}, \
LONGOPT_BUFFER_SIZE \
- {"list-interfaces", no_argument, NULL, 'D'}, \
- {"interface", required_argument, NULL, 'i'}, \
+ {"list-interfaces", ws_no_argument, NULL, 'D'}, \
+ {"interface", ws_required_argument, NULL, 'i'}, \
LONGOPT_MONITOR_MODE \
- {"list-data-link-types", no_argument, NULL, 'L'}, \
- {"no-promiscuous-mode", no_argument, NULL, 'p'}, \
- {"snapshot-length", required_argument, NULL, 's'}, \
- {"linktype", required_argument, NULL, 'y'}, \
- {"list-time-stamp-types", no_argument, NULL, LONGOPT_LIST_TSTAMP_TYPES}, \
- {"time-stamp-type", required_argument, NULL, LONGOPT_SET_TSTAMP_TYPE}, \
- {"compress-type", required_argument, NULL, LONGOPT_COMPRESS_TYPE},
+ {"list-data-link-types", ws_no_argument, NULL, 'L'}, \
+ {"no-promiscuous-mode", ws_no_argument, NULL, 'p'}, \
+ {"snapshot-length", ws_required_argument, NULL, 's'}, \
+ {"linktype", ws_required_argument, NULL, 'y'}, \
+ {"list-time-stamp-types", ws_no_argument, NULL, LONGOPT_LIST_TSTAMP_TYPES}, \
+ {"time-stamp-type", ws_required_argument, NULL, LONGOPT_SET_TSTAMP_TYPE}, \
+ {"compress-type", ws_required_argument, NULL, LONGOPT_COMPRESS_TYPE},
#define OPTSTRING_CAPTURE_COMMON \