version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
GETRPCENT |
|
|
2 |
!!!GETRPCENT |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
FILES |
|
|
7 |
SEE ALSO |
|
|
8 |
DIAGNOSTICS |
|
|
9 |
BUGS |
|
|
10 |
---- |
|
|
11 |
!!NAME |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
getrpcent, getrpcbyname, getrpcbynumber - get RPC entry |
|
|
15 |
!!SYNOPSIS |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
__#include |
|
|
19 |
__ |
|
|
20 |
!!DESCRIPTION |
|
|
21 |
|
|
|
22 |
|
|
|
23 |
__getrpcent()__, __getrpcbyname()__, and |
|
|
24 |
__getrpcbynumber()__ each return a pointer to an object |
|
|
25 |
with the following structure containing the broken-out |
|
|
26 |
fields of a line in the rpc program number data base, |
|
|
27 |
__/etc/rpc__. |
|
|
28 |
|
|
|
29 |
|
|
|
30 |
__struct rpcent { |
|
|
31 |
char *r_name; /* name of server for this rpc program */ |
|
|
32 |
char **r_aliases; /* alias list */ |
|
|
33 |
long r_number; /* rpc program number */ |
|
|
34 |
}; |
|
|
35 |
__ |
|
|
36 |
|
|
|
37 |
|
|
|
38 |
The members of this structure are: |
|
|
39 |
|
|
|
40 |
|
|
|
41 |
__r_name__ |
|
|
42 |
|
|
|
43 |
|
|
|
44 |
The name of the server for this rpc program. |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
__r_aliases__ |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
A zero terminated list of alternate names for the rpc |
|
|
51 |
program. |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
__r_number__ |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
The rpc program number for this service. |
|
|
58 |
|
|
|
59 |
|
|
|
60 |
__getrpcent()__ reads the next line of the file, opening |
|
|
61 |
the file if necessary. |
|
|
62 |
|
|
|
63 |
|
|
|
64 |
__getrpcent()__ opens and rewinds the file. If the |
|
|
65 |
''stayopen'' flag is non-zero, the net data base will not |
|
|
66 |
be closed after each call to __getrpcent()__ (either |
|
|
67 |
directly, or indirectly through one of the other ``getrpc'' |
|
|
68 |
calls). |
|
|
69 |
|
|
|
70 |
|
|
|
71 |
__endrpcent__ closes the file. |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
__getrpcbyname()__ and __getrpcbynumber()__ |
|
|
75 |
sequentially search from the beginning of the file until a |
|
|
76 |
matching rpc program name or program number is found, or |
|
|
77 |
until end-of-file is encountered. |
|
|
78 |
!!FILES |
|
|
79 |
|
|
|
80 |
|
|
|
81 |
__/etc/rpc__ |
|
|
82 |
!!SEE ALSO |
|
|
83 |
|
|
|
84 |
|
|
|
85 |
rpc(5), __rpcinfo__(8C), |
|
|
86 |
ypserv(8) |
|
|
87 |
!!DIAGNOSTICS |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
A NULL pointer is returned on |
|
|
91 |
EOF or error. |
|
|
92 |
!!BUGS |
|
|
93 |
|
|
|
94 |
|
|
|
95 |
All information is contained in a static area so it must be |
|
|
96 |
copied if it is to be saved. |
|
|
97 |
---- |