diff options
author | Nikhil Chandru Rao | 2006-06-30 10:52:03 +0200 |
---|---|---|
committer | Nikhil Chandru Rao | 2006-06-30 10:52:03 +0200 |
commit | 5f651f862232a63ca44833041deb381f305febc6 (patch) | |
tree | 5b675a1a6d26ae34e4bb95b1d9808e3980332de9 /src/include/gpxe/ip.h | |
parent | fix printf format args (diff) | |
download | ipxe-5f651f862232a63ca44833041deb381f305febc6.tar.gz ipxe-5f651f862232a63ca44833041deb381f305febc6.tar.xz ipxe-5f651f862232a63ca44833041deb381f305febc6.zip |
Added fragment reassembly code
Diffstat (limited to 'src/include/gpxe/ip.h')
-rw-r--r-- | src/include/gpxe/ip.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/include/gpxe/ip.h b/src/include/gpxe/ip.h index a6c59064..4f0f42f8 100644 --- a/src/include/gpxe/ip.h +++ b/src/include/gpxe/ip.h @@ -8,18 +8,25 @@ */ #include <ip.h> +#include <gpxe/retry.h> /* IP constants */ #define IP_VER 4 #define IP_MASK_VER 0xf0 #define IP_MASK_HLEN 0x0f +#define IP_MASK_OFFSET 0x1fff +#define IP_MASK_DONOTFRAG 0x4000 +#define IP_MASK_MOREFRAGS 0x2000 #define IP_PSHLEN 12 /* IP header defaults */ #define IP_TOS 0 #define IP_TTL 64 +#define IP_FRAG_PKB_SIZE 1500 +#define IP_FRAG_TIMEOUT 50 + /* IP4 pseudo header */ struct ipv4_pseudo_header { struct in_addr src; @@ -29,6 +36,22 @@ struct ipv4_pseudo_header { uint16_t len; }; +/* 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 packet buffer */ + struct pk_buff *frag_pkb; + /* Reassembly timer */ + struct retry_timer frag_timer; + /* List of fragment reassembly buffers */ + struct list_head list; +}; + struct pk_buff; struct net_device; struct net_protocol; |