1 /* capture-pcap-util-int.h
2 * Definitions of routines internal to the libpcap/WinPcap utilities
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later*/
10 #ifndef __PCAP_UTIL_INT_H__
11 #define __PCAP_UTIL_INT_H__
13 extern if_info_t *if_info_new(const char *name, const char *description,
15 extern void if_info_add_address(if_info_t *if_info, struct sockaddr *addr);
16 #ifdef HAVE_PCAP_FINDALLDEVS
17 #ifdef HAVE_PCAP_REMOTE
18 extern GList *get_interface_list_findalldevs_ex(const char *source,
19 struct pcap_rmtauth *auth, int *err, char **err_str);
20 #endif /* HAVE_PCAP_REMOTE */
21 extern GList *get_interface_list_findalldevs(int *err, char **err_str);
22 #endif /* HAVE_PCAP_FINDALLDEVS */
24 #ifdef HAVE_PCAP_SET_TSTAMP_PRECISION
26 * Request that a pcap_t provide high-resolution (nanosecond) time
27 * stamps; if that request fails, we'll just silently continue to
28 * use the microsecond-resolution time stamps, and our caller will
29 * find out, when they call have_high_resolution_timestamp(), that
30 * we don't have high-resolution time stamps.
32 extern void request_high_resolution_timestamp(pcap_t *pcap_h);
35 extern if_capabilities_t *get_if_capabilities_local(interface_options *interface_opts,
37 extern pcap_t *open_capture_device_local(capture_options *capture_opts,
38 interface_options *interface_opts, int timeout,
39 char (*open_err_str)[PCAP_ERRBUF_SIZE]);
40 #ifdef HAVE_PCAP_CREATE
41 extern if_capabilities_t *get_if_capabilities_pcap_create(interface_options *interface_opts,
43 extern pcap_t *open_capture_device_pcap_create(capture_options *capture_opts,
44 interface_options *interface_opts, int timeout,
45 char (*open_err_str)[PCAP_ERRBUF_SIZE]);
46 #endif /* HAVE_PCAP_CREATE */
47 extern if_capabilities_t *get_if_capabilities_pcap_open_live(interface_options *interface_opts,
49 extern pcap_t *open_capture_device_pcap_open_live(interface_options *interface_opts,
50 int timeout, char (*open_err_str)[PCAP_ERRBUF_SIZE]);
53 * Get an error message string for a CANT_GET_INTERFACE_LIST error from
54 * "get_interface_list()". This is used to let the error message string
55 * be platform-dependent.
57 extern gchar *cant_get_if_list_error_message(const char *err_str);
59 #endif /* __PCAP_UTIL_INT_H__ */