Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Functions
interface.h File Reference
#include <glib.h>
#include "ws_symbol_export.h"

Go to the source code of this file.

Functions

WS_DLL_PUBLIC GSList * local_interfaces_to_list (void)
 Retrieves a list of local network interface IP addresses.
 

Detailed Description

Utility functions to get infos from interfaces

Copyright 2016, Dario Lombardo

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

Function Documentation

◆ local_interfaces_to_list()

WS_DLL_PUBLIC GSList * local_interfaces_to_list ( void  )

Retrieves a list of local network interface IP addresses.

Enumerates all active local network interfaces and returns a list of their associated IPv4 and IPv6 addresses.

Returns
A GSList containing string representations of IP addresses (IPv4 and IPv6). The list must be freed by the caller using g_slist_free() and g_free() for each element.