Function

Ibisdcc_host_to_string

since: 0.14

Declaration [src]

char*
ibis_dcc_host_to_string (
  GInetAddress* address
)

Description [src]

Serializes the address to the correct format.

The host parameter of a DCC request is the integer representation for IPv4 and the hex representation for IPv6. This function will serialize address to the correct format.

For an IPv4 address like 127.0.0.1 this will be serialized to 2130706433 and for an IPv6 address this will return normal hexadecimal representation.

Available since: 0.14

Parameters

address

Type: GInetAddress

The host address.

The data is owned by the caller of the function.

Return value

Type: char*

The value if serialization was successful.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.