10 FILE_LICENCE ( GPL2_OR_LATER );
14 #include <ipxe/netdevice.h>
15 #include <ipxe/tcpip.h>
19 #define IP6_VERSION 0x6
20 #define IP6_HOP_LIMIT 255
24 * This is duplicated in tcp.h and here. Ideally it should go into iobuf.h
26 #define MAX_HDR_LEN 100
27 #define MAX_IOB_LEN 1500
28 #define MIN_IOB_LEN MAX_HDR_LEN + 100 /* To account for padding by LL */
30 #define IP6_EQUAL( in6_addr1, in6_addr2 ) \
31 ( memcmp ( ( char* ) &( in6_addr1 ), ( char* ) &( in6_addr2 ),\
32 sizeof ( struct in6_addr ) ) == 0 )
34 #define IS_UNSPECIFIED( addr ) \
35 ( ( (addr).in6_u.u6_addr32[0] == 0x00000000 ) && \
36 ( (addr).in6_u.u6_addr32[1] == 0x00000000 ) && \
37 ( (addr).in6_u.u6_addr32[2] == 0x00000000 ) && \
38 ( (addr).in6_u.u6_addr32[3] == 0x00000000 ) )
41 uint32_t ver_traffic_class_flow_label;
49 /* IP6 pseudo header */
50 struct ipv6_pseudo_header {
58 /* Next header numbers */
59 #define IP6_HOPBYHOP 0x00
60 #define IP6_ROUTING 0x43
61 #define IP6_FRAGMENT 0x44
62 #define IP6_AUTHENTICATION 0x51
63 #define IP6_DEST_OPTS 0x60
65 #define IP6_ICMP6 0x58
66 #define IP6_NO_HEADER 0x59
70 extern struct net_protocol ipv6_protocol __net_protocol;
71 extern struct tcpip_net_protocol ipv6_tcpip_protocol __tcpip_net_protocol;
72 extern char * inet6_ntoa ( struct in6_addr in6 );
74 extern int add_ipv6_address ( struct net_device *netdev,
75 struct in6_addr prefix, int prefix_len,
76 struct in6_addr address,
77 struct in6_addr gateway );
78 extern void del_ipv6_address ( struct net_device *netdev );
80 #endif /* _IPXE_IP6_H */