aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/ip.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2011-07-16 01:15:53 +0100
committerMichael Brown <mcb30@ipxe.org>2011-07-16 01:49:47 +0100
commit13186b64b6c3d5cbe9ed13bda1532e79b1afe81d (patch)
tree1a10948a940b053d72192a5b8516288d6cf08a86 /src/include/ipxe/ip.h
parent17f09dfe03a8c6b46d30844d3cee28266b6971fe (diff)
downloadipxe-13186b64b6c3d5cbe9ed13bda1532e79b1afe81d.tar.gz
[ipv4] Fix fragment reassembly
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/ip.h')
-rw-r--r--src/include/ipxe/ip.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/include/ipxe/ip.h b/src/include/ipxe/ip.h
index 3f3dc1f77..4366d9ab3 100644
--- a/src/include/ipxe/ip.h
+++ b/src/include/ipxe/ip.h
@@ -31,9 +31,6 @@ struct io_buffer;
#define IP_TOS 0
#define IP_TTL 64
-#define IP_FRAG_IOB_SIZE 1500
-#define IP_FRAG_TIMEOUT 50
-
/** An IPv4 packet header */
struct iphdr {
uint8_t verhdrlen;
@@ -73,20 +70,16 @@ struct ipv4_miniroute {
struct in_addr gateway;
};
-/* Fragment reassembly buffer */
-struct frag_buffer {
- /* Identification number */
- uint16_t ident;
- /* Source network address */
- struct in_addr src;
- /* Destination network address */
- struct in_addr dest;
- /* Reassembled I/O buffer */
- struct io_buffer *frag_iob;
- /* Reassembly timer */
- struct retry_timer frag_timer;
+/* IPv4 fragment reassembly buffer */
+struct ipv4_fragment {
/* List of fragment reassembly buffers */
struct list_head list;
+ /** Reassembled packet */
+ struct io_buffer *iobuf;
+ /** Current offset */
+ size_t offset;
+ /** Reassembly timer */
+ struct retry_timer timer;
};
extern struct list_head ipv4_miniroutes;