13 #ifndef __EXTCAP_BASE_H__
14 #define __EXTCAP_BASE_H__
17 #include <glib/gprintf.h>
34 #define EXTCAP_BASE_OPTIONS_ENUM \
35 EXTCAP_OPT_LIST_INTERFACES, \
37 EXTCAP_OPT_LIST_DLTS, \
38 EXTCAP_OPT_INTERFACE, \
41 EXTCAP_OPT_CAPTURE_FILTER, \
43 EXTCAP_OPT_LOG_LEVEL, \
47 #define EXTCAP_BASE_OPTIONS \
48 { "extcap-interfaces", ws_no_argument, NULL, EXTCAP_OPT_LIST_INTERFACES}, \
49 { "extcap-version", ws_optional_argument, NULL, EXTCAP_OPT_VERSION}, \
50 { "extcap-dlts", ws_no_argument, NULL, EXTCAP_OPT_LIST_DLTS}, \
51 { "extcap-interface", ws_required_argument, NULL, EXTCAP_OPT_INTERFACE}, \
52 { "extcap-config", ws_no_argument, NULL, EXTCAP_OPT_CONFIG}, \
53 { "capture", ws_no_argument, NULL, EXTCAP_OPT_CAPTURE}, \
54 { "extcap-capture-filter", ws_required_argument, NULL, EXTCAP_OPT_CAPTURE_FILTER}, \
55 { "fifo", ws_required_argument, NULL, EXTCAP_OPT_FIFO}, \
56 { "log-level", ws_required_argument, NULL, EXTCAP_OPT_LOG_LEVEL}, \
57 { "log-file", ws_required_argument, NULL, EXTCAP_OPT_LOG_FILE}
64 char * capture_filter;
79 uint8_t do_list_interfaces;
84 enum ws_log_level debug;
88 extern bool extcap_end_application;
90 void extcap_base_register_interface(
extcap_parameters * extcap,
const char * interface,
const char * ifdescription, uint16_t dlt,
const char * dltdescription );
91 void extcap_base_register_interface_ext(
extcap_parameters * extcap,
const char * interface,
const char * ifdescription, uint16_t dlt,
const char * dltname,
const char * dltdescription );
95 bool extcap_base_register_graceful_shutdown_cb(
extcap_parameters * extcap,
void (*callback)(
void));
97 void extcap_base_set_util_info(
extcap_parameters * extcap,
const char * exename,
const char * major,
const char * minor,
const char * release,
const char * helppage);
98 void extcap_base_set_compiled_with(
extcap_parameters * extcap,
const char *fmt, ...);
99 void extcap_base_set_running_with(
extcap_parameters * extcap,
const char *fmt, ...);
100 uint8_t extcap_base_parse_options(
extcap_parameters * extcap,
int result,
char * optargument);
104 void extcap_help_add_option(
extcap_parameters * extcap,
const char * help_option_name,
const char * help_optionn_desc);
107 void extcap_cmdline_debug(
char** ar,
const unsigned n);
108 void extcap_config_debug(
unsigned* count);
109 void extcap_base_help(
void);
110 void extcap_log_init(
const char *progname);
Definition: extcap-base.h:60