getrpcent.3n

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3N 代码 · 共 150 行

3N
150
字号
.\" SCCSID: @(#)getrpcent.3n	8.1	9/11/90.\".TH getrpcent 3n.SH Namegetrpcent, getrpcbynumber, getrpcbyname, setrpcent, endrpcent \- get rpc entry.SH Syntax.nf.B #include <netdb.h>.PP.B struct rpcent *getrpcent().PP.B struct rpcent *getrpcbynumber(\fInumber\fP).B int \fInumber\fP;.PP.B struct rpcent *getrpcbyname(\fIname\fP).B char *\fIname\fP;.PP.B setrpcent(\fIstayopen\fP).br.B int \fIstayopen\fP;.PP.B endrpcent( ).fi.SH Description.NXR "getrpcent subroutine".NXR "getrpcbynumber subroutine".NXR "getrpcbyname subroutine".NXR "setrpcent subroutine".NXR "endrpcent subroutine".NXR "group file (general)" "getting entry"The.PN getrpcent ,.PN getrpcbynumberand.PN getrpcbynamesubroutines each return pointersto an objectwith the following structurecontaining the broken-outfields of a line in the rpc database:.EX.nfstruct  rpcent {               /* see getrpcent(3) */        char    *r_name;        char    **r_aliases;   /* alias list */        char    r_number;      /* rpc program number */};struct group *getrpcent(), *getrpcbynumber(), *getrpcbyname();.fi.EE.PPThe members of this structure are:.TP \w'r_aliases'u+2nr_nameThe name of the rpc..br.ns.TP \w'_aliases'u+2nr_aliasesA zero-terminated list of alternate names for the rpc..br.ns.TP \w'r_aliases'u+2nr_numberThe rpc program number for the rpc..PPIf the \fIstayopen\fP flag on the.PN setrpcentsubroutine is NULL, the .PN rpcdatabase is opened.  Otherwise the .PN setrpcenthas the effect of rewinding the .PN rpcdatabase.The.PN endrpcentmay be called toclose the .PN rpc file when processing is complete..PPThe.PN getrpcentsubroutine simply reads the nextline while.PN getrpcbynumberand.PN getrpcbynamesearch until a matching.I gidor.I nameis found(or until EOF is encountered).The.PN getrpcentsubroutine keeps a pointer in the database, allowingsuccessive calls to be used to search the entire file..PPA call to .PN setrpcentmust be made before a .PN whileloop using .PN getrpcentin order to perform initialization and an.PN endrpcentmust be used after the loop.  Both.PN getrpcbynumberand .PN getrpcbynamemake calls to .PN setrpcent and .PN endrpcent ..SH Restrictions.NXR "getrpcent subroutine" "restrictions"All informationis contained in a static areaso it must be copied if it isto be saved..PPIf YP is running, .PN getrpcentdoes not return the entries in any particular order.See the .I Guide to the Yellow Pages Servicefor setup information..PPThe .PN rpcdatabase may also be distributed by the BIND/Hesiodnaming service.  See the.I Guide to the BIND/Hesiod Servicefor more information..SH Return ValuesA null pointer(0) is returned on EOF or error..SH Files.PN /etc/rpc.SH See Alsorpc(5), svc.conf(5).br.I Guide to the BIND/Hesiod Service.br.I Guide to the Yellow Pages Service   

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?