Top | ![]() |
![]() |
![]() |
![]() |
InfIpAddress * | inf_ip_address_new_raw4 () |
InfIpAddress * | inf_ip_address_new_loopback4 () |
InfIpAddress * | inf_ip_address_new_raw6 () |
InfIpAddress * | inf_ip_address_new_loopback6 () |
InfIpAddress * | inf_ip_address_new_from_string () |
InfIpAddress * | inf_ip_address_copy () |
void | inf_ip_address_free () |
InfIpAddressFamily | inf_ip_address_get_family () |
gconstpointer | inf_ip_address_get_raw () |
gchar * | inf_ip_address_to_string () |
int | inf_ip_address_collate () |
A InfIpAddress represents an IPv4 or an IPv6 network address. Use
inf_ip_address_get_family()
to find out the type of a specific address.
InfIpAddress *
inf_ip_address_new_raw4 (guint32 address
);
Creates a new IPv4 address.
[constructor]
InfIpAddress *
inf_ip_address_new_loopback4 (void
);
Creates a new IPv4 address that contains the local host's IP address ("127.0.0.1").
[constructor]
InfIpAddress *
inf_ip_address_new_raw6 (const guint8 address[16]
);
Creates a new IPv6 address.
[constructor]
InfIpAddress *
inf_ip_address_new_loopback6 (void
);
Creates a new IPv6 address that contains the local host's IP address ("::1").
[constructor]
InfIpAddress *
inf_ip_address_new_from_string (const gchar *str
);
Creates a new IP address (either IPv4 or IPv6) from the given string.
[constructor]
InfIpAddress *
inf_ip_address_copy (const InfIpAddress *address
);
Creates a new InfIpAddress that contains the same address as address
.
InfIpAddressFamily
inf_ip_address_get_family (const InfIpAddress *address
);
Returns the address family of address
.
gconstpointer
inf_ip_address_get_raw (const InfIpAddress *address
);
Returns either 32 bit (IPv4) or 128 bit (IPv6) raw address data in host
byte order of address
.
gchar *
inf_ip_address_to_string (const InfIpAddress *address
);
Returns a string representation of address
in standard dots format (like
"192.168.0.1" or "::1").
int inf_ip_address_collate (const InfIpAddress *address1
,const InfIpAddress *address2
);
Compares the two addresses for sorting.
typedef struct _InfIpAddress InfIpAddress;
InfIpAddress is an opaque data type. You should only access it via the public API functions.