Commit c75013f8 authored by mullers's avatar mullers
Browse files

mn_ha, mn_cn, ha_cn naming fixed in pre+postambles, TCs, fns

parent c3d0a2a7
Loading
Loading
Loading
Loading
+38 −123
Original line number Diff line number Diff line
@@ -497,7 +497,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
	 * @param p_seqNr Seq Nr of Binding Update
 	 * @param p_timeUnits Lifetiem of Binding Update
	*/
	function f_mn_cn_sendBindUpAndWaitForBindAckOffHome(
	function f_mnSendBindUpToCnAndWaitForBindAckOffHome(
				in template Ipv6Address p_mnCoaTn,
				in template Ipv6Address p_haGlaNut,
				in template Ipv6Address p_mnHoaTn,
@@ -551,13 +551,13 @@ module LibIpv6_Rfc3775Mipv6_Functions {
				}
			[]	tc_ac.timeout{
					v_ret :=  e_timeout;
					log("**** f_sendBindUpAndWaitForBindAckOffHome: ERROR: tc_ac.timeout **** ");
					log("**** f_mnSendBindUpToCnAndWaitForBindAckOffHome: ERROR: tc_ac.timeout **** ");
				}		
		} // end alt

		return v_ret;

	}//end f_mn_cn_sendBindUpAndWaitForBindAckOffHome
	}//end f_mnSendBindUpToCnAndWaitForBindAckOffHome

	/*
	 * @desc  Test Node is At Home and sends BindUpdate and waits for Binding Ack
@@ -566,7 +566,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
	 * @param p_seqNr Seq Nr of Binding Update
	 * @param p_timeUnits Lifetiem of Binding Update
	*/
	function f_mn_cn_sendBindUpAndWaitForBindAckAtHome(
	function f_mnSendBindUpToCnAndWaitForBindAckAtHome(
				in template Ipv6Address p_mnHoaTn,
				in template Ipv6Address p_cnGlaNut,
				in UInt16 p_seqNr,
@@ -609,13 +609,13 @@ module LibIpv6_Rfc3775Mipv6_Functions {
				}
			[]	tc_ac.timeout{
					v_ret :=  e_timeout;
					log("**** f_sendBindUpAndWaitForBindAckOffHome: ERROR: tc_ac.timeout **** ");
					log("**** f_mnSendBindUpToCnAndWaitForBindAckAtHome: ERROR: tc_ac.timeout **** ");
				}		
		} // end alt

		return v_ret;

	}//end f_mn_cn_sendBindUpAndWaitForBindAckAtHome
	}//end f_mnSendBindUpToCnAndWaitForBindAckAtHome



@@ -872,7 +872,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
 	 * @param p_cnGla Global Address of CN (test node 2)
	 * @param p_mnHoa Mobile Node Home Address of test node 1
	*/
	function f_cn_ha_waitForHomeTestInitAndReply(	in template Ipv6Address p_cnGla,
	function f_cnWaitForHomeTestInitFromHaAndReply(	in template Ipv6Address p_cnGla,
											in template Ipv6Address p_mnHoa)
	runs on Ipv6Node
	return FncRetCode {
@@ -897,7 +897,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
				}
			[]	tc_wait.timeout{
					v_ret :=  e_timeout;
					log("**** f_cn_ha_waitForHomeTestInitAndReply: ERROR: tc_ac.timeout **** ");
					log("**** f_cnWaitForHomeTestInitFromHaAndReply: ERROR: tc_ac.timeout **** ");
					return v_ret;
				}		
		} // end alt
@@ -913,66 +913,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {

		return v_ret;

	}//end f_cn_ha_waitForHomeTestInitAndReply

	/*
	 * @desc  Test Node waits for Home Test Init and replies with Home Test
	 *			in Drive and Sniff mode
 	 * @param p_cnGla Global Address of CN (test node 2)
	 * @param p_mnHoa Mobile Node Home Address of test node 1
	*/
	function f_waitForHomeTestInitAndReply_DS(	in template Ipv6Address p_cnGla,
											in template Ipv6Address p_mnHoa)
	runs on Ipv6Node
	return FncRetCode {
		var FncRetCode v_ret;

		tc_wait.start;
		alt {
			[]	ipPort.receive(mw_homeTestInit_noData(	c_mobileHdr,
												p_mnHoa,
												p_cnGla,
												m_extHdrList_1Elem( mw_extHdr_mobileHeader (	c_noNextHdr,
																							c_homeTestInit,
																							mw_hoti)))) {
					tc_wait.stop;	
					v_ret := e_success ;
				}
			[]	tc_wait.timeout{
					v_ret :=  e_timeout;
					log("**** f_waitForHomeTestInitAndReply: ERROR: tc_ac.timeout **** ");
					return v_ret;
				}		
		} // end alt

//		v_ret := f_sendGeneralIpv6(m_generalIpv6_srcDst (c_mobileHdr,
//											p_cnGla,
//											p_mnHoa,
//											m_extHdrList_1Elem( m_extHdr_mobileHeader (	c_noNextHdr,
//																						c_homeTest,
//																						m_hot))));
		tc_wait.start;
		alt {
			[]	ipPort.receive(mw_homeTest_noData(
									c_mobileHdr,
									p_cnGla,
									p_mnHoa,
									m_extHdrList_1Elem( mw_extHdr_mobileHeader (	c_noNextHdr,
																				c_homeTest,
																				mw_hot)))) {
					tc_wait.stop;	
					v_ret := e_success ;
				}
			[]	tc_wait.timeout{
					v_ret :=  e_timeout;
					log("**** f_waitForHomeTestInitAndReply: ERROR: tc_ac.timeout **** ");
					return v_ret;
				}		
		} // end alt

		return v_ret;

	}//end f_waitForHomeTestInitAndReply_DS
	}//end f_cnWaitForHomeTestInitFromHaAndReply

	/*
	 * @desc  Test Node sends Home Test Init and waits for Home Test
@@ -981,7 +922,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
 	 * @param p_cnGla Global Address of CN (test node 2)
	 * @param p_haGlaNut Home Agent Address of IUT
	*/
	function f_mn_ha_sendHomeTestInitAndWaitForReply(	in template Ipv6Address p_mnCoa,
	function f_mnSendHomeTestInitViaHaToCnAndWaitForReply(	in template Ipv6Address p_mnCoa,
														in template Ipv6Address p_mnHoa,
														in template Ipv6Address p_cnGla,
														in template Ipv6Address p_haGlaNut)
@@ -992,7 +933,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {

		v_ret := f_sendHoti(m_homeTestInit (
										c_tunneledIpHdr,
										p_mnCoa, //TODO, it should be the home address
										p_mnCoa,
										p_haGlaNut,
										m_extHdrList_2Elem(
											m_extHdr_tunneledHeader(c_mobileHdr, p_mnHoa, p_cnGla),
@@ -1019,25 +960,25 @@ module LibIpv6_Rfc3775Mipv6_Functions {
					}
					else {
						v_ret :=  e_error;
						log("**** f_mn_ha_sendHomeTestInitAndWaitForReply: ERROR: received HomeInitCookie does not match sent HomeInitCookie **** ");
						log("**** f_mnSendHomeTestInitViaHaToCnAndWaitForReply: ERROR: received HomeInitCookie does not match sent HomeInitCookie **** ");
					}
				}
			[]	tc_ac.timeout{
					v_ret :=  e_timeout;
					log("**** f_mn_ha_sendHomeTestInitAndWaitForReply: ERROR: tc_ac.timeout **** ");
					log("**** f_mnSendHomeTestInitViaHaToCnAndWaitForReply: ERROR: tc_ac.timeout **** ");
				}		
		} // end alt

		return v_ret;

	}//end f_mn_ha_sendHomeTestInitAndWaitForReply
	}//end f_mnSendHomeTestInitViaHaToCnAndWaitForReply

	/*
	 * @desc  Test Node sends Home Test Init and waits for Home Test
	 * @param p_mnHoa Mobile Node Home Address of test node 1
 	 * @param p_cnGla Global Address of CN (test node 2)
	*/
	function f_ha_cn_sendHomeTestInitAndWaitForReply(	
	function f_haSendHomeTestInitToCnAndWaitForReply(	
		in template Ipv6Address p_mnHoa,
		in template Ipv6Address p_cnGla)
	runs on Ipv6Node
@@ -1072,18 +1013,18 @@ module LibIpv6_Rfc3775Mipv6_Functions {
					}
					else {
						v_ret :=  e_error;
						log("**** f_ha_cn_sendHomeTestInitAndWaitForReply: ERROR: received HomeInitCookie does not match sent HomeInitCookie **** ");
						log("**** f_haSendHomeTestInitToCnAndWaitForReply: ERROR: received HomeInitCookie does not match sent HomeInitCookie **** ");
					}
				}
			[]	tc_ac.timeout{
					v_ret :=  e_timeout;
					log("**** f_ha_cn_sendHomeTestInitAndWaitForReply: ERROR: tc_ac.timeout **** ");
					log("**** f_haSendHomeTestInitToCnAndWaitForReply: ERROR: tc_ac.timeout **** ");
				}		
		} // end alt

		return v_ret;

	}//end f_ha_cn_sendHomeTestInitAndWaitForReply
	}//end f_haSendHomeTestInitToCnAndWaitForReply


	}//end group homeTestFns
@@ -1096,7 +1037,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
	 * @param p_mnHoa Mobile Node Home Address of test node 1
 	 * @param p_cnGla Global Address of CN (test node 2)
	*/
	function f_mn_cn_sendCareOfTestInitAndWaitForReply(	
	function f_mnSendCareOfTestInitToCnAndWaitForReply(	
		in template Ipv6Address p_mnCoa,
		in template Ipv6Address p_cnGla)
	runs on Ipv6Node
@@ -1131,20 +1072,18 @@ module LibIpv6_Rfc3775Mipv6_Functions {
					}
					else {
						v_ret :=  e_error;
						log("**** f_mn_cn_sendCareOfTestInitAndWaitForReply: ERROR: received HomeInitCookie does not match sent HomeInitCookie **** ");
						log("**** f_mnSendCareOfTestInitToCnAndWaitForReply: ERROR: received HomeInitCookie does not match sent HomeInitCookie **** ");
					}
				}
			[]	tc_ac.timeout{
					v_ret :=  e_timeout;
					log("**** f_mn_cn_sendCareOfTestInitAndWaitForReply: ERROR: tc_ac.timeout **** ");
					log("**** f_mnSendCareOfTestInitToCnAndWaitForReply: ERROR: tc_ac.timeout **** ");
				}		
		} // end alt

		return v_ret;

	}//end f_mn_cn_sendCareOfTestInitAndWaitForReply

	
	}//end f_mnSendCareOfTestInitToCnAndWaitForReply
		
}//end group careOfTestFns

@@ -1601,7 +1540,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
	 * @param p_mnHoaTn Home Agent Addresses of test node
	 * @param p_haAcaNut Home Agent Anycast Address of node under test
	*/
	function f_mn_ha_null2MipPrefixDiscovery(	in template Ipv6Address p_mnCoaTn,
	function f_mnNull2MipPrefixDiscoveryWithHa(	in template Ipv6Address p_mnCoaTn,
												in template Ipv6Address p_mnHoaTn,
												in template Ipv6Address p_haAcaNut)
	runs on Ipv6Node
@@ -1630,7 +1569,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
														v_haGlasNut[0]);
		}
		return v_ret;
	}//end function f_mn_ha_null2MipPrefixDiscovery
	}//end function f_mnNull2MipPrefixDiscoveryWithHa

	/*
	 * @desc  Null to Return Routabilty (HA = IUT)
@@ -1640,7 +1579,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
	 * @param p_haAcaNut Home Agent Anycast Address of node under test
	 * @param p_haGlasNut Global Addresses of node under test
	*/
	function f_mn_ha_null2ReturnRoutability(	in template Ipv6Address p_mnCoaTn,
	function f_mnNull2ReturnRoutabilityWithHa(	in template Ipv6Address p_mnCoaTn,
												in template Ipv6Address p_mnHoaTn,
												in template Ipv6Address p_glaCnTn,
												in template Ipv6Address p_haAcaNut,
@@ -1664,7 +1603,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
													c_lFlag0); //added by PK
		}
		if(v_ret == e_success) {
			v_ret := f_mn_ha_sendHomeTestInitAndWaitForReply(	p_mnCoaTn,
			v_ret := f_mnSendHomeTestInitViaHaToCnAndWaitForReply(	p_mnCoaTn,
														p_mnHoaTn,
														p_glaCnTn,
														v_haGlasNut[0]);
@@ -1672,7 +1611,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
		}
		p_haGlasNut := v_haGlasNut;
		return v_ret ;
	}//end function f_haNull2ReturnRoutability
	}//end function f_mnNull2ReturnRoutabilityWithHa

	
	/*
@@ -1682,7 +1621,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
	 * @param p_glaCnTn Global Address of test node 2
	 * @param p_haAcaNut Home Agent Anycast Address of node under test
	*/
	function f_mn_ha_null2ReverseTunneling(	in template Ipv6Address p_mnCoaTn,
	function f_mnNull2ReverseTunnelingWithHa(	in template Ipv6Address p_mnCoaTn,
											in template Ipv6Address p_mnHoaTn,
											in template Ipv6Address p_glaCnTn,
											in template Ipv6Address p_haAcaNut)
@@ -1693,7 +1632,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
		var Ipv6AddressList v_haGlasNut := {c_16ZeroBytes};
		var EchoReply v_echoRep;

		v_ret := f_mn_ha_null2ReturnRoutability(	p_mnCoaTn,
		v_ret := f_mnNull2ReturnRoutabilityWithHa(	p_mnCoaTn,
													p_mnHoaTn,
													p_glaCnTn,
													p_haAcaNut,
@@ -1708,21 +1647,21 @@ module LibIpv6_Rfc3775Mipv6_Functions {
											v_echoRep);
		}
		return v_ret ;
	}//end function f_mn_ha_null2ReverseTunneling
	}//end function f_mnNull2ReverseTunnelingWithHa

	/*
	 * @desc  Null to Reverse Tunneling (HA = IUT) on HA's interface towards CN
 	 * @param p_glaCnTn Global Address of test node
	 * @param p_mnHoaTn Home Agent Addresses of test node
	 */
	function f_cn_ha_null2ReverseTunneling(	in template Ipv6Address p_glaCnTn,
	function f_cnNull2ReverseTunnelingWithHa(	in template Ipv6Address p_glaCnTn,
											in template Ipv6Address p_mnHoaTn)
	runs on Ipv6Node
	return FncRetCode {
		//Variables
		var FncRetCode v_ret := e_success;

		v_ret := f_cn_ha_waitForHomeTestInitAndReply(	p_glaCnTn,
		v_ret := f_cnWaitForHomeTestInitFromHaAndReply(	p_glaCnTn,
												p_mnHoaTn);
		if(v_ret == e_success) {
			v_ret := f_replyToEchoRequest(	p_glaCnTn,
@@ -1731,31 +1670,7 @@ module LibIpv6_Rfc3775Mipv6_Functions {
											c_defSeqNo);
		}
		return v_ret;
	}//end function f_cn_ha_null2ReverseTunneling

	/*
	 * @desc  Null to Reverse Tunneling (HA = IUT) on HA's interface towards CN
 	 * @param p_glaCnTn Global Address of test node
	 * @param p_mnHoaTn Home Agent Addresses of test node
	 */
	function f_cn_ha_null2ReverseTunneling_DS(	in template Ipv6Address p_glaCnTn,
											in template Ipv6Address p_mnHoaTn)
	runs on Ipv6Node
	return FncRetCode {
		//Variables
		var FncRetCode v_ret := e_success;

		v_ret := f_waitForHomeTestInitAndReply_DS(	p_glaCnTn,
												p_mnHoaTn);
		if(v_ret == e_success) {
			v_ret := f_replyToEchoRequest_DS(	p_glaCnTn,
											p_mnHoaTn,
											c_defId, 
											c_defSeqNo);
		}
		return v_ret;
	}//end function f_cn_ha_null2ReverseTunneling_DS

	}//end function f_cnNull2ReverseTunnelingWithHa

	}//end group statefulMipFns