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;
88extern bool extcap_end_application;
90void extcap_base_register_interface(
extcap_parameters * extcap,
const char * interface,
const char * ifdescription, uint16_t dlt,
const char * dltdescription );
91void extcap_base_register_interface_ext(
extcap_parameters * extcap,
const char * interface,
const char * ifdescription, uint16_t dlt,
const char * dltname,
const char * dltdescription );
95bool extcap_base_register_graceful_shutdown_cb(
extcap_parameters * extcap,
void (*callback)(
void));
97void extcap_base_set_util_info(
extcap_parameters * extcap,
const char * exename,
const char * major,
const char * minor,
const char * release,
const char * helppage);
98void extcap_base_set_compiled_with(
extcap_parameters * extcap,
const char *fmt, ...);
99void extcap_base_set_running_with(
extcap_parameters * extcap,
const char *fmt, ...);
100uint8_t extcap_base_parse_options(
extcap_parameters * extcap,
int result,
char * optargument);
104void extcap_help_add_option(
extcap_parameters * extcap,
const char * help_option_name,
const char * help_optionn_desc);
107void extcap_cmdline_debug(
char** ar,
const unsigned n);
108void extcap_config_debug(
unsigned* count);
109void extcap_base_help(
void);
110void extcap_log_init(
void);
118void extcap_log_cmdarg_err(
const char *msg_format, va_list ap);
Definition extcap-base.h:60