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-getnetent.html] - Blame information for rev 588

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
>getnetent</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="getnameinfo"
26
HREF="net-common-tcpip-manpages-getnameinfo.html"><LINK
27
REL="NEXT"
28
TITLE="getprotoent"
29
HREF="net-common-tcpip-manpages-getprotoent.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-getnameinfo.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-getprotoent.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-GETNETENT">getnetent</H1
86
><TABLE
87
BORDER="5"
88
BGCOLOR="#E0E0F0"
89
WIDTH="70%"
90
><TR
91
><TD
92
><PRE
93
CLASS="SCREEN"
94
>GETNETENT(3)            System Library Functions Manual           GETNETENT(3)
95
 
96
NAME
97
     getnetent, getnetbyaddr, getnetbyname, setnetent, endnetent - get network
98
     entry
99
 
100
SYNOPSIS
101
     #include &lt;netdb.h&#62;
102
 
103
     struct netent *
104
     getnetent(void);
105
 
106
     struct netent *
107
     getnetbyname(char *name);
108
 
109
     struct netent *
110
     getnetbyaddr(in_addr_t net, int type);
111
 
112
     void
113
     setnetent(int stayopen);
114
 
115
     void
116
     endnetent(void);
117
 
118
DESCRIPTION
119
     The getnetent(), getnetbyname(), and getnetbyaddr() functions each return
120
     a pointer to an object with the following structure containing the bro-
121
     ken-out fields of a line in the network database, /etc/networks.
122
 
123
           struct  netent {
124
                   char            *n_name;        /* official name of net */
125
                   char            **n_aliases;    /* alias list */
126
                   int             n_addrtype;     /* net number type */
127
                   in_addr_t       n_net;          /* net number */
128
           };
129
 
130
     The members of this structure are:
131
 
132
     n_name      The official name of the network.
133
 
134
     n_aliases   A zero-terminated list of alternate names for the network.
135
 
136
     n_addrtype  The type of the network number returned; currently only
137
                 AF_INET.
138
 
139
     n_net       The network number.  Network numbers are returned in machine
140
                 byte order.
141
 
142
     The getnetent() function reads the next line of the file, opening the
143
     file if necessary.
144
 
145
     The setnetent() function opens and rewinds the file.  If the stayopen
146
     flag is non-zero, the net database will not be closed after each call to
147
     getnetbyname() or getnetbyaddr().
148
 
149
     The endnetent() function closes the file.
150
 
151
     The getnetbyname() and getnetbyaddr() functions search the domain name
152
     server if the system is configured to use one.  If the search fails, or
153
     no name server is configured, they sequentially search from the beginning
154
     of the file until a matching net name or net address and type is found,
155
     or until EOF is encountered.  Network numbers are supplied in host order.
156
 
157
FILES
158
     /etc/networks
159
 
160
DIAGNOSTICS
161
     Null pointer (0) returned on EOF or error.
162
 
163
SEE ALSO
164
     resolver(3), networks(5)
165
 
166
HISTORY
167
     The getnetent(), getnetbyaddr(), getnetbyname(), setnetent(), and
168
     endnetent() functions appeared in 4.2BSD.
169
 
170
BUGS
171
     The data space used by these functions is static; if future use requires
172
     the data, it should be copied before any subsequent calls to these func-
173
     tions overwrite it.  Only Internet network numbers are currently under-
174
     stood.  Expecting network numbers to fit in no more than 32 bits is
175
     naive.
176
 
177
BSD                             March 13, 1997                             BSD
178
    </PRE
179
></TD
180
></TR
181
></TABLE
182
></DIV
183
><DIV
184
CLASS="NAVFOOTER"
185
><HR
186
ALIGN="LEFT"
187
WIDTH="100%"><TABLE
188
SUMMARY="Footer navigation table"
189
WIDTH="100%"
190
BORDER="0"
191
CELLPADDING="0"
192
CELLSPACING="0"
193
><TR
194
><TD
195
WIDTH="33%"
196
ALIGN="left"
197
VALIGN="top"
198
><A
199
HREF="net-common-tcpip-manpages-getnameinfo.html"
200
ACCESSKEY="P"
201
>Prev</A
202
></TD
203
><TD
204
WIDTH="34%"
205
ALIGN="center"
206
VALIGN="top"
207
><A
208
HREF="ecos-ref.html"
209
ACCESSKEY="H"
210
>Home</A
211
></TD
212
><TD
213
WIDTH="33%"
214
ALIGN="right"
215
VALIGN="top"
216
><A
217
HREF="net-common-tcpip-manpages-getprotoent.html"
218
ACCESSKEY="N"
219
>Next</A
220
></TD
221
></TR
222
><TR
223
><TD
224
WIDTH="33%"
225
ALIGN="left"
226
VALIGN="top"
227
>getnameinfo</TD
228
><TD
229
WIDTH="34%"
230
ALIGN="center"
231
VALIGN="top"
232
><A
233
HREF="tcpip-library-reference.html"
234
ACCESSKEY="U"
235
>Up</A
236
></TD
237
><TD
238
WIDTH="33%"
239
ALIGN="right"
240
VALIGN="top"
241
>getprotoent</TD
242
></TR
243
></TABLE
244
></DIV
245
></BODY
246
></HTML
247
>

powered by: WebSVN 2.1.0

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