REGISTERINETHOST(3N) REGISTERINETHOST(3N)
registerinethost - allocate internet address for workstation
#include <netinet/in.h>
int registerinethost(char *name, char *network, char *netmask,
struct in_addr *inaddr, char *aliases);
Registerinethost sends an internet address allocation request to
registrar(1M) on NIS master via the yp_update(3R) call. This routine
should be used only when NIS is enabled in the network.
The arguments for the routine are:
name The host name to be registered. This name must be unique in
the NIS domain.
network
The internet network number to be used in the allocation. If
the netmask is supplied, this argument should be an internet
address so that the netmask can be applied on.
netmask
The internet netmask. If this argument is not used, i.e. it is
NULL, the parameter network should be a valid internet network
number, e.g. <192.26.61>. If the argument is used, it must be
in the internet standard "." notation, e.g. <255.255.255.128>
and the network parameter must also be a valid internet
address, e.g. <192.26.61.128>.
inaddr
The address of resulting internet address. A NULL indicates
the resulting address is not to be returned.
aliases
The aliases, each separated by spaces, of the host. The maximum
number of characters allowed in the string is MAX_ALIASES
defined in <sun/hostreg.h>. A NULL indicates there will be no
aliases for the host.
Registerinethost returns NULL on successful registration. The
unsuccessful return code are defined in <rpcsvc/ypclnt.h>.
Registerinethost always wait until NIS databases are pushed to all slave
servers.
Page 1
REGISTERINETHOST(3N) REGISTERINETHOST(3N)
SEE ALSO
registrar(1M), yp_update(1M), renamehost(3N), unregisterhost(3N),
yppush(1M)
PPPPaaaaggggeeee 2222 [ Back ]
|