Dialogic Dialogic Global Call IP IP Phone User Manual


 
540 Dialogic® Global Call IP Technology Guide — November 2007
Dialogic Corporation
IP_ADDR — local IP address
IP_ADDR
local IP address
typedef struct
{
unsigned char ip_ver;
union
{
unsigned int ipv4;
unsigned int ipv6[4]
}u_ipaddr;
}IP_ADDR, *IP_ADDRP;
Description
The IP_ADDR structure is used to specify a local IP address.
Field Descriptions
The fields of the IP_ADDR data structure are described as follows:
ip_ver
The version of the local IP address. Possible values are:
IPVER4
u_ipaddr
A union that contains the actual address. The datatype is different depending on whether the
address is an IPv4 or an IPv6 address.
Note: IPv6 addresses are not currently supported.
For an IPv4 address, the address must be stored in memory using the network byte order (big
endian) rather than the little-endian byte order of the Dialogic
®
architecture. A socket API,
htonl( ), is available to convert from host byte order to network byte order. As an example, to
specify an IP address of 127.10.20.30, you may use either of the following C statements:
ipv4 = 0x1e140a7f -or-
ipv4 = htonl(0x7f0a141e)
For more information on the byte order of IPv4 addresses, see RFC 791 and RFC 792.