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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [net-common-support.html] - Blame information for rev 757

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
>Support Features</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 Stack Support for eCos"
23
HREF="net-common-tcpip.html"><LINK
24
REL="PREVIOUS"
25
TITLE="Maintenance Tools "
26
HREF="net-common-maintenance-tools.html"><LINK
27
REL="NEXT"
28
TITLE="DHCP"
29
HREF="net-common-dhcp.html"></HEAD
30
><BODY
31
CLASS="CHAPTER"
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-maintenance-tools.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
></TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="net-common-dhcp.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="CHAPTER"
82
><H1
83
><A
84
NAME="NET-COMMON-SUPPORT">Chapter 37. Support Features</H1
85
><DIV
86
CLASS="TOC"
87
><DL
88
><DT
89
><B
90
>Table of Contents</B
91
></DT
92
><DT
93
><A
94
HREF="net-common-support.html#NET-COMMON-TFTP"
95
>TFTP</A
96
></DT
97
><DT
98
><A
99
HREF="net-common-dhcp.html"
100
>DHCP</A
101
></DT
102
></DL
103
></DIV
104
><DIV
105
CLASS="SECT1"
106
><H1
107
CLASS="SECT1"
108
><A
109
NAME="NET-COMMON-TFTP">TFTP</H1
110
><P
111
>The TFTP client and server are described in
112
<TT
113
CLASS="FILENAME"
114
>tftp_support.h</TT
115
>;
116
the client API is simple and can be easily understood by reading
117
<TT
118
CLASS="FILENAME"
119
>tftp_client_test.c</TT
120
>.</P
121
><P
122
>The server is more complex.  It requires a filesystem implementation
123
to be supplied by the user, and attached to the tftp server by means
124
of a vector of function pointers:</P
125
><TABLE
126
BORDER="5"
127
BGCOLOR="#E0E0F0"
128
WIDTH="70%"
129
><TR
130
><TD
131
><PRE
132
CLASS="PROGRAMLISTING"
133
>struct tftpd_fileops {
134
             int (&#0042;open)(const char &#0042;, int);
135
             int (&#0042;close)(int);
136
             int (&#0042;write)(int, const void &#0042;, int);
137
             int (&#0042;read)(int, void &#0042;, int);
138
};</PRE
139
></TD
140
></TR
141
></TABLE
142
><P
143
>These functions have the obvious semantics.  The structure
144
describing the filesystem is an argument to the <TT
145
CLASS="FUNCTION"
146
>tftpd_start(int,
147
struct tftpd_fileops &#0042;);</TT
148
> call.
149
 The first argument is the port to use for the server.</P
150
><P
151
>As discussed in the description of the tftp_server_test
152
above, an example filesystem is provided in
153
<TT
154
CLASS="FILENAME"
155
>net/common/<TT
156
CLASS="REPLACEABLE"
157
><I
158
>VERSION</I
159
></TT
160
>/src/tftp_dummy_file.c</TT
161
>
162
for
163
use by the tftp server test.  The dummy filesystem is not a supported
164
part of the network stack, it exists purely for demonstration purposes.</P
165
></DIV
166
></DIV
167
><DIV
168
CLASS="NAVFOOTER"
169
><HR
170
ALIGN="LEFT"
171
WIDTH="100%"><TABLE
172
SUMMARY="Footer navigation table"
173
WIDTH="100%"
174
BORDER="0"
175
CELLPADDING="0"
176
CELLSPACING="0"
177
><TR
178
><TD
179
WIDTH="33%"
180
ALIGN="left"
181
VALIGN="top"
182
><A
183
HREF="net-common-maintenance-tools.html"
184
ACCESSKEY="P"
185
>Prev</A
186
></TD
187
><TD
188
WIDTH="34%"
189
ALIGN="center"
190
VALIGN="top"
191
><A
192
HREF="ecos-ref.html"
193
ACCESSKEY="H"
194
>Home</A
195
></TD
196
><TD
197
WIDTH="33%"
198
ALIGN="right"
199
VALIGN="top"
200
><A
201
HREF="net-common-dhcp.html"
202
ACCESSKEY="N"
203
>Next</A
204
></TD
205
></TR
206
><TR
207
><TD
208
WIDTH="33%"
209
ALIGN="left"
210
VALIGN="top"
211
>Maintenance Tools</TD
212
><TD
213
WIDTH="34%"
214
ALIGN="center"
215
VALIGN="top"
216
><A
217
HREF="net-common-tcpip.html"
218
ACCESSKEY="U"
219
>Up</A
220
></TD
221
><TD
222
WIDTH="33%"
223
ALIGN="right"
224
VALIGN="top"
225
>DHCP</TD
226
></TR
227
></TABLE
228
></DIV
229
></BODY
230
></HTML
231
>

powered by: WebSVN 2.1.0

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