Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
clopts_common.h
Go to the documentation of this file.
1
11
12#ifndef __CLOPTS_COMMON_H__
13#define __CLOPTS_COMMON_H__
14
15#include <wireshark.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
21/*
22 * Long options.
23 * For long options with no corresponding short options, we define values
24 * outside the range of ASCII graphic characters, make that the last
25 * component of the entry for the long option, and have a case for that
26 * option in the switch statement.
27 */
28// Base value for capture related long options
29#define LONGOPT_BASE_CAPTURE 1000
30// Base value for dissector related long options
31#define LONGOPT_BASE_DISSECTOR 2000
32// Base value for application specific long options
33#define LONGOPT_BASE_APPLICATION 3000
34// Base value for GUI specific long options
35#define LONGOPT_BASE_GUI 4000
36// Base value for logging related long options
37#define LONGOPT_BASE_WSLOG 5000
38
39#define LONGOPT_READ_CAPTURE_COMMON \
40 {"read-file", ws_required_argument, NULL, 'r' }, \
41
42#define OPTSTRING_READ_CAPTURE_COMMON \
43 "r:"
44
56WS_DLL_PUBLIC bool
57get_natural_int(const char *string, const char *name, int32_t* number);
58
70WS_DLL_PUBLIC bool
71get_positive_int(const char *string, const char *name, int32_t* number);
72
84WS_DLL_PUBLIC bool
85get_natural_int64(const char* string, const char* name, int64_t* number);
86
98WS_DLL_PUBLIC bool
99get_positive_int64(const char* string, const char* name, int64_t* number);
100
112WS_DLL_PUBLIC bool
113get_uint32(const char *string, const char *name, uint32_t* number);
114
127WS_DLL_PUBLIC bool
128get_nonzero_uint32(const char *string, const char *name, uint32_t* number);
129
141WS_DLL_PUBLIC bool
142get_uint64(const char *string, const char *name, uint64_t* number);
143
155WS_DLL_PUBLIC bool
156get_nonzero_uint64(const char *string, const char *name, uint64_t* number);
157
169WS_DLL_PUBLIC bool
170get_positive_double(const char *string, const char *name, double* number);
171
172#ifdef __cplusplus
173}
174#endif /* __cplusplus */
175
176#endif /* __CLOPTS_COMMON_H__ */
WS_DLL_PUBLIC bool get_uint64(const char *string, const char *name, uint64_t *number)
Parses a string as an unsigned 64-bit integer.
Definition clopts_common.c:125
WS_DLL_PUBLIC bool get_nonzero_uint32(const char *string, const char *name, uint32_t *number)
Parses a string as a non-zero unsigned 32-bit integer.
Definition clopts_common.c:111
WS_DLL_PUBLIC bool get_natural_int64(const char *string, const char *name, int64_t *number)
Parses a string as a natural (non-negative) 64-bit integer.
Definition clopts_common.c:59
WS_DLL_PUBLIC bool get_positive_int(const char *string, const char *name, int32_t *number)
Parses a string as a strictly positive 32-bit integer.
Definition clopts_common.c:45
WS_DLL_PUBLIC bool get_positive_int64(const char *string, const char *name, int64_t *number)
Parses a string as a strictly positive 64-bit integer.
Definition clopts_common.c:82
WS_DLL_PUBLIC bool get_nonzero_uint64(const char *string, const char *name, uint64_t *number)
Parses a string as a non-zero unsigned 64-bit integer.
Definition clopts_common.c:140
WS_DLL_PUBLIC bool get_natural_int(const char *string, const char *name, int32_t *number)
Parses a string as a natural (non-negative) 32-bit integer.
Definition clopts_common.c:22
WS_DLL_PUBLIC bool get_uint32(const char *string, const char *name, uint32_t *number)
Parses a string as an unsigned 32-bit integer.
Definition clopts_common.c:96
WS_DLL_PUBLIC bool get_positive_double(const char *string, const char *name, double *number)
Parses a string as a strictly positive double-precision floating-point number.
Definition clopts_common.c:154