dcDCPL_Net.h File Reference

DPWSCore Network Adapter Information Access portability layer. More...

#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.


Detailed Description

DPWSCore Network Adapter Information Access portability layer.


Define Documentation

#define DCPL_GET_ADDR_FAMILY (  )     ((a)->ipv4_addr ? DCPL_AF_INET : DCPL_AF_INET6)

Retrieves the address family for an IP address entry.

#define DCPL_ADDR_IS_IPV4 (  )     ((a)->ipv4_addr)

Tests if an IP address entry is IP V4.

#define DCPL_GET_MULTICAST_NETIF_INDEX (  )     ((a)->ipv4_addr ? (a)->ipv4_addr : (a)->itf_nb)

Retrieves the interface index to use for multicast selection for an IP address entry.


Typedef Documentation

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.


Function Documentation

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).

Parameters:
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.
Returns:
DCPL_OK in cased of success, DCPL_NOT_SUPPORTED_ERROR if the asked filtering is not supported or not relevant for the platform.

int dcpl_free_ip_info ( dcpl_ip_addr_t addrs,
int  nb_addrs 
)

Free memory for the results returned by dcpl_retrieve_ip_info.

Parameters:
addrs The array to free.
nb_addrs The size of the provided addrs array.
Returns:
A DCPL error code.


Variable Documentation

To fill with any interface MAC address.

Used for UUID generation.


Generated on Fri Apr 17 15:18:24 2009 for DPWSCore by  doxygen 1.5.8