This section describes several library routines that can best be described
as name service routines, since they return information based on names,
addresses, and numbers. Each subsection describes a set of five related
intrinsics, as indicated below:
GETHOSTENT GETNETENT GETPROTOENT GETSERVENT
------------- ------------ ---------------- -------------
gethostent getnetent getprotoent getservent
sethostent setnetent setprotoent setservent
gethostbyname getnetbyname getprotobyname getservbyname
gethostbyaddr getnetbyaddr getprotobynumber getservbyport
endhostent endnetent endprotoent endservent
|
These routines are stored
in a native mode relocatable library file and are used for AF_INET
only. The relocatable library file name is SOCKETRL.NET.SYS.
When
linking your programs, you should include this file in the link list. For
example,
link objfile,progfile;rl=socketrl.net.sys,libc.lib.sys
|
Ensure that you link with the POSIX library (/lib/libc.a)
instead of libc.lib.sys for POSIX programs. Note that
if you are using the POSIX library you must use file indirection as
shown in the programming example in Chapter 5.