#include <dolphin/ip.h>
void IPEnumAddresses ( IPInterface* interface, BOOL (*callback)(int
af, const void* addr) );
IPEnumAddresses() gets the IP addresses assigned to the
interface. An IP address is notified by the callback function of IPEnumAddresses()
as the argument addr. To get other IP addresses,
let the callback function return TRUE, then the callback function will be called with
another IP address. After all IP addresses are notified, the final callback function
is called. In the final callback function, the IP address addr
is set to NULL and the address family af is
SO_AF_UNSPEC. To stop notifying addresses intentionally,
let the callback function return FALSE.
interface |
Pointer to IPInterface to get the the MAC address. Use NULL
to specify the default network interface. |
callback |
The callback function. |
addr |
Pointer to an IP address assigned to the interface. (IPv4, IPv6
link-local, or IPv6 global address)IPv4 address (SOInAddr) is
4 bytes, while IPv6 address (SOIn6Addr)
is 16 bytes. |
af |
The address family of the IP address. SO_PF_INET and SO_PF_INET6
represent IPv4 and IPv6 address families, respectively. SO_AF_UNSPEC
indicates that all IP addresses are informed. |
None.