Commit b094ed15 authored by schmitting's avatar schmitting
Browse files

Another day of work on RFC2765 done

parent 75adfea2
Loading
Loading
Loading
Loading
+994 −1

File changed.

Preview size limit exceeded, changes collapsed.

+216 −25
Original line number Diff line number Diff line
@@ -658,6 +658,7 @@

	/*
	 * @desc 	A ICMP packet with parametrized type is sent.
	 * @param 	p_icmpType ICMPv4 type of message to be sent
	 * @param	p_paramsRelayRt01 Address Information of Test Node 1
	 * @param	p_paramsHs02 Address Information of Test Node 2
	*/
@@ -766,51 +767,51 @@
	
	/*
	 * @desc 	Test node 2 is on the IUTs IPv6 side and checks that packet is not translated.
	 * @param	p_paramsRelayRt01 Address Information of Test Node 1
	 * @param	p_paramsHs02 Address Information of Test Node 2
	 * @param	p_paramsHs02 Address Information of Testing Node
	 * @param	p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter
	*/
	function f_TP_ipv4DiscardPacket_4(
		template Ipv6NodeParams p_paramsRelayRt01,
		template Ipv6NodeParams p_paramsHs02
	function f_TP_ipv4DiscardPacket_6(
		template Ipv6NodeParams p_paramsHs02,
		template Ipv6NodeParams p_paramsRelayRt01
	)
	runs on Ipv6Node {

		var FncRetCode v_ret := e_error;
		var FncRetCode v_ret;
		
		//check that packet is not translated
		v_ret := f_discardPacket() ;

		if(v_ret != e_success) {
			log("**** f_TP_ipv4DiscardPacket_4: Error:  Problem in f_discardPacket. ****");
			log("**** f_TP_ipv4DiscardPacket_6: Error:  Problem in f_discardPacket. ****");
		}

		f_selfOrClientSyncAndVerdict(c_tbDone, v_ret);

	}//end f_TP_ipv4DiscardPacket_4
	}//end f_TP_ipv4DiscardPacket_6
	
	/*
	 * @desc 	Test node 2 is on the IUTs IPv6 side and checks that packet is not translated.
	 * @param	p_paramsHs02 Address Information of Testing Node
	 * @param	p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter
	 * @param	p_paramsRelayRt01 Address Information of Test Node 1
	 * @param	p_paramsHs02 Address Information of Test Node 2
	*/
	function f_TP_ipv4DiscardPacket_6(
		template Ipv6NodeParams p_paramsHs02,
		template Ipv6NodeParams p_paramsRelayRt01
	function f_TP_ipv6DiscardPacket_4(
		template Ipv6NodeParams p_paramsRelayRt01,
		template Ipv6NodeParams p_paramsHs02
	)
	runs on Ipv6Node {

		var FncRetCode v_ret;
		var FncRetCode v_ret := e_error;

		//check that packet is not translated
		v_ret := f_discardPacket() ;

		if(v_ret != e_success) {
			log("**** f_TP_ipv4DiscardPacket_6: Error:  Problem in f_discardPacket. ****");
			log("**** f_TP_ipv6DiscardPacket_4: Error:  Problem in f_discardPacket. ****");
		}

		f_selfOrClientSyncAndVerdict(c_tbDone, v_ret);

	}//end f_TP_ipv4DiscardPacket_6
	}//end f_TP_ipv6DiscardPacket_4

	/*
	 * @desc 	Wait for IP6-to-IPv4 translated packet.
@@ -904,7 +905,7 @@
				p_paramsHs02);

		if(v_ret != e_success) {
			log("**** f_TP_ipv6TranslatePacketZeroSourceAddress_4: Error:  Problem in f_waitPacketNoFragmentationHeader_4. ****");
			log("**** f_TP_ipv6TranslatePacketZeroSourceAddress_4: Error:  Problem in f_waitPacketZeroSourceAddress_4. ****");
		}

		f_selfOrClientSyncAndVerdict(c_tbDone, v_ret);
@@ -992,4 +993,194 @@

	}//end f_TP_ipv6TranslatePacketWrongSourceAddress_6
	
	/*
	 * @desc 	Wait for translated ICMP message.
	 * @param 	p_icmpType ICMPv4 packet to expect 
	 * @param	p_paramsRelayRt01 Address Information of Test Node 1
	 * @param	p_paramsHs02 Address Information of Test Node 2
	*/
	function f_TP_ipv6TranslatePacket_4(
		UInt8 p_icmpType,
		template Ipv6NodeParams p_paramsRelayRt01,
		template Ipv6NodeParams p_paramsHs02
	)
	runs on Ipv6Node {

		var FncRetCode v_ret := e_error;

		v_ret := f_waitTranslatedPacket_4 (
				p_icmpType,
				p_paramsRelayRt01,
				p_paramsHs02);

		if(v_ret != e_success) {
			log("**** f_TP_ipv6TranslatePacket_4: Error:  Problem in f_waitTranslatedPacket_4. ****");
		}

		f_selfOrClientSyncAndVerdict(c_tbDone, v_ret);

	}//end f_TP_ipv6TranslatePacket_4

	/*
	 * @desc 	Test node 2 is on the IUTs IPv6 side and sends a ICMPv6 message with parametrized type.
	 * @param 	p_icmpType ICMPv6 type of message to be sent
	 * @param	p_paramsHs02 Address Information of Testing Node
	 * @param	p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter
	*/
	function f_TP_ipv6TranslatePacket_6(
		UInt8 p_icmpType,
		template Ipv6NodeParams p_paramsHs02,
		template Ipv6NodeParams p_paramsRelayRt01
	)
	runs on Ipv6Node {

		var FncRetCode v_ret;
		
		//send packet
		v_ret := f_sendPacketForTranslate_6( p_icmpType,
											 p_paramsHs02.gla,
							   			   	 p_paramsRelayRt01.gla) ;

		if(v_ret != e_success) {
			log("**** f_TP_ipv6TranslatePacket_6: Error:  Problem in f_sendPacketForTranslate_6. ****");
		}

		f_selfOrClientSyncAndVerdict(c_tbDone, v_ret);

	}//end f_TP_ipv6TranslatePacket_6
	
	/*
	 * @desc 	Wait for translated ICMP message.
	 * @param 	p_icmpCode ICMPv4 code to expect in Destination Unreachable message
	 * @param	p_paramsRelayRt01 Address Information of Test Node 1
	 * @param	p_paramsHs02 Address Information of Test Node 2
	*/
	function f_TP_ipv6TranslateDestinationUnreachable_4(
		UInt8 p_icmpCode,
		template Ipv6NodeParams p_paramsRelayRt01,
		template Ipv6NodeParams p_paramsHs02
	)
	runs on Ipv6Node {

		var FncRetCode v_ret := e_error;

		v_ret := f_waitTranslatedDestinationUnreachable_4 (
				p_icmpCode,
				p_paramsRelayRt01,
				p_paramsHs02);

		if(v_ret != e_success) {
			log("**** f_TP_ipv6TranslateDestinationUnreachable_4: Error:  Problem in f_waitTranslatedDestinationUnreachable_4. ****");
		}

		f_selfOrClientSyncAndVerdict(c_tbDone, v_ret);

	}//end f_TP_ipv6TranslateDestinationUnreachable_4

	/*
	 * @desc 	Test node 2 is on the IUTs IPv6 side and sends a ICMPv6 Destination Unreachable message.
	 * @param 	p_icmpCode ICMPv6 code to send in Destination Unreachable message
	 * @param	p_paramsHs02 Address Information of Testing Node
	 * @param	p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter
	*/
	function f_TP_ipv6TranslateDestinationUnreachable_6(
		UInt8 p_icmpCode,
		template Ipv6NodeParams p_paramsHs02,
		template Ipv6NodeParams p_paramsRelayRt01
	)
	runs on Ipv6Node {

		var FncRetCode v_ret;
		
		//send packet
		v_ret := f_sendDestinationUnreachableForTranslate_6( p_icmpCode,
													 		 p_paramsHs02.gla,
							   			   			  		 p_paramsRelayRt01.gla) ;

		if(v_ret != e_success) {
			log("**** f_TP_ipv6TranslateDestinationUnreachable_6: Error:  Problem in f_sendDestinationUnreachableForTranslate_6. ****");
		}

		f_selfOrClientSyncAndVerdict(c_tbDone, v_ret);

	}//end f_TP_ipv6TranslateDestinationUnreachable_6
	
	/*
	 * @desc 	Test node 2 is on the IUTs IPv6 side and sends a ICMPv6 Parameter Problem message.
	 * @param 	p_icmpCode ICMPv6 code to send in Destination Unreachable message
	 * @param	p_paramsHs02 Address Information of Testing Node
	 * @param	p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter
	*/
	function f_TP_ipv6TranslateParameterProblem_6(
		UInt8 p_icmpCode,
		template Ipv6NodeParams p_paramsHs02,
		template Ipv6NodeParams p_paramsRelayRt01
	)
	runs on Ipv6Node {

		var FncRetCode v_ret;
		
		//send packet
		v_ret := f_sendParameterProblemForTranslate_6( p_icmpCode,
													   p_paramsHs02.gla,
							   			   			   p_paramsRelayRt01.gla) ;

		if(v_ret != e_success) {
			log("**** f_TP_ipv6TranslateParameterProblem_6: Error:  Problem in f_sendParameterProblemForTranslate_6. ****");
		}

		f_selfOrClientSyncAndVerdict(c_tbDone, v_ret);

	}//end f_TP_ipv6TranslateParameterProblem_6
	
	/*
	 * @desc 	Test node 2 is on the IUTs IPv6 side and sends a ICMPv6 Packet Too Big message.
	 * @param	p_paramsHs02 Address Information of Testing Node
	 * @param	p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter
	*/
	function f_TP_ipv6TranslatePacketTooBig_6(
		template Ipv6NodeParams p_paramsHs02,
		template Ipv6NodeParams p_paramsRelayRt01
	)
	runs on Ipv6Node {

		var FncRetCode v_ret;
		
		//send packet
		v_ret := f_sendPacketTooBigForTranslate_6( p_paramsHs02.gla,
							   			   		   p_paramsRelayRt01.gla) ;

		if(v_ret != e_success) {
			log("**** f_TP_ipv6TranslatePacketTooBig_6: Error:  Problem in f_sendPacketTooBigForTranslate_6. ****");
		}

		f_selfOrClientSyncAndVerdict(c_tbDone, v_ret);

	}//end f_TP_ipv6TranslatePacketTooBig_6
	
	/*
	 * @desc 	Test node 2 is on the IUTs IPv6 side and sends a ICMPv6 Time Exceeded message.
	 * @param	p_paramsHs02 Address Information of Testing Node
	 * @param	p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter
	*/
	function f_TP_ipv6TranslateTimeExceeded_6(
		template Ipv6NodeParams p_paramsHs02,
		template Ipv6NodeParams p_paramsRelayRt01
	)
	runs on Ipv6Node {

		var FncRetCode v_ret;
		
		//send packet
		v_ret := f_sendTimeExceededForTranslate_6( p_paramsHs02.gla,
							   			   		   p_paramsRelayRt01.gla) ;

		if(v_ret != e_success) {
			log("**** f_TP_ipv6TranslateTimeExceeded_6: Error:  Problem in f_sendTimeExceededForTranslate_6. ****");
		}

		f_selfOrClientSyncAndVerdict(c_tbDone, v_ret);

	}//end f_TP_ipv6TranslateTimeExceeded_6
	
} // end module AtsIpv6_Transitioning_Tp_Functions