LibIpv6_Rfc2463Icmpv6_Functions.ttcn 21.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437
/*
 *	@author 	STF 276
 *  @version 	$Id$
 *	@desc		This module specifies common ICMP messages 
 *              interchanges (= operations) for an Ipv6 test component
 *              Functions do not set a test component verdict but instead
 *              use the function return value instead to notify the function
 *              caller about the success of the operation.
 *  
 */
 module LibIpv6_Rfc2463Icmpv6_Functions {

	//LibCommon
	import from LibCommon_BasicTypesAndValues all;
	import from LibCommon_DataStrings all;
	import from LibCommon_VerdictControl { type FncRetCode };
	//LibIpv6
	import from LibIpv6_Interface_TypesAndValues all ;
	import from LibIpv6_Interface_Functions all;
	import from LibIpv6_Interface_Templates all;
	import from LibIpv6_CommonRfcs_TypesAndValues all;
	import from LibIpv6_CommonRfcs_Functions all;
	import from LibIpv6_ModuleParameters all ;
	import from LibIpv6_ExternalFunctions all;
	import from LibIpv6_Rfc2463Icmpv6_Templates all;
	import from LibIpv6_Rfc2463Icmpv6_TypesAndValues all;
	
	/*
	 * @desc  	This sends an ICMPv6 echo request from an IPv6 node to 
	 *          any NUT. Prior it modifies IPv6 packet payload length 
	 *			and ICMPv6 checksum to their correct values using external 
	 *          functions.
	 * @remark  The template passed in must NOT contain any matching expressions!
	 * @param 	p_echoRequest Ipv6 packet value or template with echo request to be sent
	 * @return 	execution status
	*/
	function f_sendEchoRequest (in template EchoRequest p_echoRequest) 
	runs on LibIpv6Node
	return FncRetCode {
		var EchoRequest v_ipPkt;
		v_ipPkt := valueof(p_echoRequest);

		if(f_setExtensionHeaders(	v_ipPkt ) != e_success) {
			log(" **** f_sendEchoRequest: Error when calculating length of extension headers ****");
			return e_error;
		}
		
		//send
		ipPort.send(v_ipPkt);
	
		return e_success;
	
	}//end f_sendEchoRequest

	/*
	 * @desc  	This sends an ICMPv6 echo request from an IPv6 node to any NUT. 
	 *			Prior it modifies IPv6 packet payload length and ICMPv6 checksum 
	 *			to their correct values using external functions
	 * @remark  The template passed in must NOT contain any matching expressions!
	 * @param 	p_echoReply Ipv6 packet value or template with echo reply to be sent
	 * @return 	execution status
	*/
	function f_sendEchoReply (in template EchoReply p_echoReply) 
	runs on LibIpv6Node
	return FncRetCode {
		var EchoReply v_ipPkt;
		v_ipPkt := valueof(p_echoReply);

		if(f_setExtensionHeaders(	v_ipPkt ) != e_success) {
			log(" **** f_sendEchoReply: Error when calculating length of extension headers ****");
			return e_error;
		}

		//send
		ipPort.send(v_ipPkt);
	
		return e_success;
	
	}//end f_sendEchoReply


	/*
	 * @desc 	This sends an ICMPv6 echo request from an IPv6 node to any NUT,
	 *			and waits for any ICMP packet for a fixed amount of time. 
	 * @remark  Time limit is defined by module parameter PX_TAC (see comp type)
	 * @param 	p_hops Number of hops to be used in IPv6 header 
	 * @param 	p_llaAddrTn Local link address of testing node which calls this function 
	 * @param 	p_llaAddrNut Local link address of node under test 
	 * @param 	p_ipPkt ICMPv6 packet which has been received 
	 * @return 	execution status
	*/
	function f_getIpPktAfterEchoReq( 	in  UInt8 			p_hops,
							  		   	in  template Ipv6Address 	p_llaAddrTn,
										in  template Ipv6Address 	p_llaAddrNut,
							  		   	out Ipv6Packet		p_ipPkt)
	runs on LibIpv6Node
	return FncRetCode {

		var FncRetCode v_ret;

		v_ret := f_sendEchoRequest (
			m_echoRequest_noExtHdr_noData_hop (
				p_llaAddrTn,
				p_llaAddrNut,
				p_hops,
				c_defId,
				c_defSeqNo ) );
		if ( v_ret != e_success ) {return v_ret;}
		tc_ac.start;
		alt {
			[]	ipPort.receive(mw_ipPkt) -> value p_ipPkt {
					tc_ac.stop;	
					return e_success;
				}
			[]	tc_ac.timeout{
					return e_timeout;
				}		
		} // end alt
	} // end f_getIcmpAfterEchoReq
	
	/*
	 * @desc 	This sends an ICMPv6 echo request from an IPv6 node to any NUT,
	 *			and waits for a Time Exceeded message for a fixed amount of time. 
	 * @remark  Time limit is defined by module parameter PX_TAC (see comp type)
	 * @param 	p_hops Number of hops to be used in IPv6 header 
	 * @param 	p_llaAddrTn Local link address of testing node which calls this function 
	 * @param 	p_llaAddrNut Local link address of node under test 
	 * @param 	p_llaAddrRut Local link address of router under test 
	 * @return 	execution status
	*/
	function f_getTimeExceededAfterEchoReq( 	in  UInt8 			p_hops,
											in  template Ipv6Address 	p_llaAddrTn,
											in  template Ipv6Address 	p_llaAddrNut,
											in  template Ipv6Address 	p_llaAddrRut)
		runs on LibIpv6Node
		return FncRetCode {

			var FncRetCode v_ret;

			v_ret := f_sendEchoRequest (
				m_echoRequest_noExtHdr_noData_hop (
					p_llaAddrTn,
					p_llaAddrNut,
					p_hops,
					c_defId,
					c_defSeqNo ) );
			if ( v_ret != e_success ) {return v_ret;}
			tc_ac.start;
			alt {
				[]	ipPort.receive(mw_timeExceeded_noExtHdr (	p_llaAddrRut,
																p_llaAddrTn,
																c_icmpCode0 ))  {
						tc_ac.stop;	
						return e_success;
					}
				[]	tc_ac.timeout{
						return e_timeout;
					}		
			} // end alt

		} // end f_getTimeExceedAfterEchoReq

	/*
	 * @desc 	This sends an ICMPv6 echo request from an IPv6 node to any NUT,
	 *			and waits for a Packet Too Big message for a fixed amount of time. 
	 * @remark  Time limit is defined by module parameter PX_TAC (see comp type)
	 * @param 	p_echoRequest Template of the Echo Request to be sent
	 * @param 	p_packetTooBig Template of the Packet Too Big message that is expected
	 * @return 	execution status
	*/
	function f_getPacketTooBigAfterEchoReq (
		template EchoRequest p_echoRequest,
		template PacketTooBig p_packetTooBig )
		runs on LibIpv6Node
		return FncRetCode {

			var FncRetCode v_ret;

			v_ret := f_sendEchoRequest ( p_echoRequest );

			if ( v_ret != e_success ) {return v_ret;}
			tc_ac.start;
			alt {
				[]	ipPort.receive ( p_packetTooBig )  {
						tc_ac.stop;	
						return e_success;
					}
				[]	tc_ac.timeout{
						return e_timeout;
					}		
			} // end alt

		} // end f_getPacketTooBigAfterEchoReq

	/*
	 * @desc 	This sends an ICMPv6 echo request from an IPv6 node to any NUT,
	 *			and waits for a Destination Unreachable message for a fixed amount of time. 
	 * @remark  Time limit is defined by module parameter PX_TAC (see comp type)
	 * @param 	p_echoRequest Template of the Echo Request to be sent
	 * @param 	p_destUnreachable Template of the Packet Too Big message that is expected
	 * @return 	execution status
	*/
	function f_getDestinationUnreachableAfterEchoReq (
		template EchoRequest p_echoRequest,
		template DestinationUnreachable p_destUnreachable )
		runs on LibIpv6Node
		return FncRetCode {

			var FncRetCode v_ret;

			v_ret := f_sendEchoRequest ( p_echoRequest );

			if ( v_ret != e_success ) {return v_ret;}
			tc_ac.start;
			alt {
				[]	ipPort.receive ( p_destUnreachable )  {
						tc_ac.stop;	
						return e_success;
					}
				[]	tc_ac.timeout{
						return e_timeout;
					}		
			} // end alt

		} // end f_getDestinationUnreachableAfterEchoReq


	/*
	 * @desc 	This sends an ICMPv6 echo request from an IPv6 node to any
	 *			NUT, and waits for a echo reply for a fixed amount of time. 
     *          This function can be used to verify that the NUT is 
	 *			up and running.
	 * @remark  Time limit is defined by module parameter PX_TAC (see comp type)
	 * @param 	p_llaAddrTn Local link address of testing node which calls this function 
	 * @param 	p_llaAddrNut Local link address of node under test
	 * @param 	p_identifier Idenitifier to be used in ICMPv6 echo request 
	 * @param 	p_seqNo Sequence number to be used in ICMPv6 echo request 
	 * @param 	p_icmpPkt IPv6 packet which has been received 
	 * @return 	execution status
	*/
	function f_echoProcUp(  in  template Ipv6Address p_llaAddrTn,
							in  template Ipv6Address p_llaAddrNut,
							in  UInt16 		p_identifier,
							in  UInt16 		p_seqNo,
							out EchoReply	p_icmpPkt)
	runs on LibIpv6Node
	return FncRetCode {

		var EchoReply v_echoRep;
		var FncRetCode v_ret;

		v_ret := f_sendEchoRequest( m_echoRequest_noExtHdr_noData( p_llaAddrTn,
															p_llaAddrNut,
															p_identifier,
															p_seqNo ));
		if ( v_ret != e_success ) {return v_ret;}
		tc_ac.start;
		alt {
			[]	ipPort.receive(mw_echoReply ( 	p_llaAddrNut,
												p_llaAddrTn )) -> value v_echoRep {
					p_icmpPkt := v_echoRep ;
					tc_ac.stop;	
					return e_success;
				}
			[]	tc_ac.timeout{
					return e_timeout;
				}		
		} // end alt
	} // end f_echoProcUp

	/*
	 * @desc 	This sends an ICMPv6 echo request from an IPv6 node to any NUT,
	 *			and waits for a echo reply for a fixed amount of time. 
	 * @remark  Time limit is defined by module parameter PX_TAC (see comp type)
	 * @param 	p_llaAddrTn Local link address of testing node which calls this function 
	 * @param 	p_llaAddrNut Local link address of node under test
	 * @param 	p_identifier Idenitifier to be used in ICMPv6 echo request 
	 * @param 	p_seqNo Sequence number to be used in ICMPv6 echo request 
	 * @return 	execution status
	*/
	function f_replyToEchoRequest(in  template Ipv6Address 	p_llaAddrTn,
								  in  template Ipv6Address 	p_llaAddrNut,
								  in  UInt16 		p_identifier,
								  in  UInt16		p_seqNo,
								  out EchoRequest 	p_echoRequest)
	runs on LibIpv6Node
	return FncRetCode {

		var FncRetCode v_ret := e_error;
		
		tc_ac.start;
		alt {
			[]	ipPort.receive(mw_echoRequest ( 	p_llaAddrNut,
												p_llaAddrTn )) -> value p_echoRequest {
					tc_ac.stop;	
					v_ret := e_success;
				}
			[]	tc_ac.timeout{
					return e_timeout;
				}		
		} // end alt

		v_ret := f_sendEchoReply( m_echoReply_noExtHdr_data( p_llaAddrTn,
															p_llaAddrNut,
															p_identifier,
															p_seqNo,
															p_echoRequest.ipv6Payload.echoRequestMsg.data ));
		return v_ret ;

	} // end f_replyToEchoRequest
	
	/*
	 * @desc 	This sends an ICMPv6 echo request from an IPv6 node to any 
	 *			NUT, and does not a reply wihtin a given time limit. 
	 *			This function can be used to verify that the NUT is NOT 
	 *			up and running.
	 * @remark  Time limit is defined by module parameter PX_TNOAC (see comp type)
	 * @param 	p_llaAddrTn Local link address of testing node which calls this function 
	 * @param 	p_llaAddrNut Local link address of node under test
	 * @return 	execution status
	*/
	function f_echoProcDown( template Ipv6Address p_llaAddrTn, template Ipv6Address p_llaAddrNut)
	runs on LibIpv6Node
	return FncRetCode {
		
//		var EchoReply v_echoReply;
//		if ( f_echoProcUp( p_llaAddrTn, p_llaAddrNut, c_defId, c_defSeqNo, v_echoReply) == e_timeout ) {
//			// that means no echo reply was received - this is what we want here
//			return e_success;
//		} else {
//			return e_error;
//		}
		
		var EchoReply v_echoRep;
		var FncRetCode v_ret;

		v_ret := f_sendEchoRequest( m_echoRequest_noExtHdr_noData( 	p_llaAddrTn,
																	p_llaAddrNut,
																	c_defId,
																	c_defSeqNo ));
		if ( v_ret != e_success ) {return v_ret;}
		tc_noAc.start;
		alt {
			[]	ipPort.receive(mw_echoReply ( 	p_llaAddrNut,
												p_llaAddrTn )) -> value v_echoRep {
					tc_noAc.stop;	
					return e_error;
				}
			[]	tc_noAc.timeout{
					return e_success;
				}		
		} // end alt
	}//end f_echoProcDown

	/*
	 * @desc  	This sends an ICMPv6 echo request from an IPv6 node to 
	 *          any NUT. Prior it modifies IPv6 packet payload length 
	 *			and ICMPv6 checksum to their correct values using external 
	 *          functions.
	 * @remark  The template passed in must NOT contain any matching expressions!
	 * @param 	p_echoRequest Ipv6 packet value or template with echo request to be sent
	 * @param 	p_payloadLength Length of the IPv6 payload to be sent
	 * @return 	execution status
	*/
	function f_sendEchoRequest_noCalcPayloadLength (in template EchoRequest p_echoRequest,
		UInt16 p_payloadLength ) 
	runs on LibIpv6Node
	return FncRetCode {
		var EchoRequest v_ipPkt;
		v_ipPkt := valueof(p_echoRequest);

		//set payload length
		v_ipPkt.ipv6Hdr.payloadLength := p_payloadLength;

		if(f_setExtensionHeaders(	v_ipPkt ) != e_success) {
			log(" **** f_sendEchoRequest_noCalcPayloadLength: Error when calculating length of extension headers ****");
			return e_error;
		}

		//send
		ipPort.send(v_ipPkt);

		return e_success;

	}//end f_sendEchoRequest_noCalcPayloadLength

	/*
	 * @desc  	This sends an ICMPv6 echo request from an IPv6 node to 
	 *          any NUT. Prior it modifies IPv6 packet payload length 
	 *			and ICMPv6 checksum to their correct values using external 
	 *          functions. Waits for a Parameter Problem message.
	 * @param 	p_echoRequest Ipv6 packet value or template with echo request to be sent (must not contains wildcards)
	 * @param 	p_parameterProblem Parameter Problem message we are waiting for.
	 * @return 	execution status
	*/
	function f_getParameterProblemAfterEchoReq_ignoreEchoReply (
		in template EchoRequest p_echoRequest,
		in template ParameterProblem p_parameterProblem )
	runs on LibIpv6Node
	return FncRetCode {
		var FncRetCode v_ret;
		var boolean v_ppReceived := false;

		v_ret := f_sendEchoRequest ( p_echoRequest );

		if ( v_ret != e_success ) {
			return v_ret;
		}

		tc_ac.start;
		alt {
			[]	ipPort.receive ( p_parameterProblem ) {
					v_ppReceived := true;
					repeat;
				}
			[]	ipPort.receive ( ParameterProblem:? ) {
					log("**** f_getParameterProblemAfterEchoReq_ignoreEchoReply: ERROR: Template mismatch **** ");
					v_ret := e_error;
				}
			[]	ipPort.receive(mw_echoReply ( 	p_echoRequest.ipv6Hdr.destinationAddress,
												p_echoRequest.ipv6Hdr.sourceAddress ) ) {
					tc_ac.stop;	
					log("**** f_getParameterProblemAfterEchoReq_ignoreEchoReply: ERROR: An Echo Reply was received, HUT did not discard our Echo Request **** ");
					v_ret := e_error;
				}
			[v_ppReceived==false]	tc_ac.timeout{
					v_ret := e_timeout;
				}		
			[v_ppReceived==true]	tc_ac.timeout{
					v_ret := e_success;
				}		
		} // end alt

		return v_ret;

	}//end f_getParameterProblemAfterEchoReq_ignoreEchoReply

peter's avatar
peter committed

peter's avatar
peter committed
	/*
	 * @desc 	This sends an ICMPv6 echo request from an IPv6 node to any
	 *			NUT, and waits for a echo reply for a fixed amount of time.
	 *          This function can be used to verify that the NUT is
	 *			up and running. Neighbor detection is handled here, rather than in
	 *			a default. Might be useful if NUT must perform neighbor detection.
	 * @remark  Time limit is defined by module parameter PX_TAC (see comp type)
	 * @param 	p_llaAddrTn Local link address of testing node which calls this function
	 * @param 	p_llaAddrNut Local link address of node under test
	 * @return 	execution status
peter's avatar
peter committed
	*/
	function f_echoProcUp_withHopL255Len1280(
validator's avatar
validator committed
							in  template Ipv6Address p_llaAddrTn,
							in  template Ipv6Address p_llaAddrNut)
peter's avatar
peter committed
	runs on LibIpv6Node	return FncRetCode {

	var FncRetCode v_ret;
	v_ret := f_sendEchoRequest (
		m_echoRequest_noExtHdr_data_hop (
peter's avatar
peter committed
			p_llaAddrTn,
			p_llaAddrNut,
peter's avatar
peter committed
			c_defSeqNo,
peter's avatar
peter committed

peter's avatar
peter committed
	if ( v_ret == e_success ) {
		tc_ac.start;
			alt {
				[]	ipPort.receive (
						mw_echoReply_noExtHdr_data_hop (
peter's avatar
peter committed
							p_llaAddrNut,
							p_llaAddrTn,
peter's avatar
peter committed
							c_1280ZeroBytes ) ) {
peter's avatar
peter committed
						tc_ac.stop;
						return e_success;
					}
				[]	tc_ac.timeout{
						return e_timeout;
					}
			} // end alt
		} // End If
    return v_ret;
	} // End function f_echoProcUp_withHopL255Len1280

	/*
	 * @desc  	This sends other ICMPv6 packet from an IPv6 node to 
	 *          any IUT. Prior it modifies IPv6 packet payload length 
	 *			and ICMPv6 checksum to their correct values using external 
	 *          functions.
	 * @remark  The template passed in must NOT contain any matching expressions!
	 * @param 	p_otherIcmpv6 Ipv6 packet value or template with the ICMPv6 packet to be sent
	 * @return 	execution status
	*/
	function f_sendOtherIcmpv6 (in template OtherIcmpv6 p_otherIcmpv6) 
	runs on LibIpv6Node
	return FncRetCode {
		var OtherIcmpv6 v_ipPkt;
		v_ipPkt := valueof(p_otherIcmpv6);

		//set Extension Header
		if(f_setExtensionHeaders(	v_ipPkt ) != e_success) {
			log(" **** f_sendOtherIcmpv6: Error when calculating length of extension headers ****");
			return e_error;
		}

		//send
		ipPort.send(v_ipPkt);
		
		return e_success;
		
	} // end f_sendOtherIcmpv6

	/*
	 * @desc  	This sends an ICMPv6 Destination Unreachable message to 
	 *          any IUT. Prior it modifies IPv6 packet payload length 
	 *			and ICMPv6 checksum to their correct values using external 
	 *          functions.
	 * @remark  The template passed in must NOT contain any matching expressions!
	 * @param 	p_destUnreachable Ipv6 packet value or template with the Destination
	 *			Unreachable message to be sent
	 * @return 	execution status
	*/
	function f_sendDestUnreachable (in template DestinationUnreachable p_destUnreachable ) 
	runs on LibIpv6Node
	return FncRetCode {
		var DestinationUnreachable v_ipPkt;
		v_ipPkt := valueof(p_destUnreachable);

		//set Extension Header
		if(f_setExtensionHeaders(	v_ipPkt ) != e_success) {
			log(" **** f_sendDestUnreachable: Error when calculating length of extension headers ****");
			return e_error;
		}

		//send
		ipPort.send(v_ipPkt);
		
		return e_success;
		
	} // end f_sendDestUnreachable

	/*
	 * @desc  	This sends an ICMPv6 Packet Too Big message to 
	 *          any IUT. Prior it modifies IPv6 packet payload length 
	 *			and ICMPv6 checksum to their correct values using external 
	 *          functions.
	 * @remark  The template passed in must NOT contain any matching expressions!
	 * @param 	p_packetTooBig Ipv6 packet value or template with the Packet
	 *			Too Big message to be sent
	 * @return 	execution status
	*/
	function f_sendPacketTooBig (in template PacketTooBig p_packetTooBig ) 
	runs on LibIpv6Node
	return FncRetCode {
		var PacketTooBig v_ipPkt;
		v_ipPkt := valueof(p_packetTooBig);


		//set Extension Header
		if(f_setExtensionHeaders(	v_ipPkt ) != e_success) {
			log(" **** f_sendPacketTooBig: Error when calculating length of extension headers ****");
			return e_error;
		}

		//send
		ipPort.send(v_ipPkt);
		
		return e_success;
		
	} // end f_sendPacketTooBig

	/*
	 * @desc  	This sends an ICMPv6 Packet Too Big message to 
	 *          any IUT. Prior it modifies IPv6 packet payload length 
	 *			and ICMPv6 checksum to their correct values using external 
	 *          functions.
	 * @remark  The template passed in must NOT contain any matching expressions!
	 * @param 	p_timeExceeded Ipv6 packet value or template with the Time
	 *			Exceeded message to be sent
	 * @return 	execution status
	*/
	function f_sendTimeExceeded (in template TimeExceeded p_timeExceeded ) 
	runs on LibIpv6Node
	return FncRetCode {
		var TimeExceeded v_ipPkt;
		v_ipPkt := valueof(p_timeExceeded);

		//set Extension Header
		if(f_setExtensionHeaders(	v_ipPkt ) != e_success) {
			log(" **** f_sendTimeExceeded: Error when calculating length of extension headers ****");
			return e_error;
		}

		//send
		ipPort.send(v_ipPkt);
		
		return e_success;
		
	} // end f_sendTimeExceeded

	/*
	 * @desc  	This sends an ICMPv6 Packet Too Big message to 
	 *          any IUT. Prior it modifies IPv6 packet payload length 
	 *			and ICMPv6 checksum to their correct values using external 
	 *          functions.
	 * @remark  The template passed in must NOT contain any matching expressions!
	 * @param 	p_parameterProblem Ipv6 packet value or template with the Parameter
	 *			Problem message to be sent
	 * @return 	execution status
	*/
	function f_sendParameterProblem (in template ParameterProblem p_parameterProblem ) 
	runs on LibIpv6Node
	return FncRetCode {
		var ParameterProblem v_ipPkt;
		v_ipPkt := valueof(p_parameterProblem);

		//set Extension Header
		if(f_setExtensionHeaders(	v_ipPkt ) != e_success) {
			log(" **** f_sendParameterProblem: Error when calculating length of extension headers ****");
			return e_error;
		}

		//send
		ipPort.send(v_ipPkt);
		
		return e_success;
		
	} // end f_sendParameterProblem

	/*
	 * @desc 	This sends an ICMPv6 echo request from an IPv6 node to any
	 *			NUT, and waits for a echo reply for a fixed amount of time. 
     *          This function can be used to verify that the NUT is 
	 *			up and running.
	 * @remark  Time limit is defined by module parameter PX_TAC (see comp type)
	 * @param 	p_glaA Global address of tunnel entry point ( testing node 1)
	 * @param 	p_glaB Global address of tunnel exit point (IUT)
	 * @param 	p_glaC Src Global address of tunneled packet ( MN Home Address)
	 * @param 	p_glaD Dst Global address of tunneled packet ( testing node 2)
	 * @param 	p_identifier Idenitifier to be used in ICMPv6 echo request 
	 * @param 	p_seqNo Sequence number to be used in ICMPv6 echo request 
	 * @param 	p_icmpPkt IPv6 packet which has been received 
	 * @return 	execution status
	*/
	function f_echoProc_tunneled(  	in template Ipv6Address p_glaA,
									in template Ipv6Address p_glaB,
									in template Ipv6Address p_glaC,
									in template Ipv6Address p_glaD,
									in  UInt16 		p_identifier,
									in  UInt16 		p_seqNo,
									out EchoReply	p_icmpPkt)
	runs on LibIpv6Node
	return FncRetCode {

		var EchoReply v_echoRep;
		var FncRetCode v_ret;

		v_ret := f_sendEchoRequest(
					m_echoRequest_extHdr_data (
							c_tunneledIpHdr,
							m_extHdrList_1Elem (
								m_extHdr_tunneledHeader (
									p_glaC,
									p_glaD)),
							p_glaA,
							p_glaB,
							c_defId,
							c_defSeqNo,
							c_8ZeroBytes ));

		if ( v_ret != e_success ) {return v_ret;}
		tc_ac.start;
		alt {
			[]	ipPort.receive(mw_echoReply_extHdr_data (
									p_glaB,
									m_extHdrList_1Elem (
										mw_extHdr_tunneledHeader (
											c_icmpHdr,
											p_glaD,
											p_glaC )),
									c_defId,
									c_defSeqNo,
									c_8ZeroBytes)) -> value v_echoRep {
					p_icmpPkt := v_echoRep ;
					tc_ac.stop;	
					return e_success;
				}
			[]	tc_ac.timeout{
					return e_timeout;
				}		
		} // end alt
		
	} // end f_echoProc_tunneled

} // end module LibIpv6_Rfc2463Icmpv6_Functions