summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe
diff options
context:
space:
mode:
authorMichael Brown2006-12-05 20:07:47 +0100
committerMichael Brown2006-12-05 20:07:47 +0100
commit89bcb57201d4175b08344eaf0ee4268abd7e8092 (patch)
tree372ad6b3dbccb1ab08893e7ba999b58672882d0d /src/include/gpxe
parentThe VPD engine is broken and can't actually handle placing VPD (diff)
downloadipxe-89bcb57201d4175b08344eaf0ee4268abd7e8092.tar.gz
ipxe-89bcb57201d4175b08344eaf0ee4268abd7e8092.tar.xz
ipxe-89bcb57201d4175b08344eaf0ee4268abd7e8092.zip
Update ftp.c to work with Nikhil's TCP stack.
Remove the now-totally-obsolete sockaddr_in field from tcp.h.
Diffstat (limited to 'src/include/gpxe')
-rw-r--r--src/include/gpxe/ftp.h2
-rw-r--r--src/include/gpxe/tcp.h8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/include/gpxe/ftp.h b/src/include/gpxe/ftp.h
index 6fad15276..1a0861e9c 100644
--- a/src/include/gpxe/ftp.h
+++ b/src/include/gpxe/ftp.h
@@ -49,6 +49,8 @@ struct ftp_request {
* remote server.
*/
void ( *callback ) ( char *data, size_t len );
+ /** Eventual return status */
+ int rc;
/** Asynchronous operation for this FTP operation */
struct async_operation aop;
diff --git a/src/include/gpxe/tcp.h b/src/include/gpxe/tcp.h
index b7f0accaa..9afb061b8 100644
--- a/src/include/gpxe/tcp.h
+++ b/src/include/gpxe/tcp.h
@@ -144,10 +144,6 @@ extern void tcp_close ( struct tcp_connection *conn );
*/
struct tcp_connection {
struct sockaddr_tcpip peer; /* Remote socket address */
-
- /* FIXME: this field should no longer be present */
- struct sockaddr_in sin;
-
uint16_t local_port; /* Local port, in network byte order */
int tcp_state; /* TCP state */
int tcp_lstate; /* Last TCP state */
@@ -206,6 +202,10 @@ struct tcp_header {
extern struct tcpip_protocol tcp_protocol;
+static inline int tcp_closed ( struct tcp_connection *conn ) {
+ return ( conn->tcp_state == TCP_CLOSED );
+}
+
extern void tcp_init_conn ( struct tcp_connection *conn );
extern int tcp_connect ( struct tcp_connection *conn );
extern int tcp_connectto ( struct tcp_connection *conn,