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-ethers.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
>ethers</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="byteorder"
26
HREF="net-common-tcpip-manpages-byteorder.html"><LINK
27
REL="NEXT"
28
TITLE="getaddrinfo"
29
HREF="net-common-tcpip-manpages-getaddrinfo.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-byteorder.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-getaddrinfo.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-ETHERS">ethers</H1
86
><TABLE
87
BORDER="5"
88
BGCOLOR="#E0E0F0"
89
WIDTH="70%"
90
><TR
91
><TD
92
><PRE
93
CLASS="SCREEN"
94
>ETHERS(3)               System Library Functions Manual              ETHERS(3)
95
 
96
NAME
97
     ether_aton, ether_ntoa, ether_addr, ether_ntohost, ether_hostton,
98
     ether_line - get ethers entry
99
 
100
SYNOPSIS
101
     #include &lt;netinet/if_ether.h&#62;
102
 
103
     char *
104
     ether_ntoa(struct ether_addr *e);
105
 
106
     struct ether_addr *
107
     ether_aton(char *s);
108
 
109
     int
110
     ether_ntohost(char *hostname, struct ether_addr *e);
111
 
112
     int
113
     ether_hostton(char *hostname, struct ether_addr *e);
114
 
115
     int
116
     ether_line(char *l, struct ether_addr *e, char *hostname);
117
 
118
DESCRIPTION
119
     Ethernet addresses are represented by the following structure:
120
 
121
           struct ether_addr {
122
                   u_int8_t  ether_addr_octet[6];
123
           };
124
 
125
     The ether_ntoa() function converts this structure into an ASCII string of
126
     the form ``xx:xx:xx:xx:xx:xx'', consisting of 6 hexadecimal numbers sepa-
127
     rated by colons.  It returns a pointer to a static buffer that is reused
128
     for each call.  The ether_aton() converts an ASCII string of the same
129
     form and to a structure containing the 6 octets of the address.  It
130
     returns a pointer to a static structure that is reused for each call.
131
 
132
     The ether_ntohost() and ether_hostton() functions interrogate the
133
     database mapping host names to Ethernet addresses, /etc/ethers.  The
134
     ether_ntohost() function looks up the given Ethernet address and writes
135
     the associated host name into the character buffer passed.  This buffer
136
     should be MAXHOSTNAMELEN characters in size.  The ether_hostton() func-
137
     tion looks up the given host name and writes the associated Ethernet
138
     address into the structure passed.  Both functions return zero if they
139
     find the requested host name or address, and -1 if not.
140
 
141
     Each call reads /etc/ethers from the beginning; if a `+' appears alone on
142
     a line in the file, then ether_hostton() will consult the ethers.byname
143
     YP map, and ether_ntohost() will consult the ethers.byaddr YP map.
144
 
145
     The ether_line() function parses a line from the /etc/ethers file and
146
     fills in the passed struct ether_addr and character buffer with the Eth-
147
     ernet address and host name on the line.  It returns zero if the line was
148
     successfully parsed and -1 if not.  The character buffer should be
149
     MAXHOSTNAMELEN characters in size.
150
 
151
FILES
152
     /etc/ethers
153
 
154
SEE ALSO
155
     ethers(5)
156
 
157
HISTORY
158
     The ether_ntoa(), ether_aton(), ether_ntohost(), ether_hostton(), and
159
     ether_line() functions were adopted from SunOS and appeared in NetBSD 0.9
160
     b.
161
 
162
BUGS
163
     The data space used by these functions is static; if future use requires
164
     the data, it should be copied before any subsequent calls to these func-
165
     tions overwrite it.
166
 
167
BSD                            December 16, 1993                           BSD
168
    </PRE
169
></TD
170
></TR
171
></TABLE
172
></DIV
173
><DIV
174
CLASS="NAVFOOTER"
175
><HR
176
ALIGN="LEFT"
177
WIDTH="100%"><TABLE
178
SUMMARY="Footer navigation table"
179
WIDTH="100%"
180
BORDER="0"
181
CELLPADDING="0"
182
CELLSPACING="0"
183
><TR
184
><TD
185
WIDTH="33%"
186
ALIGN="left"
187
VALIGN="top"
188
><A
189
HREF="net-common-tcpip-manpages-byteorder.html"
190
ACCESSKEY="P"
191
>Prev</A
192
></TD
193
><TD
194
WIDTH="34%"
195
ALIGN="center"
196
VALIGN="top"
197
><A
198
HREF="ecos-ref.html"
199
ACCESSKEY="H"
200
>Home</A
201
></TD
202
><TD
203
WIDTH="33%"
204
ALIGN="right"
205
VALIGN="top"
206
><A
207
HREF="net-common-tcpip-manpages-getaddrinfo.html"
208
ACCESSKEY="N"
209
>Next</A
210
></TD
211
></TR
212
><TR
213
><TD
214
WIDTH="33%"
215
ALIGN="left"
216
VALIGN="top"
217
>byteorder</TD
218
><TD
219
WIDTH="34%"
220
ALIGN="center"
221
VALIGN="top"
222
><A
223
HREF="tcpip-library-reference.html"
224
ACCESSKEY="U"
225
>Up</A
226
></TD
227
><TD
228
WIDTH="33%"
229
ALIGN="right"
230
VALIGN="top"
231
>getaddrinfo</TD
232
></TR
233
></TABLE
234
></DIV
235
></BODY
236
></HTML
237
>

powered by: WebSVN 2.1.0

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