GETRPCENT(3N) COMMAND REFERENCE GETRPCENT(3N) NAME getrpcent, getrpcbyname, getrpcbynumber - 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 endrpcent() DESCRIPTION The routines 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 (Remote Procedure Call) program number data base, /etc/rpc. struct rpcent { char *r_name; /* name of server for this rpc program */ 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. Routine getrpcent reads the next line of the file, opening the file if necessary. Routine setrpcent opens and rewinds the file. If the stayopen flag is non-zero, the net data base is not closed after each call to getrpcent (either directly, or indirectly through one of the other getrpc calls). Printed 5/12/88 1
GETRPCENT(3N) COMMAND REFERENCE GETRPCENT(3N) Routine endrpcent closes the file. The routines getrpcbyname and getrpcbynumber sequentially search from the beginning of the file until a matching RPC program name or program number is found, or until end-of- file is encountered. FILES /etc/rpc RPC program number data base /etc/yp/domainname/rpc.bynumber Yellow Pages RPC program number data base, where domainname is the name of your host. RETURN VALUE Null pointer (0) returned on end-of-file or error. CAVEATS All information is contained in a static area so it must be copied if it is to be saved. SEE ALSO rpc(5), rpcinfo(8), ypservices(8). Printed 5/12/88 2
%%index%% na:384,107; sy:491,2007; de:2498,1377;4331,328; fi:4659,394; rv:5053,180; ca:5233,178; se:5411,193; %%index%%000000000133