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 >FTP Client 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="FTP Client for eCos TCP/IP Stack"
23 HREF="net-ftpclient.html"><LINK
25 TITLE="FTP Client for eCos TCP/IP Stack"
26 HREF="net-ftpclient.html"><LINK
28 TITLE="CRC Algorithms"
29 HREF="services-crc.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="net-ftpclient.html"
71 HREF="services-crc.html"
84 NAME="NET-FTPCLIENT-FEATURES">Chapter 49. FTP Client Features</H1
90 NAME="NET-FTPCLIENT-FEATURES-API">FTP Client API</H1
92 >This package implements an FTP client. The API is in include file
95 >install/include/ftpclient.h</TT
96 > and it can be used thus:
104 CLASS="PROGRAMLISTING"
105 >#include <network.h>
106 #include <ftpclient.h></PRE
111 It looks like this:</P
117 NAME="NET-FTPCLIENT-FEATURES-API-GET">ftp_get</H2
125 CLASS="PROGRAMLISTING"
126 >int ftp_get(char * hostname,
127 char * username,
129 char * filename,
132 ftp_printf_t ftp_printf);</PRE
137 >Use the FTP protocol to retrieve a file from a server. Only binary
138 mode is supported. The filename can include a directory name. Only
139 use unix style ‘/’ file separators,
141 The file is placed into <TT
152 > has maximum size <TT
158 If the file is bigger than this, the
159 transfer fails and <SPAN
163 Other error codes listed in the header can also be returned.
164 If the transfer is successful the number of bytes received is returned.</P
171 NAME="NET-FTPCLIENT-FEATURES-API-PUT">ftp_put</H2
179 CLASS="PROGRAMLISTING"
180 >int ftp_put(char * hostname,
181 char * username,
183 char * filename,
186 ftp_printf_t ftp_printf);</PRE
191 >Use the FTP protocol to send a file to a server.
193 mode is supported. The filename can include a directory name. Only
194 use unix style ‘/’ file separators,
201 > are placed into the file on the
202 server. If an error occurs one of the codes listed will be returned. If the
203 transfer is successful zero is returned.</P
210 NAME="NET-FTPCLIENT-FEATURES-API-PRINTF">ftpclient_printf</H2
218 CLASS="PROGRAMLISTING"
219 >void ftpclient_printf(unsigned error, const char *fmt, ...);</PRE
231 take a pointer to a function to use for printing
232 out diagnostic and error messages. This is a sample implementation
233 which can be used if you don't want to implement the function
240 > will be true when the message to print is an
241 error message. Otherwise the message is diagnostic, eg. the commands sent
242 and received from the server.</P
251 SUMMARY="Footer navigation table"
262 HREF="net-ftpclient.html"
280 HREF="services-crc.html"
290 >FTP Client for eCos TCP/IP Stack</TD
296 HREF="net-ftpclient.html"