Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (g - h) gethostbyname_r(3)
NAME
gethostbyname_r - Gets a host entry by name (reentrant)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
32-bit H-series and J-series OSS processes that do not use the Standard POSIX Thread library: |
/G/system/zdllnnn/zinetdll (INET Sockets library) or |
/G/system/zdllnnn/zlwrdll (Light Weight Resolver library) |
64-bit H-series and J-series OSS processes that do not use the Standard POSIX Thread library: |
/G/system/zdllnnn/yinetdll (INET Sockets library) or |
/G/system/zdllnnn/ylwrdll (Light Weight Resolver library) |
H-series and J-series OSS processes that use the Standard POSIX Thread library:
/G/system/zdllnnn/zsptdll
(See NOTES)
SYNOPSIS
Synopsis for INET Sockets library
[#include <sys/socket.h>]
#include <netdb.h>
[#include <spthread.h>] /* Required if using Standard POSIX Threads Library */
/* Do not use for other libraries */
struct hostent *gethostbyname_r (
const char *name,
struct hostent *host,
char *buffer,
int buflen,
int *h_errnop);
Synopsis for Light Weight Resolver library
#define LWRES
#include <netdb.h>
struct hostent *gethostbyname_r (
const char *name,
struct hostent *host,
char *buffer,
int buflen,
int *h_errnop);
PARAMETERS
name Points to the official name or an alias of the host whose Internet address is to be
found.
host Points to a struct hostent structure allocated by the caller.
buffer Points to the buffer supplied by the caller and used as a storage space for host
data.
buflen Specifies the size of the buffer passed in bytes. For H06.21 and later H-series
RVUs and J06.10 and later J-series RVUs, HP recommends that this buffer be at
least equal to the size of the hostent_data structure.
527187-017 Hewlett-Packard Company 3−61