Go to the source code of this file.
|
| void | if_info_add_address (if_info_t *if_info, struct sockaddr *addr) |
| | Adds an address to an interface information structure.
|
| |
| GList * | get_local_interface_list (int *err, char **err_str) |
| | Retrieves a list of local network interfaces.
|
| |
| if_capabilities_t * | get_if_capabilities_local (interface_options *interface_opts, cap_device_open_status *status, char **status_str) |
| | Retrieves local interface capabilities.
|
| |
| pcap_t * | open_capture_device_local (capture_options *capture_opts, interface_options *interface_opts, int timeout, cap_device_open_status *open_status, char(*open_status_str)[PCAP_ERRBUF_SIZE]) |
| | Opens a capture device using pcap_create.
|
| |
| if_capabilities_t * | get_if_capabilities_pcap_create (interface_options *interface_opts, cap_device_open_status *status, char **status_str) |
| | Retrieves capabilities for a network interface using pcap.
|
| |
| pcap_t * | open_capture_device_pcap_create (capture_options *capture_opts, interface_options *interface_opts, int timeout, cap_device_open_status *open_status, char(*open_status_str)[PCAP_ERRBUF_SIZE]) |
| | Open a capture device using pcap_create() with the given options.
|
| |
| char * | cant_get_if_list_error_message (const char *err_str) |
| | Get an error message string for a get_interface_list() CANT_GET_INTERFACE_LIST error.
|
| |
| const char * | get_pcap_failure_secondary_error_message (cap_device_open_status open_status, const char *open_status_str) |
| | Retrieves a secondary error message for a given capture device open status.
|
| |
Definitions of routines internal to the libpcap/WinPcap/Npcap utilities
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
◆ cant_get_if_list_error_message()
| char * cant_get_if_list_error_message |
( |
const char * |
err_str | ) |
|
|
extern |
Get an error message string for a get_interface_list() CANT_GET_INTERFACE_LIST error.
Get an error message string for a CANT_GET_INTERFACE_LIST error from "get_interface_list()". This is used to let the error message string be platform-dependent.
- Parameters
-
| err_str | The error string from the underlying system. |
- Returns
- A pointer to a string containing the error message, or NULL if no additional information is available.
◆ get_if_capabilities_local()
Retrieves local interface capabilities.
- Parameters
-
| interface_opts | Pointer to the interface options structure. |
| status | Pointer to a cap_device_open_status structure that receives the open status. |
| status_str | Pointer to a string that receives an error message if any. |
- Returns
- A pointer to an if_capabilities_t structure representing the local interface capabilities, or NULL on failure.
◆ get_if_capabilities_pcap_create()
Retrieves capabilities for a network interface using pcap.
- Parameters
-
| interface_opts | Pointer to the interface options structure. |
| status | Pointer to a cap_device_open_status structure that receives the open status. |
| status_str | Pointer to a string that receives an error message if any. |
- Returns
- A pointer to an if_capabilities_t structure containing the capabilities, or NULL on failure.
◆ get_local_interface_list()
| GList * get_local_interface_list |
( |
int * |
err, |
|
|
char ** |
err_str |
|
) |
| |
|
extern |
Retrieves a list of local network interfaces.
- Parameters
-
| err | Pointer to an integer that receives an error code. |
| err_str | Pointer to a string that receives an error message. |
- Returns
- A GList containing pointers to if_info_t structures representing the local interfaces, or NULL on failure.
◆ get_pcap_failure_secondary_error_message()
| const char * get_pcap_failure_secondary_error_message |
( |
cap_device_open_status |
open_status, |
|
|
const char * |
open_status_str |
|
) |
| |
|
extern |
Retrieves a secondary error message for a given capture device open status.
Get a longer, secondary error message corresponding to why getting capabilities or opening a device failed. This is used to let the error message string be platform-dependent.
- Parameters
-
| open_status | The capture device open status code. |
| open_status_str | A string representation of the open status. |
- Returns
- A pointer to a constant character string representing the secondary error message, or NULL if none is available.
◆ if_info_add_address()
| void if_info_add_address |
( |
if_info_t * |
if_info, |
|
|
struct sockaddr * |
addr |
|
) |
| |
|
extern |
Adds an address to an interface information structure.
- Parameters
-
| if_info | Pointer to the interface information structure. |
| addr | Pointer to the sockaddr structure containing the address to add. |
◆ open_capture_device_local()
| pcap_t * open_capture_device_local |
( |
capture_options * |
capture_opts, |
|
|
interface_options * |
interface_opts, |
|
|
int |
timeout, |
|
|
cap_device_open_status * |
open_status, |
|
|
char(*) |
open_status_str[PCAP_ERRBUF_SIZE] |
|
) |
| |
|
extern |
Opens a capture device using pcap_create.
- Parameters
-
| capture_opts | Pointer to the capture options structure. |
| interface_opts | Pointer to the interface options structure. |
| timeout | Timeout for the capture operation. |
| open_status | Pointer to the capture device open status structure. |
| open_status_str | Pointer to the buffer for the open status string. |
- Returns
- pcap_t* Pointer to the opened pcap_t structure, or NULL on failure.
◆ open_capture_device_pcap_create()
| pcap_t * open_capture_device_pcap_create |
( |
capture_options * |
capture_opts, |
|
|
interface_options * |
interface_opts, |
|
|
int |
timeout, |
|
|
cap_device_open_status * |
open_status, |
|
|
char(*) |
open_status_str[PCAP_ERRBUF_SIZE] |
|
) |
| |
|
extern |
Open a capture device using pcap_create() with the given options.
- Parameters
-
| capture_opts | Global capture options. |
| interface_opts | Per‑interface capture options. |
| timeout | Timeout (in milliseconds) for packet buffering. |
| open_status | Output parameter describing the open result. |
| open_status_str | Output buffer for a human‑readable status message. |
- Returns
- A pcap_t* handle on success, or NULL on failure.