1 <!-- 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. -->
12 >Support Features</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
22 TITLE="TCP/IP Stack Support for eCos"
23 HREF="net-common-tcpip.html"><LINK
25 TITLE="Maintenance Tools "
26 HREF="net-common-maintenance-tools.html"><LINK
29 HREF="net-common-dhcp.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="net-common-maintenance-tools.html"
71 HREF="net-common-dhcp.html"
84 NAME="NET-COMMON-SUPPORT">Chapter 37. Support Features</H1
94 HREF="net-common-support.html#NET-COMMON-TFTP"
99 HREF="net-common-dhcp.html"
109 NAME="NET-COMMON-TFTP">TFTP</H1
111 >The TFTP client and server are described in
116 the client API is simple and can be easily understood by reading
119 >tftp_client_test.c</TT
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
132 CLASS="PROGRAMLISTING"
133 >struct tftpd_fileops {
134 int (*open)(const char *, int);
135 int (*close)(int);
136 int (*write)(int, const void *, int);
137 int (*read)(int, void *, int);
143 >These functions have the obvious semantics. The structure
144 describing the filesystem is an argument to the <TT
147 struct tftpd_fileops *);</TT
149 The first argument is the port to use for the server.</P
151 >As discussed in the description of the tftp_server_test
152 above, an example filesystem is provided in
160 >/src/tftp_dummy_file.c</TT
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
172 SUMMARY="Footer navigation table"
183 HREF="net-common-maintenance-tools.html"
201 HREF="net-common-dhcp.html"
211 >Maintenance Tools</TD
217 HREF="net-common-tcpip.html"