OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [net-common-tcpip-manpages-getprotoent.html] - Blame information for rev 600

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

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>getprotoent</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
22
TITLE="TCP/IP Library Reference"
23
HREF="tcpip-library-reference.html"><LINK
24
REL="PREVIOUS"
25
TITLE="getnetent"
26
HREF="net-common-tcpip-manpages-getnetent.html"><LINK
27
REL="NEXT"
28
TITLE="getrrsetbyname"
29
HREF="net-common-tcpip-manpages-getrrsetbyname.html"></HEAD
30
><BODY
31
CLASS="SECT1"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="net-common-tcpip-manpages-getnetent.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
>Chapter 38. TCP/IP Library Reference</TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="net-common-tcpip-manpages-getrrsetbyname.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><DIV
81
CLASS="SECT1"
82
><H1
83
CLASS="SECT1"
84
><A
85
NAME="NET-COMMON-TCPIP-MANPAGES-GETPROTOENT">getprotoent</H1
86
><TABLE
87
BORDER="5"
88
BGCOLOR="#E0E0F0"
89
WIDTH="70%"
90
><TR
91
><TD
92
><PRE
93
CLASS="SCREEN"
94
>GETPROTOENT(3)          System Library Functions Manual         GETPROTOENT(3)
95
 
96
NAME
97
     getprotoent, getprotobynumber, getprotobyname, setprotoent, endprotoent -
98
     get protocol entry
99
 
100
SYNOPSIS
101
     #include &lt;netdb.h&#62;
102
 
103
     struct protoent *
104
     getprotoent(void);
105
 
106
     struct protoent *
107
     getprotobyname(char *name);
108
 
109
     struct protoent *
110
     getprotobynumber(int proto);
111
 
112
     void
113
     setprotoent(int stayopen);
114
 
115
     void
116
     endprotoent(void);
117
 
118
DESCRIPTION
119
     The getprotoent(), getprotobyname(), and getprotobynumber() functions
120
     each return a pointer to an object with the following structure contain-
121
     ing the broken-out fields of a line in the network protocol database,
122
     /etc/protocols.
123
 
124
 
125
           struct  protoent {
126
                   char    *p_name;        /* official name of protocol */
127
                   char    **p_aliases;    /* alias list */
128
                   int     p_proto;        /* protocol number */
129
           };
130
 
131
     The members of this structure are:
132
 
133
     p_name     The official name of the protocol.
134
 
135
     p_aliases  A zero-terminated list of alternate names for the protocol.
136
 
137
     p_proto    The protocol number.
138
 
139
     The getprotoent() function reads the next line of the file, opening the
140
     file if necessary.
141
 
142
     The setprotoent() function opens and rewinds the file.  If the stayopen
143
     flag is non-zero, the net database will not be closed after each call to
144
     getprotobyname() or getprotobynumber().
145
 
146
     The endprotoent() function closes the file.
147
 
148
     The getprotobyname() and getprotobynumber() functions sequentially search
149
     from the beginning of the file until a matching protocol name or protocol
150
     number is found, or until EOF is encountered.
151
 
152
RETURN VALUES
153
     Null pointer (0) returned on EOF or error.
154
 
155
FILES
156
     /etc/protocols
157
 
158
SEE ALSO
159
     protocols(5)
160
 
161
HISTORY
162
     The getprotoent(), getprotobynumber(), getprotobyname(), setprotoent(),
163
     and endprotoent() functions appeared in 4.2BSD.
164
 
165
BUGS
166
     These functions use a static data space; if the data is needed for future
167
     use, it should be copied before any subsequent calls overwrite it.  Only
168
     the Internet protocols are currently understood.
169
 
170
BSD                              June 4, 1993                              BSD
171
    </PRE
172
></TD
173
></TR
174
></TABLE
175
></DIV
176
><DIV
177
CLASS="NAVFOOTER"
178
><HR
179
ALIGN="LEFT"
180
WIDTH="100%"><TABLE
181
SUMMARY="Footer navigation table"
182
WIDTH="100%"
183
BORDER="0"
184
CELLPADDING="0"
185
CELLSPACING="0"
186
><TR
187
><TD
188
WIDTH="33%"
189
ALIGN="left"
190
VALIGN="top"
191
><A
192
HREF="net-common-tcpip-manpages-getnetent.html"
193
ACCESSKEY="P"
194
>Prev</A
195
></TD
196
><TD
197
WIDTH="34%"
198
ALIGN="center"
199
VALIGN="top"
200
><A
201
HREF="ecos-ref.html"
202
ACCESSKEY="H"
203
>Home</A
204
></TD
205
><TD
206
WIDTH="33%"
207
ALIGN="right"
208
VALIGN="top"
209
><A
210
HREF="net-common-tcpip-manpages-getrrsetbyname.html"
211
ACCESSKEY="N"
212
>Next</A
213
></TD
214
></TR
215
><TR
216
><TD
217
WIDTH="33%"
218
ALIGN="left"
219
VALIGN="top"
220
>getnetent</TD
221
><TD
222
WIDTH="34%"
223
ALIGN="center"
224
VALIGN="top"
225
><A
226
HREF="tcpip-library-reference.html"
227
ACCESSKEY="U"
228
>Up</A
229
></TD
230
><TD
231
WIDTH="33%"
232
ALIGN="right"
233
VALIGN="top"
234
>getrrsetbyname</TD
235
></TR
236
></TABLE
237
></DIV
238
></BODY
239
></HTML
240
>

powered by: WebSVN 2.1.0

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