1 #ifndef _IPV6_PROTOCOL_DEFINES_
2 #define _IPV6_PROTOCOL_DEFINES_
4 #define IPV6HDR_TYPE_HOPBYHOP 0x0
5 #define IPV6HDR_TYPE_ROUTING 0x2B
6 #define IPV6HDR_TYPE_FRAGMENTATION 0x2C
7 #define IPV6HDR_TYPE_DESTOPTS 0x3c
8 #define IPV6HDR_TYPE_AUTHENTICATION 0x33
9 #define IPV6HDR_TYPE_ENCRYPTEDSECURITYPAYLOAD 0x34
10 #define MASK_IPV6_CS_SPEC 0x2
12 #define TCP_HEADER_TYPE 0x6
13 #define UDP_HEADER_TYPE 0x11
14 #define IPV6_ICMP_HDR_TYPE 0x2
15 #define IPV6_FLOWLABEL_BITOFFSET 9
17 #define IPV6_MAX_CHAINEDHDR_BUFFBYTES 0x64
19 * Size of Dest Options field of Destinations Options Header
22 #define IPV6_DESTOPTS_HDR_OPTIONSIZE 0x8
25 unsigned char ucVersionPrio
;
26 unsigned char aucFlowLabel
[3];
27 unsigned short usPayloadLength
;
28 unsigned char ucNextHeader
;
29 unsigned char ucHopLimit
;
30 unsigned long ulSrcIpAddress
[4];
31 unsigned long ulDestIpAddress
[4];
34 struct bcm_ipv6_routing_hdr
{
35 unsigned char ucNextHeader
;
36 unsigned char ucRoutingType
;
37 unsigned char ucNumAddresses
;
38 unsigned char ucNextAddress
;
39 unsigned long ulReserved
;
42 struct bcm_ipv6_fragment_hdr
{
43 unsigned char ucNextHeader
;
44 unsigned char ucReserved
;
45 unsigned short usFragmentOffset
;
46 unsigned long ulIdentification
;
49 struct bcm_ipv6_dest_options_hdr
{
50 unsigned char ucNextHeader
;
51 unsigned char ucHdrExtLen
;
52 unsigned char ucDestOptions
[6];
55 struct bcm_ipv6_options_hdr
{
56 unsigned char ucNextHeader
;
57 unsigned char ucMisc
[3];
58 unsigned long ulJumboPayloadLen
;
61 struct bcm_ipv6_authentication_hdr
{
62 unsigned char ucNextHeader
;
63 unsigned char ucLength
;
64 unsigned short usReserved
;
65 unsigned long ulSecurityParametersIndex
;
68 enum bcm_ipaddr_context
{
73 /* Function Prototypes */
75 unsigned short IpVersion6(struct bcm_mini_adapter
*Adapter
, /* < Pointer to the driver control structure */
76 void *pcIpHeader
, /* <Pointer to the IP Hdr of the packet */
77 struct bcm_classifier_rule
*pstClassifierRule
);
79 void DumpIpv6Address(unsigned long *puIpv6Address
);
81 extern bool MatchSrcPort(struct bcm_classifier_rule
*pstClassifierRule
, unsigned short ushSrcPort
);
82 extern bool MatchDestPort(struct bcm_classifier_rule
*pstClassifierRule
, unsigned short ushSrcPort
);
83 extern bool MatchProtocol(struct bcm_classifier_rule
*pstClassifierRule
, unsigned char ucProtocol
);