aboutsummaryrefslogtreecommitdiffstats
path: root/caputils/capture-pcap-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'caputils/capture-pcap-util.h')
-rw-r--r--caputils/capture-pcap-util.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/caputils/capture-pcap-util.h b/caputils/capture-pcap-util.h
index cfadf3f0bc..b8eb855b0e 100644
--- a/caputils/capture-pcap-util.h
+++ b/caputils/capture-pcap-util.h
@@ -54,10 +54,19 @@ gboolean set_pcap_datalink(pcap_t *pcap_h, int datalink, char *name,
gboolean have_high_resolution_timestamp(pcap_t *pcap_h);
#endif /* HAVE_PCAP_SET_TSTAMP_PRECISION */
+/*
+ * Error values.
+ */
+typedef enum {
+ CAP_DEVICE_OPEN_NO_ERR, /* No error */
+ CAP_DEVICE_OPEN_ERR_PERMISSIONS, /* Error is known to be a permissions error */
+ CAP_DEVICE_OPEN_ERR_NOT_PERMISSIONS, /* Error is known not to be a permissions error */
+ CAP_DEVICE_OPEN_ERR_GENERIC /* Error is not known to be one or the other */
+} cap_device_open_err;
extern if_capabilities_t *get_if_capabilities(interface_options *interface_opts,
- char **err_str);
+ cap_device_open_err *err, char **err_str);
extern pcap_t *open_capture_device(capture_options *capture_opts,
- interface_options *interface_opts, int timeout,
+ interface_options *interface_opts, int timeout, cap_device_open_err *err,
char (*open_err_str)[PCAP_ERRBUF_SIZE]);
#endif /* HAVE_LIBPCAP */