Copyright (C) 2000-2012 |
Manpages GETRPCENTSection: Network Functions (3N)Updated: 1987-12-14 Index Return to Main Contents NAMEgetrpcent, getrpcbyname, getrpcbynumber - get RPC entrySYNOPSIS#include <netdb.h> struct rpcent *getrpcent() struct rpcent *getrpcbyname(name) char *name; struct rpcent *getrpcbynumber(number) int number; setrpcent (stayopen) int stayopen endrpcent () DESCRIPTIONgetrpcent(), 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.
The members of this structure are:
getrpcent() reads the next line of the file, opening the file if necessary. getrpcent() opens and rewinds the file. If the stayopen flag is non-zero, the net data base will not be closed after each call to getrpcent() (either directly, or indirectly through one of the other ``getrpc'' calls). 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 end-of-file is encountered. FILES
SEE ALSOrpc(5), rpcinfo(8C), ypserv(8)DIAGNOSTICSA NULL pointer is returned on EOF or error. BUGSAll information is contained in a static area so it must be copied if it is to be saved.
IndexThis document was created by man2html, using the manual pages. Time: 11:02:15 GMT, April 20, 2024 |