lwpa
0.1.0
LightWeight Platform Abstraction (lwpa)
|
View other versions:
|
A platform-neutral method for enumerating network interfaces.
#include "lwpa_netint.h"
Functions | |
size_t | netint_get_num_interfaces () |
Get the number of network interfaces present on the system. More... | |
size_t | netint_get_interfaces (LwpaNetintInfo *netint_arr, size_t netint_arr_size) |
Enumerate the network interfaces on the system. More... | |
bool | netint_get_default_interface (LwpaNetintInfo *netint) |
Get information about the default network interface. More... | |
const LwpaNetintInfo * | netint_get_iface_for_dest (const LwpaIpAddr *dest, const LwpaNetintInfo *netint_arr, size_t netint_arr_size) |
Get the network interface that the system will choose when routing an IP packet to the specified destination. More... | |
bool netint_get_default_interface | ( | LwpaNetintInfo * | netint | ) |
Get information about the default network interface.
Note: If the network interfaces have already been enumerated with netint_get_interfaces(), it is more efficient to inspect the is_default flag of each interface in that existing array.
[out] | netint | Pointer to network interface description struct to fill with the information about the default interface. |
const LwpaNetintInfo* netint_get_iface_for_dest | ( | const LwpaIpAddr * | dest, |
const LwpaNetintInfo * | netint_arr, | ||
size_t | netint_arr_size | ||
) |
Get the network interface that the system will choose when routing an IP packet to the specified destination.
[in] | dest | IP address of the destination. |
[in] | netint_arr | Array of network interface description structs previously populated using netint_get_interfaces(). |
[in] | netint_arr_size | Size of the netint array. |
size_t netint_get_interfaces | ( | LwpaNetintInfo * | netint_arr, |
size_t | netint_arr_size | ||
) |
Enumerate the network interfaces on the system.
[out] | netint_arr | Array of network interface description structs to fill in with interface info. |
[in] | netint_arr_size | Size of the netint array. |
size_t netint_get_num_interfaces | ( | ) |
Get the number of network interfaces present on the system.