Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
clopts_common.h
Go to the documentation of this file.
1
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
37#define LONGOPT_READ_CAPTURE_COMMON \
38 {"read-file", ws_required_argument, NULL, 'r' }, \
39
40#define OPTSTRING_READ_CAPTURE_COMMON \
41 "r:"
42
43WS_DLL_PUBLIC int
44get_natural_int(const char *string, const char *name);
45
46WS_DLL_PUBLIC int
47get_positive_int(const char *string, const char *name);
48
49WS_DLL_PUBLIC uint32_t
50get_uint32(const char *string, const char *name);
51
52WS_DEPRECATED_X("Use get_uint32 instead")
53static inline uint32_t
54get_guint32(const char *string, const char *name) { return get_uint32(string, name); }
55
56WS_DLL_PUBLIC uint32_t
57get_nonzero_uint32(const char *string, const char *name);
58
59WS_DEPRECATED_X("Use get_nonzero_uint32 instead")
60static inline uint32_t
61get_nonzero_guint32(const char *string, const char *name) { return get_nonzero_uint32(string, name); }
62
63WS_DLL_PUBLIC uint64_t
64get_uint64(const char *string, const char *name);
65
66WS_DLL_PUBLIC uint64_t
67get_nonzero_uint64(const char *string, const char *name);
68
69WS_DLL_PUBLIC double
70get_positive_double(const char *string, const char *name);
71
72#ifdef __cplusplus
73}
74#endif /* __cplusplus */
75
76#endif /* __CLOPTS_COMMON_H__ */