Wireshark  4.3.0
The Wireshark network protocol analyzer
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
18 extern "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 
43 WS_DLL_PUBLIC int
44 get_natural_int(const char *string, const char *name);
45 
46 WS_DLL_PUBLIC int
47 get_positive_int(const char *string, const char *name);
48 
49 WS_DLL_PUBLIC uint32_t
50 get_guint32(const char *string, const char *name);
51 
52 WS_DLL_PUBLIC uint32_t
53 get_nonzero_guint32(const char *string, const char *name);
54 
55 WS_DLL_PUBLIC double
56 get_positive_double(const char *string, const char *name);
57 
58 #ifdef __cplusplus
59 }
60 #endif /* __cplusplus */
61 
62 #endif /* __CLOPTS_COMMON_H__ */