Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

gethostbyaddr_r(3) OSS Library Calls Reference Manual
Link your application to either:
/G/system/zdllnnn/zinetdll or /G/system/zdllnnn/yinetdll (32-bit or 64-bit INET Sockets |
library)
or
/G/system/zdllnnn/zlwrdll or /G/system/zdllnnn/ylwrdll (32-bit or 64-bit Light Weight |
Resolver library)
If you are using the Light Weight Resolver library, you must also compile your applica-
tion using the #define LWRES macro or an equivalent compiler command option.
If you are using a 64-bit library, you must also compile your application using the |
-Wlp64 compiler command option.
If you are using the Standard POSIX Threads library, you must:
Include the spthread.h header file
Link your application to:
/G/system/sysnn/zsptsrl (G-series)
or
/G/system/zdllnnn/zsptdll (H-series or J-series)
Compile your application using the #define _SPT_MODEL_ macro or an equivalent
compiler command option
If you are using this function in a threaded or 64-bit application in a system running H06.21 or a |
later H-series RVU or J06.10 or a later J-series RVU, you might need to include additional files |
or use additional macros. For more information about threaded and 64-bit applications in the |
OSS environment, see the Open System Services Programmers Guide.
In a threaded environment, the behavior of the application is undetermined if more than one
thread in application is calling different sequences of the sethostent( ), gethostent( ),
gethostent_r( ), gethostbyaddr( ), gethostbyaddr_r( ), gethostbyname( ), gethostbyname_r( ),
or endhostent( ) functions.
RETURN VALUES
Upon successful completion of gethostbyaddr_r( ), a pointer to a hostent structure is returned if
the address was found, and a null pointer if the address was not found. If the call to
gethostbyaddr_r( ) fails, a null pointer is returned. If an entry is found, the pointer returned by
this function points to the same hostent structure as pointed to by the host parameter.
354 Hewlett-Packard Company 527187-017