1 #ifndef _IPV6_PROTOCOL_DEFINES_
2 #define _IPV6_PROTOCOL_DEFINES_
5 #define IPV6HDR_TYPE_HOPBYHOP 0x0
6 #define IPV6HDR_TYPE_ROUTING 0x2B
7 #define IPV6HDR_TYPE_FRAGMENTATION 0x2C
8 #define IPV6HDR_TYPE_DESTOPTS 0x3c
9 #define IPV6HDR_TYPE_AUTHENTICATION 0x33
10 #define IPV6HDR_TYPE_ENCRYPTEDSECURITYPAYLOAD 0x34
11 #define MASK_IPV6_CS_SPEC 0x2
14 #define TCP_HEADER_TYPE 0x6
15 #define UDP_HEADER_TYPE 0x11
16 #define IPV6_ICMP_HDR_TYPE 0x2
17 #define IPV6_FLOWLABEL_BITOFFSET 9
19 #define IPV6_MAX_CHAINEDHDR_BUFFBYTES 0x64
21 // Size of Dest Options field of Destinations Options Header
24 #define IPV6_DESTOPTS_HDR_OPTIONSIZE 0x8
26 //typedef unsigned char UCHAR;
27 //typedef unsigned short USHORT;
28 //typedef unsigned long int ULONG;
30 typedef struct IPV6HeaderFormatTag
33 UCHAR aucFlowLabel
[3];
34 USHORT usPayloadLength
;
37 ULONG ulSrcIpAddress
[4];
38 ULONG ulDestIpAddress
[4];
41 typedef struct IPV6RoutingHeaderFormatTag
48 //UCHAR aucAddressList[0];
52 typedef struct IPV6FragmentHeaderFormatTag
56 USHORT usFragmentOffset
;
57 ULONG ulIdentification
;
60 typedef struct IPV6DestOptionsHeaderFormatTag
64 UCHAR ucDestOptions
[6];
65 //UCHAR udExtDestOptions[0];
66 }IPV6DestOptionsHeader
;
68 typedef struct IPV6HopByHopOptionsHeaderFormatTag
72 ULONG ulJumboPayloadLen
;
73 }IPV6HopByHopOptionsHeader
;
75 typedef struct IPV6AuthenticationHeaderFormatTag
80 ULONG ulSecurityParametersIndex
;
81 //UCHAR ucAuthenticationData[0];
83 }IPV6AuthenticationHeader
;
85 typedef struct IPV6IcmpHeaderFormatTag
94 typedef enum _E_IPADDR_CONTEXT
103 //Function Prototypes
105 USHORT
IpVersion6(PMINI_ADAPTER Adapter
, /**< Pointer to the driver control structure */
106 PVOID pcIpHeader
, /**<Pointer to the IP Hdr of the packet*/
107 S_CLASSIFIER_RULE
*pstClassifierRule
);
109 VOID
DumpIpv6Address(ULONG
*puIpv6Address
);
111 extern BOOLEAN
MatchSrcPort(S_CLASSIFIER_RULE
*pstClassifierRule
,USHORT ushSrcPort
);
112 extern BOOLEAN
MatchDestPort(S_CLASSIFIER_RULE
*pstClassifierRule
,USHORT ushSrcPort
);
113 extern BOOLEAN
MatchProtocol(S_CLASSIFIER_RULE
*pstClassifierRule
,UCHAR ucProtocol
);