#include <glib.h>
Go to the source code of this file.
|
|
#define | CANT_GET_INTERFACE_LIST 1 /* error getting list */ |
| |
|
#define | DONT_HAVE_PCAP 2 /* couldn't load WinPcap/Npcap */ |
| |
|
| enum | interface_type {
IF_WIRED = 0
, IF_AIRPCAP = 1
, IF_PIPE = 2
, IF_STDIN = 3
,
IF_BLUETOOTH = 4
, IF_WIRELESS = 5
, IF_DIALUP = 6
, IF_USB = 7
,
IF_EXTCAP = 8
, IF_VIRTUAL = 9
, IF_LOOPBACK = 10
, IF_TUNNEL = 11
} |
| |
| enum | if_address_type { IF_AT_IPv4
, IF_AT_IPv6
} |
| | Enumeration of supported interface address types. More...
|
| |
|
| GList * | deserialize_interface_list (char *data, int *err, char **err_str) |
| | Deserialize a serialized interface list into a GList.
|
| |
| GList * | capture_interface_list (const char *app_name, int *err, char **err_str, void(*update_cb)(void)) |
| | Get the list of capture interfaces.
|
| |
| void | free_interface_list (GList *if_list) |
| | Free an interface list.
|
| |
| GList * | interface_list_copy (GList *if_list) |
| | Deep copy an interface list.
|
| |
| if_info_t * | if_info_get (const char *name) |
| | Get an if_info_t for a particular interface.
|
| |
| void | if_info_free (if_info_t *if_info) |
| | Free an if_info_t.
|
| |
| if_info_t * | if_info_copy (const if_info_t *if_info) |
| | Deep copy an if_info_t.
|
| |
| if_addr_t * | if_addr_copy (const if_addr_t *if_addr) |
| | Deep copy an if_addr_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)) |
| |
| 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)) |
| |
| void | free_if_capabilities (if_capabilities_t *caps) |
| | Frees the memory allocated for interface capabilities.
|
| |
Definitions for routines to get information about capture interfaces
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
◆ if_address_type
Enumeration of supported interface address types.
Used to indicate whether an address is IPv4 or IPv6.
| Enumerator |
|---|
| IF_AT_IPv4 | IPv4 address (4 bytes).
|
| IF_AT_IPv6 | IPv6 address (16 bytes).
|
◆ capture_get_if_capabilities()
| 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(*)(void) |
update_cb |
|
) |
| |
|
extern |
Fetch the linktype list for the specified interface from a child process.
◆ capture_get_if_list_capabilities()
| GHashTable * capture_get_if_list_capabilities |
( |
const char * |
app_name, |
|
|
GList * |
if_cap_queries, |
|
|
char ** |
err_primary_msg, |
|
|
char ** |
err_secondary_msg, |
|
|
void(*)(void) |
update_cb |
|
) |
| |
|
extern |
Fetch the linktype list for the specified interface from a child process.
◆ capture_interface_list()
| GList * capture_interface_list |
( |
const char * |
app_name, |
|
|
int * |
err, |
|
|
char ** |
err_str, |
|
|
void(*)(void) |
update_cb |
|
) |
| |
|
extern |
Get the list of capture interfaces.
This function retrieves the list of available capture interfaces, including local, remote, and extcap interfaces. It uses dumpcap to fetch local interfaces and appends remote and extcap interfaces to the list.
- Parameters
-
| app_name | The name of the application requesting the interface list. |
| err | Pointer to an integer that will receive an error code if an error occurs. |
| err_str | Pointer to a string that will receive an error message if an error occurs. |
| update_cb | Callback function to update the UI during the process. |
- Returns
- A GList containing if_info_t structs if successful, or NULL on failure.
◆ deserialize_interface_list()
| GList * deserialize_interface_list |
( |
char * |
data, |
|
|
int * |
err, |
|
|
char ** |
err_str |
|
) |
| |
|
extern |
Deserialize a serialized interface list into a GList.
- Parameters
-
| data | Serialized input buffer containing the interface list. |
| err | Pointer to an integer set to an error code on failure. |
| err_str | Pointer to a string set to a descriptive error message on failure. |
- Returns
- A GList of deserialized interface entries, or NULL on error.
◆ free_if_capabilities()
Frees the memory allocated for interface capabilities.
- Parameters
-
◆ free_interface_list()
| void free_interface_list |
( |
GList * |
if_list | ) |
|
Free an interface list.
- Parameters
-
| if_list | The interface list to free. |
◆ if_addr_copy()
Deep copy an if_addr_t.
- Parameters
-
- Returns
- A new if_addr_t structure containing a copy of the original information.
◆ if_info_copy()
Deep copy an if_info_t.
- Parameters
-
- Returns
- A new if_info_t structure containing a copy of the original information.
◆ if_info_free()
◆ if_info_get()
Get an if_info_t for a particular interface.
- Parameters
-
| name | The name of the interface to retrieve information for. |
- Returns
- An allocated if_info_t structure containing information about the interface, or NULL if the interface is not found or an error occurs.
- Note
- May require privilege, so should only be used by dumpcap.
◆ interface_list_copy()
| GList * interface_list_copy |
( |
GList * |
if_list | ) |
|
Deep copy an interface list.
- Parameters
-
| if_list | The interface list to copy. |
- Returns
- A new GList containing copies of the interface information.