11 #include <gpxe/retry.h>
16 #define IP_MASK_VER 0xf0U
17 #define IP_MASK_HLEN 0x0fU
18 #define IP_MASK_OFFSET 0x1fffU
19 #define IP_MASK_DONOTFRAG 0x4000U
20 #define IP_MASK_MOREFRAGS 0x2000U
23 /* IP header defaults */
27 #define IP_FRAG_IOB_SIZE 1500
28 #define IP_FRAG_TIMEOUT 50
30 /* IP4 pseudo header */
31 struct ipv4_pseudo_header
{
39 /** An IPv4 address/routing table entry */
40 struct ipv4_miniroute
{
41 /** List of miniroutes */
42 struct list_head list
;
45 struct net_device
*netdev
;
48 struct in_addr address
;
50 struct in_addr netmask
;
51 /** Gateway address */
52 struct in_addr gateway
;
55 /* Fragment reassembly buffer */
57 /* Identification number */
59 /* Source network address */
61 /* Destination network address */
63 /* Reassembled I/O buffer */
64 struct io_buffer
*frag_iob
;
65 /* Reassembly timer */
66 struct retry_timer frag_timer
;
67 /* List of fragment reassembly buffers */
68 struct list_head list
;
74 struct tcpip_protocol
;
76 extern struct list_head ipv4_miniroutes
;
78 extern struct net_protocol ipv4_protocol
;
80 extern int add_ipv4_address ( struct net_device
*netdev
,
81 struct in_addr address
, struct in_addr netmask
,
82 struct in_addr gateway
);
83 extern void del_ipv4_address ( struct net_device
*netdev
);
85 #endif /* _GPXE_IP_H */