summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe
diff options
context:
space:
mode:
authorMichael Brown2007-01-15 10:58:26 +0100
committerMichael Brown2007-01-15 10:58:26 +0100
commitdf0397f33469f9e3ed1d54cedd5fe6282881e3fc (patch)
tree91bef77876d4799fcd0cdaa260fb11805a72baa6 /src/include/gpxe
parentProtocol's get() method no longer takes ownership of the URI. HTTP is the (diff)
downloadipxe-df0397f33469f9e3ed1d54cedd5fe6282881e3fc.tar.gz
ipxe-df0397f33469f9e3ed1d54cedd5fe6282881e3fc.tar.xz
ipxe-df0397f33469f9e3ed1d54cedd5fe6282881e3fc.zip
Update TFTP and FTP to take the same temporary URI scheme as HTTP
Diffstat (limited to 'src/include/gpxe')
-rw-r--r--src/include/gpxe/ftp.h15
-rw-r--r--src/include/gpxe/tftp.h17
2 files changed, 15 insertions, 17 deletions
diff --git a/src/include/gpxe/ftp.h b/src/include/gpxe/ftp.h
index 06799d248..64e8d4e4f 100644
--- a/src/include/gpxe/ftp.h
+++ b/src/include/gpxe/ftp.h
@@ -38,12 +38,12 @@ enum ftp_state {
*
*/
struct ftp_request {
- /** Server address */
- struct sockaddr_tcpip server;
- /** File to download */
- const char *filename;
+ /** URI being fetched */
+ struct uri *uri;
/** Data buffer to fill */
struct buffer *buffer;
+ /** Asynchronous operation */
+ struct async async;
/** Current state */
enum ftp_state state;
@@ -57,16 +57,13 @@ struct ftp_request {
char status_text[4];
/** Passive-mode parameters, as text */
char passive_text[24]; /* "aaa,bbb,ccc,ddd,eee,fff" */
-
/** TCP application for the control channel */
struct tcp_application tcp;
/** TCP application for the data channel */
struct tcp_application tcp_data;
-
- /** Asynchronous operation for this FTP operation */
- struct async async;
};
-struct async_operation * ftp_get ( struct ftp_request *ftp );
+extern int ftp_get ( struct uri *uri, struct buffer *buffer,
+ struct async *parent );
#endif /* _GPXE_FTP_H */
diff --git a/src/include/gpxe/tftp.h b/src/include/gpxe/tftp.h
index 551a6fc9d..cb643d9c6 100644
--- a/src/include/gpxe/tftp.h
+++ b/src/include/gpxe/tftp.h
@@ -86,12 +86,13 @@ union tftp_any {
* This data structure holds the state for an ongoing TFTP transfer.
*/
struct tftp_session {
- /** UDP connection */
- struct udp_connection udp;
- /** Filename */
- const char *filename;
+ /** URI being fetched */
+ struct uri *uri;
/** Data buffer to fill */
struct buffer *buffer;
+ /** Asynchronous operation */
+ struct async async;
+
/** Requested data block size
*
* This is the "blksize" option requested from the TFTP
@@ -133,15 +134,15 @@ struct tftp_session {
* (i.e. that no blocks have yet been received).
*/
int state;
-
- /** Asynchronous operation for this session */
- struct async async;
+ /** UDP connection */
+ struct udp_connection udp;
/** Retransmission timer */
struct retry_timer timer;
};
/* Function prototypes */
-extern struct async_operation * tftp_get ( struct tftp_session *tftp );
+extern int tftp_get ( struct uri *uri, struct buffer *buffer,
+ struct async *parent );
#endif /* _GPXE_TFTP_H */