diff options
| author | Michael Brown | 2007-01-11 05:51:20 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-01-11 05:51:20 +0100 |
| commit | 6918cf9e9e67e5b0fb79cae2f9da921b81cac399 (patch) | |
| tree | af162c8e5142692024a568ec4513b898225d0ee5 /src/include | |
| parent | Fix bug in buffer.c, add buffer mini-unit test. (diff) | |
| download | ipxe-6918cf9e9e67e5b0fb79cae2f9da921b81cac399.tar.gz ipxe-6918cf9e9e67e5b0fb79cae2f9da921b81cac399.tar.xz ipxe-6918cf9e9e67e5b0fb79cae2f9da921b81cac399.zip | |
Change FTP to use a data buffer rather than a callback function.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/ftp.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/include/gpxe/ftp.h b/src/include/gpxe/ftp.h index c3eafb670..e296021dd 100644 --- a/src/include/gpxe/ftp.h +++ b/src/include/gpxe/ftp.h @@ -11,6 +11,8 @@ #include <gpxe/async.h> #include <gpxe/tcp.h> +struct buffer; + /** FTP default port */ #define FTP_PORT 21 @@ -40,15 +42,8 @@ struct ftp_request { struct sockaddr_tcpip server; /** File to download */ const char *filename; - /** Callback function - * - * @v data Received data - * @v len Length of received data - * - * This function is called for all data received from the - * remote server. - */ - void ( *callback ) ( char *data, size_t len ); + /** Data buffer to fill */ + struct buffer *buffer; /** Current state */ enum ftp_state state; @@ -62,6 +57,8 @@ struct ftp_request { char status_text[4]; /** Passive-mode parameters, as text */ char passive_text[24]; /* "aaa,bbb,ccc,ddd,eee,fff" */ + /** Amount of data received */ + size_t data_rcvd; /** TCP application for the control channel */ struct tcp_application tcp; |
