nlGetNameFromAddr, nlGetNameFromAddrAsync

resolves a name from an address

C Specification

NLchar * nlGetNameFromAddr(const NLaddress * address, NLchar *name)

NLboolean nlGetNameFromAddrAsync(const NLaddress * address, NLchar *name)

Parameters

address

[in]Specifies a pointer to the address.

name

[out]Specifies a pointer to the name string allocated by the caller.

Description

nlGetNameFromAddr and nlGetNameFromAddrAsync resolve address to a name. name MUST be allocated NL_MAX_STRING_LENGTH bytes. If address cannot be resolved, then nlAddrToString will be called to fill in name. When nlGetNameFromAddrAsync is called, it will intialize name to all '\0'. You can check to see if nlGetNameFromAddrAsync is done by checking the length of name, or simply check to see if name[0] == '\0'.

Return values

nlGetNameFromAddr returns a pointer to name if no error occurs, otherwise it returns NULL, and the specific error code can be retrieved by calling nlGetError

nlGetNameFromAddrAsync returns NL_TRUE if no error occurs, otherwise it returns NL_FALSE, and the specific error code can be retrieved by calling nlGetError

Error codes

NL_NULL_POINTER : A NULL pointer was passed to this function.
NL_OUT_OF_MEMORY : Not enough memory.
NL_SYSTEM_ERROR : A system Socket error has ocurred. The system error can be retrieved by calling nlGetSystemError.

See also

nlAddrToString,
nlStringToAddr,
nlGetAddrFromName,
nlGetAddrFromNameAsync


Back to the HawkNL index page


Go directly to the main HawkNL page at Hawk Software

© 2000-2002 Phil Frisbie.

Valid XHTML 1.0!