Commit e888c995 authored by mullers's avatar mullers
Browse files

f_PR_defaultRt_hut_noEchoProc added

parent 9bff1816
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -113,8 +113,8 @@
	 * @param 	p_espPayload EspPayload to be byteAligned
	 * @return 	octetstring
	*/
	external function fx_generatePadding(in UInt31 p_spi, EspPayload p_espPayload)
	return octetstring;
//	external function fx_generatePadding(in UInt31 p_spi, EspPayload p_espPayload)
//	return octetstring;

	/* @desc 	This external function encrypts the EspPayload(except iv) + padding + padLen + nextHeader 
	 *
@@ -122,8 +122,8 @@
	 * @param 	p_espHeader Esp Header to be encoded to octetstring
	 * @return 	octetstring Is used for calculating the ICV
	*/
	external function fx_encrypt(in UInt31 p_spi, in EspHeader p_espHeader)
	return octetstring;
//	external function fx_encrypt(in UInt31 p_spi, in EspHeader p_espHeader)
//	return octetstring;

	external function fx_setSecurityParameters(in Sa p_sa)
	return FncRetCode;
+27 −49
Original line number Diff line number Diff line
@@ -192,6 +192,11 @@ module LibIpv6_Interface_Templates {
					p_extHdr
				}

				/*
				 *	@param  p_extHdr At least this element in extension header
				*/
				template ExtensionHeaderList mw_extHdrList_1Elem_superSet(template ExtensionHeader p_extHdr) := superset(p_extHdr);

				/*
				 *	@param  p_extHdr1 First element in extension header
				 *	@param  p_extHdr2 Second element in extension header
@@ -1303,41 +1308,7 @@ module LibIpv6_Interface_Templates {
			
	} //end group rfc4302Ah_ExtHdrTemplates
	group rfc4303Esp_ExtHdrTemplates {
		//		template ExtensionHeader mw_extHdr_espHeader(	in UInt32 p_securityParametersIndex,
		//														in UInt32 p_sequenceNumber,
		//														in template PlaintextData p_plaintextData,
		//														in UInt8 p_nextHdr) := {
		//			espHeader := {
		//				// Header
		//				securityParametersIndex := 0,
		//				sequenceNumber := 0,		
		//				// Payload
		//				iv := *,
		//				espPayloadData := {plaintextData:= p_plaintextData},
		//				tfcPadding := *,
		//				// Trailer
		//				padding := *,
		//				padLength := ?,
		//				nextHdr := p_nextHdr,
		//				icv := *
		//			}
		//		}
		/*		template ExtensionHeader mw_extHdr_espHeader(	in UInt32 p_securityParametersIndex,
																in UInt32 p_sequenceNumber,
																in template EspIpDatagram p_espIpDatagram,
																in UInt8 p_nextHdr) := {
					espHeader := {
						// Header
						securityParametersIndex := 0,
						sequenceNumber := 0,		
						// Payload
						espPayload := {
							plaintextData:= p_plaintextData
						},
						icv := *
					}
				} */
		template ExtensionHeader mw_extHdr_espHeader(
		template ExtensionHeader m_extHdr_espHeader(
			in UInt32 p_spi,
			in UInt32 p_seqNr,
			in template EspIpDatagram p_espIpDatagram,
@@ -1349,12 +1320,15 @@ module LibIpv6_Interface_Templates {
				espPayload := {
					iv := omit,
					espIpDatagram := p_espIpDatagram,
					tfcPadding := * },
					tfcPadding := omit },
				// Trailer
				padding := *, padLength := ?, nextHdr := p_nextHdr, icv := * }
				padding := omit,
				padLength := 0,
				nextHdr := p_nextHdr,
				icv := omit }
		}

		template ExtensionHeader m_extHdr_espHeader(
		template ExtensionHeader mw_extHdr_espHeader(
			in UInt32 p_spi,
			in UInt32 p_seqNr,
			in template EspIpDatagram p_espIpDatagram,
@@ -1364,22 +1338,26 @@ module LibIpv6_Interface_Templates {
				spi := p_spi, seqNbr := p_seqNr,
				// Payload
				espPayload := {
					iv := omit,
					iv := *,
					espIpDatagram := p_espIpDatagram,
					tfcPadding := omit },
					tfcPadding := * },
				// Trailer
				padding := omit,
				padLength := 0,
				padding := *,
				padLength := ?,
				nextHdr := p_nextHdr,
				icv := omit }
				icv := * }
		}


	} //end group rfc4303Esp_ExtHdrTemplates
	group cryptoTemplates {

		template EspIpDatagram m_espIpDatagram(
			template ExtensionHeaderList p_extHdrList,
			template Ipv6Payload p_ipv6Payload) := {
			extHdrList := p_extHdrList,
			ipv6Payload := p_ipv6Payload
		}

	} //end group cryptoTemplates
} // end module LibIpv6_Interface_Templates
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@
			if(f_setExtensionHeaders(	v_ipPkt,
										v_ipPkt.ipv6Hdr.sourceAddress,
										v_ipPkt.ipv6Hdr.destinationAddress) != e_success) {
				log(" **** EchoRequestWithEsp: Error when calculating length of extension headers ****");
				log(" **** f_sendEchoRequestWithEsp: Error when calculating length of extension headers ****");
				return e_error;
			}
		}
+16 −3
Original line number Diff line number Diff line
@@ -614,6 +614,8 @@ module LibIpv6_Rfc2463Icmpv6_Templates {
			extHdrList := p_extHdrList,
			ipv6Payload := omit
		}


	} //end group ICMPv6_Echo_Request_Esp

		/*
@@ -694,6 +696,7 @@ module LibIpv6_Rfc2463Icmpv6_Templates {


	group ICMPv6_EchoRequestMsg {

		template EchoRequestMsg m_echoRequestMsg(UInt16 p_id, UInt16 p_seqNr) := {
			icmpType := c_echoRequestMsg,
			icmpCode := c_icmpCode0,
@@ -702,6 +705,16 @@ module LibIpv6_Rfc2463Icmpv6_Templates {
			sequenceNumber := p_seqNr,
			data := omit
		}

		template EchoRequestMsg mw_echoRequestMsg(UInt16 p_id, UInt16 p_seqNr) := {
			icmpType := c_echoRequestMsg,
			icmpCode := c_icmpCode0,
			checksum := ?,
			identifier := p_id,
			sequenceNumber := p_seqNr,
			data := omit
		}

	} //end group ICMPv6_EchoRequestPayload
	group ICMPv6_Other {
		/*