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