getrpcent(3N) getrpcent(3N)NAME endrpcent, getrpcent, getrpcbyname, getrpcbynumber, setrpcent - get RPC entry SYNOPSIS #include <netdb.h> struct rpcent *getrpcent() struct rpcent *getrpcbyname(name) char *name; struct rpcent *getrpcbynumber(number) int number; setrpcent(stayopen) int stayopen; int endrpcent() DESCRIPTION getrpcent, getrpcbyname, and getrpcbynumber each return a pointer to an object with the following structure containing the broken-out fields of a line in the RPC program number data base, /etc/rpc. struct rpcent { char *r_name; /* name of server */ char **r_aliases; /* alias list */ long r_number; /* rpc program number */ }; The members of this structure are r_name The name of the server for this RPC program. r_aliases A zero terminated list of alternate names for the RPC program. r_number The RPC program number for this service. getrpcent reads the next line of the file, opening the file if necessary. setrpcent opens and rewinds the file. If the stayopen flag is nonzero, the net data base will not be closed after each call to getrpcent (neither directly nor indirectly through one of the other getrpc calls). January 1992 1
getrpcent(3N) getrpcent(3N)endrpcent closes the file. getrpcbyname and getrpcbynumber sequentially search from the beginning of the file until a matching RPC program name or program number is found or until EOF is encountered. STATUS MESSAGES AND VALUES Null pointer (0) returned on EOF or error. LIMITATIONS All information is contained in a static area, so it must be copied if it is to be saved. FILES /etc/rpc Executable file /etc/yp/domainname/rpc.bynumber Executable file SEE ALSO rpcinfo(1M) in A/UX System Administrator's Reference 2 January 1992