OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [librpc/] [src/] [rpc/] [getrpcent.3] - Blame information for rev 493

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.