getrpcent.3 (5a489ac2b83144b08b8f4cbefdf60f397a6aa412) | getrpcent.3 (639460dc29f84085e711dcf1463b179db5a50f87) |
---|---|
1.\" @(#)getrpcent.3n 2.2 88/08/02 4.0 RPCSRC; from 1.11 88/03/14 SMI | 1.\" @(#)getrpcent.3n 2.2 88/08/02 4.0 RPCSRC; from 1.11 88/03/14 SMI |
2.TH GETRPCENT 3 "14 December 1987" 3.SH NAME 4getrpcent, getrpcbyname, getrpcbynumber \- get RPC entry 5.SH SYNOPSIS 6.nf 7.ft B 8#include <netdb.h> 9.LP 10.ft B 11struct rpcent *getrpcent(\|) 12.LP 13.ft B 14struct rpcent *getrpcbyname(name) 15char *name; 16.LP 17.ft B 18struct rpcent *getrpcbynumber(number) 19int number; 20.LP 21.ft B 22setrpcent (stayopen) 23int stayopen 24.LP 25.ft B 26endrpcent (\|) 27.fi 28.SH DESCRIPTION 29.LP 30.BR getrpcent(\|) , 31.BR getrpcbyname(\|) , | 2.Dd "December 14, 1987" 3.Dt GETRPCENT 3 4.Sh NAME 5.Os 6.Nm getrpcent , 7.Nm getrpcbyname , 8.Nm getrpcbynumber 9.Nd get RPC entry 10.Sh SYNOPSIS 11.Fd #include <netdb.h> 12.Ft struct rpcent * 13.Fn getrpcent 14.Ft struct rpcent * 15.Fn getrpcbyname "char *name" 16.Ft struct rpcent * 17.Fn getrpcbynumber "int number" 18.Ft void 19.Fn setrpcent "int stayopen" 20.Ft void 21.Fn endrpcent 22.Sh DESCRIPTION 23The 24.Fn getrpcent , 25.Fn getrpcbyname , |
32and | 26and |
33.B getrpcbynumber(\|) 34each return a pointer to an object with the | 27.Fn getrpcbynumber 28functions each return a pointer to an object with the |
35following structure 36containing the broken-out 37fields of a line in the rpc program number data base, | 29following structure 30containing the broken-out 31fields of a line in the rpc program number data base, |
38.BR /etc/rpc . 39.RS 40.LP 41.nf 42.ft B | 32.Pa /etc/rpc . 33.Bd -literal 34 |
43struct rpcent { 44 char *r_name; /* name of server for this rpc program */ 45 char **r_aliases; /* alias list */ 46 long r_number; /* rpc program number */ 47}; | 35struct rpcent { 36 char *r_name; /* name of server for this rpc program */ 37 char **r_aliases; /* alias list */ 38 long r_number; /* rpc program number */ 39}; |
48.ft R 49.fi 50.RE 51.LP | 40.Ed 41.Pp |
52The members of this structure are: | 42The members of this structure are: |
53.RS 54.PD 0 55.TP 20 56.B r_name | 43.Bl -tag -width r_aliasesxxx 44.It Fa r_name |
57The name of the server for this rpc program. | 45The name of the server for this rpc program. |
58.TP 20 59.B r_aliases | 46.It Fa r_aliases |
60A zero terminated list of alternate names for the rpc program. | 47A zero terminated list of alternate names for the rpc program. |
61.TP 20 62.B r_number | 48.It Fa r_number |
63The rpc program number for this service. | 49The rpc program number for this service. |
64.PD 65.RE 66.LP 67.B getrpcent(\|) 68reads the next line of the file, opening the file if necessary. 69.LP 70.B getrpcent(\|) 71opens and rewinds the file. If the 72.I stayopen | 50.El 51.Pp 52The 53.Fn getrpcent 54function reads the next line of the file, opening the file if necessary. 55The 56.Nm getrpcent 57function opens and rewinds the file. If the 58.Fa stayopen |
73flag is non-zero, 74the net data base will not be closed after each call to | 59flag is non-zero, 60the net data base will not be closed after each call to |
75.B getrpcent(\|) | 61.Fn getrpcent |
76(either directly, or indirectly through one of | 62(either directly, or indirectly through one of |
77the other \*(lqgetrpc\*(rq calls). 78.LP 79.B endrpcent | 63the other 64.Fn getrpcent 65function family. 66.Pp 67.Fn endrpcent |
80closes the file. | 68closes the file. |
81.LP 82.B getrpcbyname(\|) | 69.Pp 70.Fn getrpcbyname |
83and | 71and |
84.B getrpcbynumber(\|) | 72.Fn getrpcbynumber |
85sequentially search from the beginning 86of the file until a matching rpc program name or 87program number is found, or until end-of-file is encountered. | 73sequentially search from the beginning 74of the file until a matching rpc program name or 75program number is found, or until end-of-file is encountered. |
88.SH FILES 89.PD 0 90.TP 20 91.B /etc/rpc 92.PD 93.SH "SEE ALSO" 94.BR rpc (5), 95.BR rpcinfo (8), 96.BR ypserv (8) 97.SH DIAGNOSTICS 98.LP | 76.Sh FILES 77.Bl -tag -width /etc/rpc -compact 78.It Pa /etc/rpc 79.El 80.Sh "SEE ALSO" 81.Xr rpc 5 , 82.Xr rpcinfo 8 , 83.Xr ypserv 8 84.Sh DIAGNOSTICS |
99A | 85A |
100.SM NULL | 86.Dv NULL |
101pointer is returned on | 87pointer is returned on |
102.SM EOF | 88.Dv EOF |
103or error. | 89or error. |
104.SH BUGS 105.LP | 90.Sh BUGS |
106All information 107is contained in a static area 108so it must be copied if it is 109to be saved. | 91All information 92is contained in a static area 93so it must be copied if it is 94to be saved. |