summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorNikhil Chandru Rao2006-07-19 18:25:23 +0200
committerNikhil Chandru Rao2006-07-19 18:25:23 +0200
commitab577e1a3a45c4e23912523d30d5822eeb532258 (patch)
treeb11671988c2f49de37f516fbd9cd2a79cb7e139d /src/include
parentAdded macros for generating static DHCP options (diff)
downloadipxe-ab577e1a3a45c4e23912523d30d5822eeb532258.tar.gz
ipxe-ab577e1a3a45c4e23912523d30d5822eeb532258.tar.xz
ipxe-ab577e1a3a45c4e23912523d30d5822eeb532258.zip
The following edits were made: \
1. Updated UDP send data code\ 2. Corrected internet checksum\ 3. Moved udp_buffer() and udp_buflen() to udp.c from udp.h
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/tcpip_if.h2
-rw-r--r--src/include/gpxe/udp.h22
2 files changed, 18 insertions, 6 deletions
diff --git a/src/include/gpxe/tcpip_if.h b/src/include/gpxe/tcpip_if.h
index bac39699b..ce095efa7 100644
--- a/src/include/gpxe/tcpip_if.h
+++ b/src/include/gpxe/tcpip_if.h
@@ -83,7 +83,7 @@ extern void trans_rx ( struct pk_buff *pkb, uint8_t trans_proto,
extern int trans_tx ( struct pk_buff *pkb, struct tcpip_protocol *tcpip,
struct sockaddr *dest );
-extern uint16_t calc_chksum ( void *data, size_t len );
+extern uint16_t calc_chksum ( void *b, int len );
extern struct tcpip_protocol * find_tcpip_protocol ( uint8_t trans_proto );
extern struct tcpip_net_protocol * find_tcpip_net_protocol ( sa_family_t sa_family );
diff --git a/src/include/gpxe/udp.h b/src/include/gpxe/udp.h
index e6511160c..680345832 100644
--- a/src/include/gpxe/udp.h
+++ b/src/include/gpxe/udp.h
@@ -41,6 +41,23 @@ struct udp_connection;
*
*/
struct udp_operations {
+
+ /**
+ * Transmit data
+ *
+ * @v conn UDP connection
+ * @v buf Temporary data buffer
+ * @v len Length of temporary data buffer
+ *
+ * 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
+ * udp_send() in order to actually transmit the data. Use of
+ * the buffer is not compulsory; the application may call
+ * udp_send() on any block of data.
+ */
+ void ( * senddata ) ( struct tcp_connection *conn, void *buf,
+ size_t len );
/**
* New data received
*
@@ -70,11 +87,6 @@ struct udp_connection {
};
/**
- * List of registered UDP connections
- */
-static LIST_HEAD ( udp_conns );
-
-/**
* UDP protocol
*/
extern struct tcpip_protocol udp_protocol;