#include "dc/dc_Types.h"
#include "stdint.h"
Data Structures | |
struct | dcpl_ip_addr |
Result structure that contains retrieved network interface IP information. More... | |
Defines | |
#define | DCPL_GET_ADDR_FAMILY(a) ((a)->ipv4_addr ? DCPL_AF_INET : DCPL_AF_INET6) |
Retrieves the address family for an IP address entry. | |
#define | DCPL_ADDR_IS_IPV4(a) ((a)->ipv4_addr) |
Tests if an IP address entry is IP V4. | |
#define | DCPL_GET_MULTICAST_NETIF_INDEX(a) ((a)->ipv4_addr ? (a)->ipv4_addr : (a)->itf_nb) |
Retrieves the interface index to use for multicast selection for an IP address entry. | |
Typedefs | |
typedef struct dcpl_ip_addr | dcpl_ip_addr_t |
Result structure that contains retrieved network interface IP information. | |
Functions | |
int | dcpl_retrieve_ip_info (dc_ip_filter_t *filter, dcpl_ip_addr_t **result, int *result_nb) |
Retrieves network interface IP information from the system. | |
int | dcpl_free_ip_info (dcpl_ip_addr_t *addrs, int nb_addrs) |
Free memory for the results returned by dcpl_retrieve_ip_info. | |
Variables | |
byte | dcpl_mac_address [6] |
To fill with any interface MAC address. |
#define DCPL_GET_ADDR_FAMILY | ( | a | ) | ((a)->ipv4_addr ? DCPL_AF_INET : DCPL_AF_INET6) |
Retrieves the address family for an IP address entry.
#define DCPL_ADDR_IS_IPV4 | ( | a | ) | ((a)->ipv4_addr) |
Tests if an IP address entry is IP V4.
#define DCPL_GET_MULTICAST_NETIF_INDEX | ( | a | ) | ((a)->ipv4_addr ? (a)->ipv4_addr : (a)->itf_nb) |
Retrieves the interface index to use for multicast selection for an IP address entry.
typedef struct dcpl_ip_addr dcpl_ip_addr_t |
Result structure that contains retrieved network interface IP information.
This flat table format has been chosen for compactness must be ordered by itf_nb.
int dcpl_retrieve_ip_info | ( | dc_ip_filter_t * | filter, | |
dcpl_ip_addr_t ** | result, | |||
int * | result_nb | |||
) |
Retrieves network interface IP information from the system.
This function is expected to be called once by the caller except if dcpl_free_ip_info has been called since (no required re-entrancy).
filter | A filter reducing the number or IP addresses retrieved. If NULL, no filtering should be done and all addresses retrieved. | |
[out] | result | An array of IP addresses ordered by interface. results ordered by itf_nb. The memory allocation is managed by the implementation. |
[out] | result_nb | The size of the return result array. |
int dcpl_free_ip_info | ( | dcpl_ip_addr_t * | addrs, | |
int | nb_addrs | |||
) |
Free memory for the results returned by dcpl_retrieve_ip_info.
addrs | The array to free. | |
nb_addrs | The size of the provided addrs array. |
byte dcpl_mac_address[6] |
To fill with any interface MAC address.
Used for UUID generation.