Commit c3d0a2a7 authored by mullers's avatar mullers
Browse files

Preamble for secInit added

parent ed9488e9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -125,4 +125,7 @@
	external function fx_encrypt(in UInt31 p_spi, in EspHeader p_espHeader)
	return octetstring;

	external function fx_setSecurityParameters(in Sa p_sa)
	return FncRetCode;

}// end module LibIpv6_ExternalFunctions
+9 −3
Original line number Diff line number Diff line
@@ -575,11 +575,13 @@ group rfc3775Mipv6_ExtHdrFunctions {

group rfc4303Esp_ExtHdrFunctions {
	
	function f_initParams()
	function f_init_ipSecParams()
	runs on LibIpv6Node {
		
		var FncRetCode v_ret := e_error;

		vc_sad[0] := {
			spi := PX_SPI/*f_createSpi()*/,
			spi := 0/*f_createSpi()*/,
			seqNr := c_uInt32Zero,
			// AH Integrity
			ahIntegrityAlgo := PX_INTEGRITY_ALGO,
@@ -597,7 +599,11 @@ group rfc4303Esp_ExtHdrFunctions {
			ipSecProtocolMode := PX_IP_SEC_PROTOCOL_MODE
		}

	}//end f_initParams
		//TODO chose in function of PX_SPI the SAD to be used for testing
		v_ret := fx_setSecurityParameters(vc_sad[0]);
		if (v_ret != e_success) {log("fx_setSecurityParameters: Error when settign security parameters");}
		
	}//end f_init_ipSecParams


	/*
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ module LibIpv6_ModuleParameters {
	modulepar { CombinedModeAlgo PX_COMBINED_MODE_ALGO := e_null }

	/*
	 * @desc SPI in vc_sad[0]
	 * @desc Which SPI shall be used for testing?
	*/
	modulepar {UInt32 PX_SPI := 1;}