12#ifndef __CAPTURE_PCAP_UTIL_H__
13#define __CAPTURE_PCAP_UTIL_H__
37#define MIN_PACKET_SIZE 1
39GList *get_interface_list(
int *err,
char **err_str);
40#ifdef HAVE_PCAP_REMOTE
41GList *get_remote_interface_list(
const char *hostname,
const char *port,
42 int auth_type,
const char *username,
43 const char *passwd,
int *err,
char **err_str);
46const char *linktype_val_to_name(
int dlt);
47int linktype_name_to_val(
const char *linktype);
49int get_pcap_datalink(pcap_t *pch,
const char *devicename);
51bool set_pcap_datalink(pcap_t *pcap_h,
int datalink,
char *name,
52 char *errmsg,
size_t errmsg_len,
53 char *secondary_errmsg,
size_t secondary_errmsg_len);
55#ifdef HAVE_PCAP_SET_TSTAMP_PRECISION
60bool have_high_resolution_timestamp(pcap_t *pcap_h);
68 CAP_DEVICE_OPEN_NO_ERR,
71 CAP_DEVICE_OPEN_ERROR_NO_SUCH_DEVICE,
72 CAP_DEVICE_OPEN_ERROR_RFMON_NOTSUP,
73 CAP_DEVICE_OPEN_ERROR_PERM_DENIED,
74 CAP_DEVICE_OPEN_ERROR_IFACE_NOT_UP,
75 CAP_DEVICE_OPEN_ERROR_PROMISC_PERM_DENIED,
78 CAP_DEVICE_OPEN_ERROR_OTHER,
81 CAP_DEVICE_OPEN_ERROR_GENERIC,
84 CAP_DEVICE_OPEN_WARNING_PROMISC_NOTSUP,
85 CAP_DEVICE_OPEN_WARNING_TSTAMP_TYPE_NOTSUP,
88 CAP_DEVICE_OPEN_WARNING_OTHER
89} cap_device_open_status;
91 cap_device_open_status *status,
char **status_str);
94 int timeout, cap_device_open_status *open_status,
95 char (*open_status_str)[PCAP_ERRBUF_SIZE]);
99extern void gather_caplibs_compile_info(feature_list l);
108extern void gather_caplibs_runtime_info(feature_list l);
111extern bool caplibs_have_npcap(
void);
112extern bool caplibs_get_npcap_version(
unsigned int *major,
113 unsigned int *minor);
Definition capture_opts.h:248
Definition capture_ifinfo.h:43
Definition capture_opts.h:196