10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
14 #include <ipxe/list.h>
15 #include <ipxe/retry.h>
16 #include <ipxe/netdevice.h>
23 #define IP_MASK_VER 0xf0U
24 #define IP_MASK_HLEN 0x0fU
25 #define IP_MASK_OFFSET 0x1fffU
26 #define IP_MASK_DONOTFRAG 0x4000U
27 #define IP_MASK_MOREFRAGS 0x2000U
30 /* IP header defaults */
34 /** An IPv4 packet header */
46 } __attribute__ (( packed ));
48 /** An IPv4 pseudo header */
49 struct ipv4_pseudo_header {
57 /** An IPv4 address/routing table entry */
58 struct ipv4_miniroute {
59 /** List of miniroutes */
60 struct list_head list;
63 struct net_device *netdev;
66 struct in_addr address;
68 struct in_addr netmask;
69 /** Gateway address */
70 struct in_addr gateway;
73 extern struct list_head ipv4_miniroutes;
75 extern struct net_protocol ipv4_protocol __net_protocol;
77 extern int ipv4_has_any_addr ( struct net_device *netdev );
78 extern int parse_ipv4_setting ( const struct setting_type *type,
79 const char *value, void *buf, size_t len );
80 extern int format_ipv4_setting ( const struct setting_type *type,
81 const void *raw, size_t raw_len, char *buf,
84 #endif /* _IPXE_IP_H */