summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2006-06-18 01:20:54 +0200
committerMichael Brown2006-06-18 01:20:54 +0200
commit86378340313a4d511121f74ef98f6f263df21ba0 (patch)
treec8c6c05fc7b4de9a2375fd43cf475140bfa4cc59 /src/include
parentSimplify RX data path. (diff)
downloadipxe-86378340313a4d511121f74ef98f6f263df21ba0.tar.gz
ipxe-86378340313a4d511121f74ef98f6f263df21ba0.tar.xz
ipxe-86378340313a4d511121f74ef98f6f263df21ba0.zip
Made the temporary buffer part of the TCP senddata() API, to ease the
transition away from uIP. Prepared ipv4.c for transition away from uIP.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/tcp.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/include/gpxe/tcp.h b/src/include/gpxe/tcp.h
index 6c07f4ae9..fb0c89a7e 100644
--- a/src/include/gpxe/tcp.h
+++ b/src/include/gpxe/tcp.h
@@ -66,6 +66,8 @@ struct tcp_operations {
* Transmit data
*
* @v conn TCP connection
+ * @v buf Temporary data buffer
+ * @v len Length of temporary data buffer
*
* The application should transmit whatever it currently wants
* to send using tcp_send(). If retransmissions are required,
@@ -73,8 +75,16 @@ struct tcp_operations {
* regenerate the data. The easiest way to implement this is
* to ensure that senddata() never changes the application's
* state.
+ *
+ * The application may use the temporary data buffer to
+ * construct the data to be sent. Note that merely filling
+ * the buffer will do nothing; the application must call
+ * tcp_send() in order to actually transmit the data. Use of
+ * the buffer is not compulsory; the application may call
+ * tcp_send() on any block of data.
*/
- void ( * senddata ) ( struct tcp_connection *conn );
+ void ( * senddata ) ( struct tcp_connection *conn, void *buf,
+ size_t len );
};
/**
@@ -88,8 +98,6 @@ struct tcp_connection {
struct tcp_operations *tcp_op;
};
-extern void *tcp_buffer;
-extern size_t tcp_buflen;
extern void tcp_connect ( struct tcp_connection *conn );
extern void tcp_send ( struct tcp_connection *conn, const void *data,
size_t len );