Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
capture_ifinfo.h
Go to the documentation of this file.
1
12#ifndef __CAPTURE_IFINFO_H__
13#define __CAPTURE_IFINFO_H__
14
15#include <glib.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
39
55
56
70
80
87typedef struct {
89 union {
90 uint32_t ip4_addr;
91 uint8_t ip6_addr[16];
92 } addr;
93} if_addr_t;
94
104extern GList *deserialize_interface_list(char *data, int *err, char **err_str);
105
119extern GList *capture_interface_list(const char* app_name, int *err, char **err_str, void (*update_cb)(void));
120
121/* Error values from "get_interface_list()/capture_interface_list()". */
122#define CANT_GET_INTERFACE_LIST 1 /* error getting list */
123#define DONT_HAVE_PCAP 2 /* couldn't load WinPcap/Npcap */
124
130void free_interface_list(GList *if_list);
131
137GList * interface_list_copy(GList *if_list);
138
145extern if_info_t *if_info_get(const char *name);
146
152
159
166
170typedef struct {
171 const char *name;
173 const char *auth_username;
174 const char *auth_password;
176
180typedef struct {
181 int dlt;
182 char *name;
185
189typedef struct {
190 char *name;
193
197extern if_capabilities_t *
198capture_get_if_capabilities(const char* app_name, const char *devname, bool monitor_mode,
199 const char *auth_string,
200 char **err_primary_msg, char **err_secondary_msg,
201 void (*update_cb)(void));
202
206extern GHashTable *
207capture_get_if_list_capabilities(const char* app_name, GList *if_cap_queries,
208 char **err_primary_msg, char **err_secondary_msg,
209 void (*update_cb)(void));
210
217
218#ifdef HAVE_PCAP_REMOTE
219void add_interface_to_remote_list(if_info_t *if_info);
220
221GList* append_remote_list(GList *iflist);
222#endif
223
224#ifdef __cplusplus
225}
226#endif /* __cplusplus */
227
228#endif /* __CAPTURE_IFINFO_H__ */
void free_interface_list(GList *if_list)
Free an interface list.
GHashTable * capture_get_if_list_capabilities(const char *app_name, GList *if_cap_queries, char **err_primary_msg, char **err_secondary_msg, void(*update_cb)(void))
if_info_t * if_info_copy(const if_info_t *if_info)
Deep copy an if_info_t.
if_capabilities_t * capture_get_if_capabilities(const char *app_name, const char *devname, bool monitor_mode, const char *auth_string, char **err_primary_msg, char **err_secondary_msg, void(*update_cb)(void))
void free_if_capabilities(if_capabilities_t *caps)
Frees the memory allocated for interface capabilities.
GList * capture_interface_list(const char *app_name, int *err, char **err_str, void(*update_cb)(void))
Get the list of capture interfaces.
if_addr_t * if_addr_copy(const if_addr_t *if_addr)
Deep copy an if_addr_t.
GList * interface_list_copy(GList *if_list)
Deep copy an interface list.
if_address_type
Enumeration of supported interface address types.
Definition capture_ifinfo.h:76
@ IF_AT_IPv6
Definition capture_ifinfo.h:78
@ IF_AT_IPv4
Definition capture_ifinfo.h:77
if_info_t * if_info_get(const char *name)
Get an if_info_t for a particular interface.
interface_type
Represents the type of a capture interface, with explicit integer values that are exposed in the pref...
Definition capture_ifinfo.h:25
@ IF_TUNNEL
Definition capture_ifinfo.h:37
@ IF_BLUETOOTH
Definition capture_ifinfo.h:30
@ IF_USB
Definition capture_ifinfo.h:33
@ IF_WIRED
Definition capture_ifinfo.h:26
@ IF_PIPE
Definition capture_ifinfo.h:28
@ IF_VIRTUAL
Definition capture_ifinfo.h:35
@ IF_AIRPCAP
Definition capture_ifinfo.h:27
@ IF_EXTCAP
Definition capture_ifinfo.h:34
@ IF_WIRELESS
Definition capture_ifinfo.h:31
@ IF_STDIN
Definition capture_ifinfo.h:29
@ IF_DIALUP
Definition capture_ifinfo.h:32
@ IF_LOOPBACK
Definition capture_ifinfo.h:36
void if_info_free(if_info_t *if_info)
Free an if_info_t.
GList * deserialize_interface_list(char *data, int *err, char **err_str)
Deserialize a serialized interface list into a GList.
Represents an IP address in an interface address list.
Definition capture_ifinfo.h:87
if_address_type ifat_type
Definition capture_ifinfo.h:88
uint32_t ip4_addr
Definition capture_ifinfo.h:90
Parameters passed to the interface capabilities query functions.
Definition capture_ifinfo.h:170
const char * name
Definition capture_ifinfo.h:171
bool monitor_mode
Definition capture_ifinfo.h:172
const char * auth_username
Definition capture_ifinfo.h:173
const char * auth_password
Definition capture_ifinfo.h:174
Describes the capabilities of a single capture interface.
Definition capture_ifinfo.h:46
GList * timestamp_types
Definition capture_ifinfo.h:50
int status
Definition capture_ifinfo.h:51
char * primary_msg
Definition capture_ifinfo.h:52
GList * data_link_types
Definition capture_ifinfo.h:48
GList * data_link_types_rfmon
Definition capture_ifinfo.h:49
const char * secondary_msg
Definition capture_ifinfo.h:53
bool can_set_rfmon
Definition capture_ifinfo.h:47
Describes a single network interface returned by get_interface_list().
Definition capture_ifinfo.h:60
char * extcap
Definition capture_ifinfo.h:67
interface_type type
Definition capture_ifinfo.h:65
char * vendor_description
Definition capture_ifinfo.h:63
char * friendly_name
Definition capture_ifinfo.h:62
char * name
Definition capture_ifinfo.h:61
if_capabilities_t * caps
Definition capture_ifinfo.h:68
bool loopback
Definition capture_ifinfo.h:66
GSList * addrs
Definition capture_ifinfo.h:64
Definition iptrace.c:70
Describes a single timestamp source available on a capture interface.
Definition capture_ifinfo.h:189
char * name
Definition capture_ifinfo.h:190
char * description
Definition capture_ifinfo.h:191