Commit c14d7073 authored by seb's avatar seb
Browse files

generic cleanup on constants and types

parent 924124af
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 *	@author 	STF 276
 *  @version 	$Id$
 *	@desc		This module specifies functions definitions
 *              based on the common IPv6 message types only.  
 *              that can be used by any RCF function.  
 *  
 */
 module LibIpv6_CommonRfcs_Functions {
@@ -18,7 +18,7 @@
	import from LibIpv6_CommonRfcs_TypesAndValues all;
	import from LibIpv6_CommonRfcs_Templates all;
	import from LibIpv6_Rfc2460Root_TypesAndValues { type all; const all };
	import from LibIpv6_Rfc2460Root_Templates all;
	//import from LibIpv6_Rfc2460Root_Templates all;
	import from LibIpv6_Rfc3775Mipv6_ExtHdrFunctions all;

group extHdrFns {
+1 −28
Original line number Diff line number Diff line
@@ -55,34 +55,7 @@ module LibIpv6_CommonRfcs_Templates {
		
	}//end group paddingTemplates
	
	group hop_By_Hop_Options {
	
		/*
		 *	@param  p_hbhOpt First element in the Hop by hop option list
		*/
		template HopByHopOptionList m_hbhOptList_1Elem ( template HopByHopOption p_hbhOpt ) := {
			p_hbhOpt
		}

		/*
		 *	@param  p_option Hop by hop option(s) encoded in octetstring
		*/
		template HopByHopOption m_hbhOpt_generalOption ( template octetstring p_option ) := {
			generalOptionString := p_option
		}

		/*
		 *	@param  p_optJumboPayloadLength Length of the jumbogram in bytes
		*/
		template HopByHopOption m_hbhOpt_jumboPayloadOption ( UInt32 p_optJumboPayloadLength ) := {
			jumboPayload := {
				optType := c_optJumboPayload,
				optLen := c_optLen4,
				optJumboPayloadLength := p_optJumboPayloadLength
			}
		}

	} // end group hop_By_Hop_Options

	group destination_Options {

+230 −479
Original line number Diff line number Diff line
@@ -16,251 +16,102 @@ module LibIpv6_CommonRfcs_TypesAndValues {
	import from LibCommon_Time all ;
	

	group commonConstants {

	group DefaultConstants {
		const UInt16 c_defId 	:= 10; // for ICMP echo proc
		const UInt16 c_defSeqNo	:= 20; // for ICMP echo proc
	}

	group rfc3513AddressingArchitecture {

			const UInt1 c_aFlag0 := 0;
			const UInt1 c_aFlag1 := 1;
			const UInt1 c_hFlag0 := 0;
			const UInt1 c_hFlag1 := 1;
			const UInt1 c_lFlag0 := 0;
			const UInt1 c_lFlag1 := 1;
			const UInt1 c_kFlag0 := 0;
			const UInt1 c_kFlag1 := 1;
			const UInt1 c_mFlag0 := 0;
			const UInt1 c_mFlag1 := 1;
			const UInt1 c_rFlag0 := 0;
			const UInt1 c_rFlag1 := 1;
			const UInt1 c_sFlag0 := 0;
			const UInt1 c_sFlag1 := 1;
			const UInt1 c_oFlag0 := 0;
			const UInt1 c_oFlag1 := 1;
			
			const UInt16 c_unspecifiedReachTime := 0;
			const UInt16 c_unspecifiedRetransTime := 0;

			const UInt16 c_haPref0 :=0;
			const UInt16 c_haPref10 :=10;			
			const UInt16 c_haLifetime600s := 600; 

			const UInt16 c_infiniteLifetime := c_uInt16Max ;
			const UInt32 c_infinitePrefixLifetime := c_uInt32Max ;
			const UInt16 c_zeroLifetime := 0 ;
			const UInt32 c_retrans10s := 10000 ;
			const UInt8 c_optPadNLen2 := 2;
		type Oct16 Ipv6Address;
		type UInt8 PrefixLength ;//indicates nr of bits to be used as Prefix
		//Unspecified address
        const Ipv6Address c_unspecifiedAdd := c_16ZeroBytes;
		const UInt8	c_maxNrIpv6Address := 10;
		
			const UInt32 c_jumboLen8 := 8;
			const UInt32 c_jumboLen128K := 131072;
			const UInt32 c_3000ms := 3000;
		type record length(1 .. c_maxNrIpv6Address) of Ipv6Address Ipv6AddressList
		with {
			encode "present=isEOF()== false ;elements=valueOf(getTag('hdrExtLen'));"
		}
		
		
		group optLen{
	}//end group rfc3513AddressingArchitecture
	

	group ipv6Options {

		const UInt8	c_optLen0 := 0;
		const UInt8 c_optLen1 := 1;
		const UInt8 c_optLen2 := 2;
		const UInt8 c_optLen4 := 4;
		const UInt8 c_optLen6 := 6;
		const UInt8	c_optLen16 := 16;
		}//end group optLen
		

		group MessageTypeIds {
			const UInt8 	c_srcLinkLayerAddress := 1;
			const UInt8		c_tgtLinkLayerAddress := 2;
			const UInt8 	c_mtuOption := 5;
		}

		group MaxNumbers {
			const UInt8	c_maxNrIpv6Address := 10;
			const UInt8	c_maxNrHopByHopOption := 10;
			const UInt8	c_maxNrDestOption := 10;
			const UInt8	c_maxNrPrefixInfo := 10;
			const UInt8	c_maxNrRrPrefixControlOperation := 10;
			const UInt8	c_maxNrRrUsePrefix := 10;
			const UInt8	c_maxNrRrMatchReport := 10;
			const UInt8	c_maxNrMipPrefixInfo := 10;
			const UInt8	c_maxIpv6ExtHdrs:= 10;
			const UInt8	c_maxIpv6Options:= 10;
		}
		group rfc2460Options {

		group Length {
			const integer 	c_autoChkComputation := 0;
			const integer 	c_autoLenComputation := 0;
			const UInt8		c_ethAddrLen := 6; //Nr of Octets
			group paddingOptions {

				const UInt8		c_optPad1 := 0;
				const UInt8		c_optPadN := 1;
				const UInt8 	c_optPadNLen0 := 0 ;
				const UInt8 	c_optPadNLen2 := 2;
				const UInt8 	c_optPadNLen4 := 4 ;
		}

		group zeroedBits {
			
			const Bit64 c_64ZeroBits := int2bit(0,64); 
			
		}//end group zeroedBits

		group ZeroedBytes {
			const Oct2		c_2ZeroBytes := int2oct(0,2);//'0000'O;
			const Oct4		c_4ZeroBytes := int2oct(0,4);//'00000000'O;
			const Oct6		c_6ZeroBytes := int2oct(0,6);//'000000000000'O ;
			const Oct8		c_8ZeroBytes := int2oct(0,8);//'0000000000000000'O ;
			const Oct12		c_12ZeroBytes := int2oct(0,12);//'000000000000000000000000'O ;
			const Oct16		c_16ZeroBytes := int2oct(0,16);//'00000000000000000000000000000000'O ;

			const Oct80		c_80ZeroBytes := int2oct(0,80);//c_16ZeroBytes & c_16ZeroBytes & c_16ZeroBytes & c_16ZeroBytes & c_16ZeroBytes; 
			const Oct160	c_160ZeroBytes := int2oct(0,160);//c_80ZeroBytes & c_80ZeroBytes;
			const Oct320	c_320ZeroBytes := int2oct(0,320);//c_160ZeroBytes & c_160ZeroBytes;
			const Oct640	c_640ZeroBytes := int2oct(0,640);//c_320ZeroBytes & c_320ZeroBytes;
			const Oct1280	c_1280ZeroBytes := int2oct(0,1280);//c_640ZeroBytes & c_640ZeroBytes;
			const Oct1380	c_1380ZeroBytes := int2oct(0,1380);//c_640ZeroBytes & c_640ZeroBytes & c_80ZeroBytes & c_16ZeroBytes & c_4ZeroBytes;
			const octetstring c_256ZeroBytes := int2oct(0,256);//c_160ZeroBytes & c_80ZeroBytes &  c_16ZeroBytes;
			const octetstring c_1KZeroBytes := int2oct(0,1024);//c_256ZeroBytes & c_256ZeroBytes & c_256ZeroBytes & c_256ZeroBytes;
			const octetstring c_4KZeroBytes := int2oct(0,4096);//c_1KZeroBytes & c_1KZeroBytes & c_1KZeroBytes & c_1KZeroBytes;
			const octetstring c_16KZeroBytes := int2oct(0,16384);//c_4KZeroBytes & c_4KZeroBytes & c_4KZeroBytes & c_4KZeroBytes;
			const octetstring c_64KZeroBytes := int2oct(0,65536);//c_16KZeroBytes & c_16KZeroBytes & c_16KZeroBytes & c_16KZeroBytes;
			const octetstring c_128KZeroBytes := int2oct(0,131072);//c_64KZeroBytes & c_64KZeroBytes;

			const UInt16	c_zeroPayloadLength := 0;
			const UInt8		c_trafficClassZero := 0;
			const UInt20	c_flowLabelZero := 0;
			const UInt2		c_uInt2Zero := 0;
			const UInt7		c_uInt7Zero := 0;
			const UInt8		c_uInt8Zero := 0;
			const UInt12	c_uInt12Zero := 0;
			const UInt14	c_uInt14Zero := 0;
			const UInt16	c_uInt16Zero := 0;
			const UInt32	c_uInt32Zero := 0;
		}

		group IpOptions {
			/*
			 * @desc Derived from RFC2473 - to be used in IPsec 
			 * @url http://www.ietf.org/rfc/rfc2473.txt
			*/
			const UInt8		c_optTunnelEncapLimit := 4;

			/*
			 * @desc Derived from RFC2711 - to be used in QoS, 
			 *       multicast - not necessary for the moment
			 * @url http://www.ietf.org/rfc/rfc2711.txt
			*/
			const UInt8		c_optRouterAlert := 5; 		

			/*
			 * @desc Derived from RFC2675
			 * @url http://www.ietf.org/rfc/rfc2675.txt
			*/
			const UInt8		c_optJumboPayload := 194; 

		
				type record OptPad1 {
					UInt8 			optType(c_optPad1)
				}

		group ExtensionHeaderIds {

			const UInt8 	c_hdrExtLen0 := 0;

			const UInt8		c_hopHdr := 0;
			const UInt8		c_tcpHdr := 6;
			const UInt8		c_udpHdr := 17;

			/*
			 * @desc Derived from RFC2473, used in IPsec processing
			 * @url http://www.ietf.org/rfc/rfc2473.txt
			*/
			const UInt8		c_tunneledIpHdr := 41;
			const UInt8		c_routeHdr := 43;
			const UInt8		c_fragHdr := 44;
			const UInt8		c_espHdr := 50;
			const UInt8		c_authHdr := 51;
			const UInt8		c_icmpHdr := 58;
			const UInt8		c_noNextHdr := 59;
			const UInt8		c_dstHdr := 60;

			/*
			 * @desc Derived from ietf-mobileip-ipv6-24.txt
			*/
			const UInt8		c_mipHdr := 135;
		
				with {
					encode "present=bytes(0,1,0);intTag='hdrExtIntLen',getIntTag('hdrExtIntLen')-1";
				}
		
		const HopByHopOption c_hbhOpt_padNSize4 := {
			padN := {
				optType := c_optPadN,
				optLen := c_optPadNLen2,
				padding := c_2ZeroBytes
				type record OptPadN {
					UInt8 			optType(c_optPadN),
					UInt8 			optLen,
					octetstring		padding optional
				}
				with {
					encode "present=bytes(0,1,1);";
					encode (optLen) "tag='optLen';intTag='hdrExtIntLen',getIntTag('hdrExtIntLen')-value-2";
					encode (padding) "length=valueOf(getTag('optLen'));fieldPresent=(valueOf(getTag('optLen'))>0)";
				}

		const HopByHopOption c_hbhOpt_padNSize6 := {
			padN := {
				optType := c_optPadN,
				optLen := c_optPadNLen4,
				padding := c_4ZeroBytes
			}
		}
			}//end group paddingOptions

		const DestOption c_dstOpt_padNSize6 := {
			padN := {
				optType := c_optPadN,
				optLen := c_optPadNLen4,
				padding := c_4ZeroBytes
			}
		}
			group DestOptions { //2460 + MIPv6

		/* Used only in Destination/Hop-by-Hop Option Header
		 * Length is specified in octets
		 */ 
		const octetstring c_genOptSize6_noTypeField := '0400010203'O;
				const UInt8	c_maxNrDestOption := 10;

		/* Used only Neighbor Discovery Options
		 * Length is specified in 8-octets units
				/* @remark In a DestOptionList value either the pad1 or padN 
				 *         option can appear only once!
		        */
		const octetstring c_NdOptSize8_noTypeField := '01000102030405'O;

	} // end group commonConstants

	group commonTypes {

		type enumerated IutRole {
			e_iutHs(0),
			e_iutRt(1)
		}
				type set length (1..c_maxNrDestOption) of DestOption   DestOptionList
				with {
			encode "use=com.testingtech.ttcn.tci.*;";
					encode "elements=valueOf(getTag('hdrExtLen'));"
				}

		type enumerated MacLayer {
			e_eth(0), 
			e_atm(1)
				type union DestOption {
					OptPad1					pad1 ,
					OptPadN					padN ,
					OptTunnelEncapLimit 	tunnelEncapLimit , 
					OptHomeAddress			homeAddressOption,
					octetstring				generalOptionString
				}
				with {
			encode "use=com.testingtech.ttcn.tci.*;";
					encode (generalOptionString) "length=valueOf(getTag('hdrExtLen'))-2;";
				}

		type UInt8 PrefixLength ;//indicates nr of bits to be used as Prefix
		type Ipv6Address Prefix ;
		type Oct16 Ipv6Address;
			}//end group DestOptions

		type record length(1 .. c_maxNrIpv6Address) of Ipv6Address Ipv6AddressList
		with {
			encode "present=isEOF()== false ;elements=valueOf(getTag('hdrExtLen'));"
		}
	
		type record length(1 .. c_maxNrIpv6Address) of Ipv6Address RtHdrDataIpv6AddressList
		with {
			encode "present=isEOF()== false && (valueOf(dec.getTag('routingType')) == 0);elements=valueOf(getTag('hdrExtLen'));"
		}	
		}//end group rfc2460Options

		group rfc2461Options {

			group slla {
		
				const UInt8 c_srcLinkLayerAddress := 1;
		
	
		type Ipv6Address RtHdrDataHomeAddress
		with {
			encode "present=isEOF()== false && (valueOf(dec.getTag('routingType')) == 2)"
		}

				/*
				 * @desc Derived from RFC2461 clause4.6.1 + MIPv6
@@ -277,8 +128,14 @@ module LibIpv6_CommonRfcs_TypesAndValues {
					encode (linkLayerAddr) "length=valueOf(getTag('SLA_optionLength'))*8-2;";
				}
	
			}//end group slla

			group tlla {

				const UInt8 c_tgtLinkLayerAddress := 2;

				/*
		 * @desc Derived from RFC 2461 clause 4.6.1
				 * @desc Derived from RFC 2461 clause 4.6.1 + MIPv6
				 * @url http://www.ietf.org/rfc/rfc2461.txt
				*/
				type record TgtLinkLayerAddress {
@@ -293,6 +150,12 @@ module LibIpv6_CommonRfcs_TypesAndValues {
				}
		
		
			}//end group tlla

			group mtu {
		
				const UInt8 c_mtuOption := 5;

				/*
				 * @desc Derived from RFC 2461 clause 4.6.4 + MIPv6
				 * @url http://www.ietf.org/rfc/rfc2461.txt
@@ -307,33 +170,14 @@ module LibIpv6_CommonRfcs_TypesAndValues {
					encode "present=bytes(0,1,5);"
				}
		
	} // end group commonTypes
			}//end group mtu

	group ipv6Options {

		group rfc2460Options {

		type record OptPad1 {
			UInt8 			optType(c_optPad1)
		}
		with {
			encode "present=bytes(0,1,0);intTag='hdrExtIntLen',getIntTag('hdrExtIntLen')-1";
		}
		}//end group rfc2461Options

		type record OptPadN {
			UInt8 			optType(c_optPadN),
			UInt8 			optLen,
			octetstring		padding optional
		}
		with {
			encode "present=bytes(0,1,1);";
			encode (optLen) "tag='optLen';intTag='hdrExtIntLen',getIntTag('hdrExtIntLen')-value-2";
			encode (padding) "length=valueOf(getTag('optLen'));fieldPresent=(valueOf(getTag('optLen'))>0)";
		}
		group rfc2473Options {

		}//end group rfc2460Options
			const UInt8		c_optTunnelEncapLimit := 4;

		group rfc2473Options {
			/*
			 * @desc Derived from RFC 2473 Section 4.1.1
			 * @url http://www.ietf.org/rfc/rfc2473.txt
@@ -351,6 +195,10 @@ module LibIpv6_CommonRfcs_TypesAndValues {

		group rfc2675Options {

			const UInt8 c_optJumboPayload := 194;
			const UInt32 c_jumboLen8 := 8;
			const UInt32 c_jumboLen128K := 131072;

			/*
			 * @desc Derived from RFC 2675 Section 2
			 * @url http://www.ietf.org/rfc/rfc2675.txt
@@ -368,6 +216,8 @@ module LibIpv6_CommonRfcs_TypesAndValues {

		group rfc2711Options {
	
			const UInt8		c_optRouterAlert := 5; 	

			/*
			 * @desc Derived from RFC 2711 Section 2.1
			 * @url http://www.ietf.org/rfc/rfc2711.txt
@@ -383,76 +233,12 @@ module LibIpv6_CommonRfcs_TypesAndValues {

		}//end group rfc2711Options
	
		
		
		group genericOptions {

		type set length(1 .. c_maxIpv6Options) of Ipv6Option Ipv6OptionList;

		type record Ipv6Option {
			UInt8	optionType,
			UInt8	optionDataLen,
			Oct1to255 optionData optional
		}
		with {
			encode (optionDataLen) "tag='Ipv6optionDataLen';";
			encode (optionData) "length=valueOf(getTag('Ipv6optionDataLen'))-2;";
		}
			
		}//end group genericOptions
		
		group hopOptions {

		/* @remark In a HopByHopOptionList value either the pad1 or padN 
		 *         option can appear only once!
        */
		type set length (1..c_maxNrHopByHopOption) of HopByHopOption HopByHopOptionList
		with {
			encode "elements=getIntTag('hdrExtIntLen');"
		}

		type union HopByHopOption {
			OptPad1				pad1,
			OptPadN				padN , 
			OptJumboPayload		jumboPayload, 
			OptRouterAlert		routerAlert,
			octetstring			generalOptionString
		} 
		with {
			encode (generalOptionString) "length=valueOf(getTag('hdrExtLen'))-2;";
		}
		
		}//end group hopOptions
		
		group rfc2461Options {

		/* @remark In a HopByHopOptionList value either the pad1 or padN 
		 *         option can appear only once!
        */
		type set length (1..c_maxNrDestOption) of DestOption   DestOptionList
		with {
			encode "elements=valueOf(getTag('hdrExtLen'));"
		}

		type union DestOption {
			OptPad1					pad1 ,
			OptPadN					padN ,
			OptTunnelEncapLimit 	tunnelEncapLimit , 
			OptHomeAddress			homeAddressOption,
			octetstring				generalOptionString
		}
		with {
			encode (generalOptionString) "length=valueOf(getTag('hdrExtLen'))-2;";
		}

		}//end group rfc2461Options

		group rfc3775Options {

			/*
			 * @desc  Extra ICMP option introduced by RFC3775, clause 7.3
			*/
		type record AdvertisementInterval {
			type record AdvertisementInterval { //ND + MIPv6
				UInt8 		icmpType (c_advertisementInterval),
				UInt8 		optionLength (1),
				UInt16		reserved,
@@ -465,7 +251,7 @@ module LibIpv6_CommonRfcs_TypesAndValues {
			/*
			 * @desc Extra ICMP option introduced by RFC3775, clause 7.4
			*/
		type record HomeAgentInfo {
			type record HomeAgentInfo { //ND + MIPv6
				UInt8 		icmpType (c_homeAgentInfo),
				UInt8 		optionLength (1),
				UInt16		reserved,
@@ -491,57 +277,22 @@ module LibIpv6_CommonRfcs_TypesAndValues {
				encode "present=bytes(0,1,201);intTag='hdrExtIntLen',getIntTag('hdrExtIntLen')-18";
			}

		group optionValues {
			group mipOptionValues {
				const UInt8	c_bindingRefreshAdvice := 2;
				const UInt8	c_alternateCareofAddress := 3;
				const UInt8	c_nonceIndices := 4;
				const UInt8	c_authorizationData := 5;
				const UInt8 c_advertisementInterval := 7;
				const UInt8 c_homeAgentInfo := 8;
		}
			
			/*
			 * @desc Derived from ietf-mobileip-ipv6-24
			*/
			const UInt8		c_optHomeAddress := 201; 
			}//end group mipOptionValues

			const UInt8	c_optHomeAddress := 201; 
			
		}//end group rfc3775Options


	

	} // end ipv6Options

	group sharedExtensionHeaders {

			/*
	 * @desc Derived from RFC4303 clause 2. 
	*/
	group espHeader {
//		type record EspHeader {
//			// Header
//			UInt32				securityParametersIndex,
//			UInt32				sequenceNumber,		
//			// Payload
//			octetstring			initializationVector optional,
//			ExtensionHeaderList extHdrList optional,
//			octetstring			data optional,
//			octetstring			trafficFlowConfidentialityPadding optional,
//			// Trailer
//			octetstring			padding optional,
//			UInt8				padLength,
//			UInt8				nextHdr,
//			octetstring			integrityCheckValue
//		}

	
		
	}//end group espHeader


	
	} // end sharedExtensionHeaders

	group security {

+56 −16
Original line number Diff line number Diff line
@@ -30,9 +30,9 @@
										template Ipv6Address p_src,
										template Ipv6Address p_dst) := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= c_trafficClassZero ,
			flowLabel 		:= c_flowLabelZero ,
			payloadLength 	:= c_zeroPayloadLength, 
			trafficClass 	:= c_trafficClass0 ,
			flowLabel 		:= c_flowLabel0 ,
			payloadLength 	:= c_ipv6PayloadLength0, 
			nextHeader 		:= p_nextHdr,
			hopLimit 		:= c_hopLimit255,
			sourceAddress 	:= p_src,
@@ -51,9 +51,9 @@
											template Ipv6Address p_src,
											template Ipv6Address p_dst ) := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= c_trafficClassZero ,
			flowLabel 		:= c_flowLabelZero ,
			payloadLength 	:= c_zeroPayloadLength,
			trafficClass 	:= c_trafficClass0 ,
			flowLabel 		:= c_flowLabel0 ,
			payloadLength 	:= c_ipv6PayloadLength0,
			nextHeader 		:= p_nextHdr,
			hopLimit 		:= p_hopLimit,
			sourceAddress 	:= p_src,
@@ -65,8 +65,8 @@
	    */
		template Ipv6Header mw_ipHdr := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= ?, //c_trafficClassZero ,
			flowLabel 		:= c_flowLabelZero ,
			trafficClass 	:= ?, //c_trafficClass0 ,
			flowLabel 		:= c_flowLabel0 ,
			payloadLength 	:= ?,
			nextHeader 		:= ?,
			hopLimit 		:= ?,
@@ -79,8 +79,8 @@
	    */
		template Ipv6Header mw_ipHdr_nextHdr ( UInt8 p_nextHdr ) := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= ?, //c_trafficClassZero ,
			flowLabel 		:= c_flowLabelZero ,
			trafficClass 	:= ?, //c_trafficClass0 ,
			flowLabel 		:= c_flowLabel0 ,
			payloadLength 	:= ?,
			nextHeader 		:= p_nextHdr,
			hopLimit 		:= ?,
@@ -170,8 +170,8 @@
		*/
		template Ipv6Header mw_ipHdr_dAD_unspecSrc_dst (template Ipv6Address p_dst) := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= c_trafficClassZero ,
			flowLabel 		:= c_flowLabelZero ,
			trafficClass 	:= c_trafficClass0 ,
			flowLabel 		:= c_flowLabel0 ,
			payloadLength 	:= ?,
			nextHeader 		:= c_icmpHdr,
			hopLimit 		:= ?,
@@ -374,9 +374,9 @@
										template Ipv6Address p_dst) := {
			tunneledIpv6 := {
				version 		:= c_ipv6Version ,
				trafficClass 	:= c_trafficClassZero ,
				flowLabel 		:= c_flowLabelZero ,
				payloadLength 	:= c_zeroPayloadLength, //16
				trafficClass 	:= c_trafficClass0 ,
				flowLabel 		:= c_flowLabel0 ,
				payloadLength 	:= c_ipv6PayloadLength0, //16
				nextHeader 		:= p_nextHdr,
				hopLimit 		:= c_hopLimit255,
				sourceAddress 	:= p_src,
@@ -410,6 +410,46 @@

	} // end extensionHeader

	group hbhOptionTemplates {
		
		template HopByHopOption m_hbhOpt_padNSize6 := {
			padN := {
				optType := c_optPadN,
				optLen := c_optPadNLen4,
				padding := c_4ZeroBytes
			}
		}	
	} //end group hbhOptionTemplates

	group hop_By_Hop_Options {

		/*
		 *	@param  p_hbhOpt First element in the Hop by hop option list
		*/
		template HopByHopOptionList m_hbhOptList_1Elem ( template HopByHopOption p_hbhOpt ) := {
			p_hbhOpt
		}

		/*
		 *	@param  p_option Hop by hop option(s) encoded in octetstring
		*/
		template HopByHopOption m_hbhOpt_generalOption ( template octetstring p_option ) := {
			generalOptionString := p_option
		}

		/*
		 *	@param  p_optJumboPayloadLength Length of the jumbogram in bytes
		*/
		template HopByHopOption m_hbhOpt_jumboPayloadOption ( UInt32 p_optJumboPayloadLength ) := {
			jumboPayload := {
				optType := c_optJumboPayload,
				optLen := c_optLen4,
				optJumboPayloadLength := p_optJumboPayloadLength
			}
		}

	} // end group hop_By_Hop_Options

	group generalIpv6MessageTemplates{

		/*
+191 −119

File changed.

Preview size limit exceeded, changes collapsed.

Loading