Commit 3f8c3225 authored by validator's avatar validator
Browse files

Integrated Stephan Schulz's modifications (compliance with t3doc)

parent d11ca50f
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -20,11 +20,11 @@
	group ipv6Packets {	

		/*
		** @desc  	This sends an IPv6 epacket from an IPv6 node to 
		**          any NUT. Prior it modifies IPv6 packet payload length.
		** @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
		** @returns	execution status
		 * @desc  	This sends an IPv6 epacket from an IPv6 node to 
		 *          any NUT. Prior it modifies IPv6 packet payload length.
		 * @remark  The template passed in must NOT contain any matching expressions!
		 * @param 	p_genIpv6 Ipv6 packet value or template with Ipv6 packet to be sent
		 * @return	execution status
		*/
		function f_sendIpv6Packet (in template GeneralIpv6 p_genIpv6) 
		runs on LibIpv6Node
+31 −31
Original line number Diff line number Diff line
@@ -151,15 +151,15 @@
	group extensionHeader {

		/*
		**	@param  p_extHdr First element in extension header
		 *	@param  p_extHdr First element in extension header
	    */
		template ExtensionHeaderList m_extHdrList_elemNo1 ( template ExtensionHeader p_extHdr ) := {
			p_extHdr
		}

		/*
		**	@param  p_extHdr1 First element in extension header
		**	@param  p_extHdr2 Second element in extension header
		 *	@param  p_extHdr1 First element in extension header
		 *	@param  p_extHdr2 Second element in extension header
	    */
		template ExtensionHeaderList m_extHdrList_elemNo2 ( template ExtensionHeader p_extHdr1,
			template ExtensionHeader p_extHdr2
@@ -169,9 +169,9 @@
		}

		/*
		**	@param  p_nextHeader Next header identifier value to be used
		**	@param  p_hdrExtLen Length of this extension header
		**	@param  p_optionList List of options that this extension header carries
		 *	@param  p_nextHeader Next header identifier value to be used
		 *	@param  p_hdrExtLen Length of this extension header
		 *	@param  p_optionList List of options that this extension header carries
	    */
		template ExtensionHeader m_extHdr_dstOptHeader (
			UInt8 p_nextHeader,
@@ -186,12 +186,12 @@
		}

		/*
		**	@param  p_nextHeader Next header identifier value to be used
		**	@param  p_fragmentOffset The offset, in 8-octet units, of the
		**				data following this header, relative to the start
		**				of the Fragmentable Part of the original packet.
		**	@param  p_moreFlag indicates whether there are more segment or not
		**	@param  p_identification Id of the actual fragment
		 *	@param  p_nextHeader Next header identifier value to be used
		 *	@param  p_fragmentOffset The offset, in 8-octet units, of the
		 *				data following this header, relative to the start
		 *				of the Fragmentable Part of the original packet.
		 *	@param  p_moreFlag indicates whether there are more segment or not
		 *	@param  p_identification Id of the actual fragment
	    */
		template ExtensionHeader m_extHdr_fragmentHeader (
			UInt8 p_nextHeader,
@@ -210,9 +210,9 @@
		}

		/*
		**	@param  p_nextHeader Next header identifier value to be used
		**	@param  p_hdrExtLen Length of this extension header
		**	@param  p_optionList List of options that this extension header carries
		 *	@param  p_nextHeader Next header identifier value to be used
		 *	@param  p_hdrExtLen Length of this extension header
		 *	@param  p_optionList List of options that this extension header carries
	    */
		template ExtensionHeader m_extHdr_hbhOptHeader (
			UInt8 p_nextHeader,
@@ -227,11 +227,11 @@
		}

		/*
		**	@param  p_nextHeader Next header identifier value to be used
		**	@param  p_hdrExtLen Length of this extension header in 8-octet units
		**	@param  p_routingType Type of the routing header
		**	@param  p_segmentsLeft Number of route segments remaining
		**	@param  p_routingHeaderData A list of IPv6 addresses
		 *	@param  p_nextHeader Next header identifier value to be used
		 *	@param  p_hdrExtLen Length of this extension header in 8-octet units
		 *	@param  p_routingType Type of the routing header
		 *	@param  p_segmentsLeft Number of route segments remaining
		 *	@param  p_routingHeaderData A list of IPv6 addresses
	    */
		template ExtensionHeader m_extHdr_routingHeader (
			UInt8 p_nextHeader,
@@ -268,12 +268,12 @@
	group generalIpv6MessageType {

		/*
		**	@param  p_nextHeader Next header identifier value to be used.
		**	@param  p_extHdrList List of extension header in the packet.
		**	@param  p_src Binary IPv6 address associated with the
		**          test component.
		**	@param  p_dst Binary IPv6 address associated with NUT.
		**	@param  p_data Data sent in the Echo Request packet.
		 *	@param  p_nextHeader Next header identifier value to be used.
		 *	@param  p_extHdrList List of extension header in the packet.
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_data Data sent in the Echo Request packet.
		*/
		template GeneralIpv6 m_generalIpv6_extHdr_srcDst_data (
			UInt8 p_nextHeader,
@@ -288,11 +288,11 @@
		}

		/*
		**	@param  p_nextHeader Next header identifier value to be used.
		**	@param  p_extHdrList List of extension header in the packet.
		**	@param  p_src Binary IPv6 address associated with the
		**          test component.
		**	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_nextHeader Next header identifier value to be used.
		 *	@param  p_extHdrList List of extension header in the packet.
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		*/
		template GeneralIpv6 mw_generalIpv6_extHdr_srcDst (
			UInt8 p_nextHeader,
+14 −14
Original line number Diff line number Diff line
@@ -49,8 +49,8 @@
	group ipv6HeaderRelatedTypes {

		/*
		** @desc Derived from RFC 2460 Section 3
		** @url http://www.ietf.org/rfc/rfc2460.txt
		 * @desc Derived from RFC 2460 Section 3
		 * @url http://www.ietf.org/rfc/rfc2460.txt
		*/
		type record Ipv6Header 	{
			UInt4 		version,
@@ -77,10 +77,10 @@
//		}
		
		/*
		** @desc Mainly derived from many RFC 2460
		**       Extension headers defined by other RFCs 
		**       are in LibIpv6_MultiRfcs_TypesAndValues
		** @see  LibIpv6_MultiRfcs_TypesAndValues.SharedExtensionHeaders
		 * @desc Mainly derived from many RFC 2460
		 *       Extension headers defined by other RFCs 
		 *       are in LibIpv6_MultiRfcs_TypesAndValues
		 * @see  LibIpv6_MultiRfcs_TypesAndValues.sharedExtensionHeaders
		*/
		type union ExtensionHeader {
			HopByHopHeader 		hopByHopHeader,
@@ -99,7 +99,7 @@
//		}

		/*
		** @desc Derived from  RFC 2460 Section 4.3
		 * @desc Derived from  RFC 2460 Section 4.3
		*/
		type record HopByHopHeader {
			UInt8			nextHeader,
@@ -114,7 +114,7 @@
		

		/*
		** @desc Derived from RFC 2460 Section 4.4
		 * @desc Derived from RFC 2460 Section 4.4
		*/
		type record RoutingHeader {
			UInt8				nextHeader,
@@ -132,9 +132,9 @@
//		}
		
		/*
		** @remark A RoutingHeaderData value should be only 
		**         set to ipv6AddressList when routingType==0 
		**		   and to mipDate when 2 (Length req. to be checked!!)
		 * @remark A RoutingHeaderData value should be only 
		 *         set to ipv6AddressList when routingType==0 
		 *		   and to mipDate when 2 (Length req. to be checked!!)
		*/
		type union RoutingHeaderData{
			Ipv6AddressList	ipv6AddressList,
@@ -144,7 +144,7 @@
		type octetstring MipData ;

		/*
		** @desc Derived from RFC 2460  Section 4.5
		 * @desc Derived from RFC 2460  Section 4.5
		*/
		type record FragmentHeader {
			UInt8	nextHeader,
@@ -161,7 +161,7 @@
		
	
		/*
		** @desc Derived from RFC 2460  Section 4.6
		 * @desc Derived from RFC 2460  Section 4.6
		*/
		type record DestOptionHeader {
			UInt8			nextHeader,
@@ -179,7 +179,7 @@
	group generalIpv6MessageType {	

		/*
		** @desc PDU type derived from RFC2460
		 * @desc PDU type derived from RFC2460
		*/
		type record GeneralIpv6 {
			Ipv6Header			ipv6Hdr,
+76 −75
Original line number Diff line number Diff line
@@ -27,15 +27,46 @@ module LibIpv6_Rfc2461NeighborDiscovery_Functions {
	import from LibIpv6_MultiRfcs_TypesAndValues all;
	import from LibIpv6_MultiRfcs_Templates all;

	group redirect {

		/*
		 * @desc  	This sends an ICMPv6 redirect for a test component
		 *          acting as any IPv6 node to the NUT.
		 *			Prior it modifies IPv6 packet payload ength and ICMPv6
		 *			checksum to their correct values
		 * @remark  The template passed in must NOT contain any matching expressions!
		 * @param 	p_redirect Ipv6 packet template with neighborhood advertisement to be sent
		 * @return 	execution status
		*/
		function f_sendRedirect(in template Redirect p_redirect)
		runs on LibIpv6Node
		return FncRetCode {
			var Ipv6Packet v_ipPkt;
			v_ipPkt.redirect := valueof(p_redirect);
			//calc payloadLen
			v_ipPkt.redirect.ipv6Hdr.payloadLength := fx_payloadLength (v_ipPkt);
			//set checksum to zero
			v_ipPkt.redirect.checksum := c_2ZeroBytes;
			//calc checksum
			v_ipPkt.redirect.checksum := fx_icmpv6Checksum(v_ipPkt);
			//send
			ipPort.send(v_ipPkt.redirect);

			return e_success;

		} // end f_sendRedirect

	} // end group redirect

	group routerDiscovery {

		/*
		** @desc  	This sends an ICMPv6 router advertisement from a router node
		**			to any NUT. Prior it modifies IPv6 packet payload length
		**			and ICMPv6 checksum to their correct values
		** @remark  The template passed in must NOT contain any matching expressions!
		** @param 	p_rtAdv Ipv6 packet template with router advertisement to be sent
		** @returns	execution status
		 * @desc  	This sends an ICMPv6 router advertisement from a router node
		 *			to any NUT. Prior it modifies IPv6 packet payload length
		 *			and ICMPv6 checksum to their correct values
		 * @remark  The template passed in must NOT contain any matching expressions!
		 * @param 	p_rtAdv Ipv6 packet template with router advertisement to be sent
		 * @return 	execution status
		*/
		function f_sendRtAdv (in template RouterAdvertisement p_rtAdv)
		runs on LibIpv6Node
@@ -56,13 +87,13 @@ module LibIpv6_Rfc2461NeighborDiscovery_Functions {
		} // end f_sendRtAdv

		/*
		** @desc  	This functions sends a router advertisement with the specified
		**			prefix, so that NUT adds the test component as its RT to its
		**          default router list
		** @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_prefix Router advertisement option prefix value
		** @param 	p_glaAddrTn Global address of testing node which calls this function
		 * @desc  	This functions sends a router advertisement with the specified
		 *			prefix, so that NUT adds the test component as its RT to its
		 *          default router list
		 * @param 	p_llaAddrTn Local link address of testing node which calls this function
		 * @param 	p_dstAddr Local link address of node under test
		 * @param 	p_prefixLength Router advertisement option prefix length value
		 * @param 	p_glaAddrTn Global address of testing node which calls this function
		*/
		function f_sendRtAdvWithPrefix( in template Ipv6Address 	p_llaAddrTn,
										in template Ipv6Address 	p_dstAddr,
@@ -94,12 +125,12 @@ module LibIpv6_Rfc2461NeighborDiscovery_Functions {
	group neighborDiscovery {

		/*
		** @desc  	This sends an ICMPv6 neighborhood advertisement from any
		**			Ipv6 node to the NUT. Prior it modifies IPv6 packet payload
		**			length and ICMPv6 checksum to their correct values
		** @remark  The template passed in must NOT contain any matching expressions!
		** @param 	Ipv6 packet template with neighborhood advertisement to be sent
		** @returns	execution status
		 * @desc  	This sends an ICMPv6 neighborhood advertisement from any
		 *			Ipv6 node to the NUT. Prior it modifies IPv6 packet payload
		 *			length and ICMPv6 checksum to their correct values
		 * @remark  The template passed in must NOT contain any matching expressions!
		 * @param 	p_nbrAdv Ipv6 packet template with neighborhood advertisement to be sent
		 * @return 	execution status
		*/
		function f_sendNbrAdv(in template NeighborAdvertisement p_nbrAdv)
		runs on LibIpv6Node
@@ -120,13 +151,13 @@ module LibIpv6_Rfc2461NeighborDiscovery_Functions {
		}// end f_sendNbrAdv

        /*
        ** @desc  	This sends an ICMPv6 router advertisement from a router node
        **			to any NUT and waits 1 sec (give IUT time tp process the packet).
        **          Prior it modifies IPv6 packet payload length and ICMPv6 checksum
        **          to their correct values.
        ** @remark  The template passed in must NOT contain any matching expressions!
        ** @param 	p_rtAdv Ipv6 packet template with router advertisement to be sent
        ** @returns	execution status
         * @desc  	This sends an ICMPv6 router advertisement from a router node
         *			to any NUT and waits 1 sec (give IUT time tp process the packet).
         *          Prior it modifies IPv6 packet payload length and ICMPv6 checksum
         *          to their correct values.
         * @remark  The template passed in must NOT contain any matching expressions!
         * @param 	p_rtAdv Ipv6 packet template with router advertisement to be sent
         * @return 	execution status
        */
        function f_sendRtAdvAndWait (in template RouterAdvertisement p_rtAdv) 
        runs on LibIpv6Node
@@ -150,12 +181,12 @@ module LibIpv6_Rfc2461NeighborDiscovery_Functions {
        } // end f_sendRtAdv

		/*
		** @desc  	This sends an ICMPv6 Neighbor Solicitation from any
		**			Ipv6 node to the NUT. Prior it modifies IPv6 packet payload 
		**			length and ICMPv6 checksum to their correct values.
		** @remark  The template passed in must NOT contain any matching expressions!
		** @param 	Ipv6 packet template with Neighbor Solicitation to be sent
		** @returns	execution status
		 * @desc  	This sends an ICMPv6 Neighbor Solicitation from any
		 *			Ipv6 node to the NUT. Prior it modifies IPv6 packet payload 
		 *			length and ICMPv6 checksum to their correct values.
		 * @remark  The template passed in must NOT contain any matching expressions!
		 * @param 	p_nbrSol Ipv6 packet template with Neighbor Solicitation to be sent
		 * @return 	execution status
		*/
		function f_sendNbrSol(in template NeighborSolicitation p_nbrSol) 
		runs on LibIpv6Node 
@@ -176,12 +207,12 @@ module LibIpv6_Rfc2461NeighborDiscovery_Functions {
		}// end f_sendNbrSol

		/*
		** @desc  	This sends an ICMPv6 Router Solicitation from any
		**			Ipv6 node to the NUT. Prior it modifies IPv6 packet payload 
		**			length and ICMPv6 checksum to their correct values
		** @remark  The template passed in must NOT contain any matching expressions!
		** @param 	Ipv6 packet template with Router Solicitation to be sent
		** @returns	execution status
		 * @desc  	This sends an ICMPv6 Router Solicitation from any
		 *			Ipv6 node to the NUT. Prior it modifies IPv6 packet payload 
		 *			length and ICMPv6 checksum to their correct values
		 * @remark  The template passed in must NOT contain any matching expressions!
		 * @param 	p_rtrSol Ipv6 packet template with Router Solicitation to be sent
		 * @return 	execution status
		*/
		function f_sendRtSol(in template RouterSolicitation p_rtrSol) 
		runs on LibIpv6Node 
@@ -202,13 +233,13 @@ module LibIpv6_Rfc2461NeighborDiscovery_Functions {
		}// end f_sendRtSol

	/*
	** @desc 	This function initiates Neighbor detection.
	**			Sent and received packets must be given as templates.
	** @remark  Time limit is defined by module parameter PX_TAC (see comp type)
	** @param 	p_echoRequest Echo Request to be sent
	** @param 	p_nbrSol Neighbor Solicitation to be sent
	** @param 	p_nbrAdv template of an NA that is sent by NUT
	** @return 	execution status
	 * @desc 	This function initiates Neighbor detection.
	 *			Sent and received packets must be given as templates.
	 * @remark  Time limit is defined by module parameter PX_TAC (see comp type)
	 * @param 	p_echoRequest Echo Request to be sent
	 * @param 	p_nbrSol Neighbor Solicitation to be sent
	 * @param 	p_nbrAdv template of an NA that is sent by NUT
	 * @return 	execution status
	*/
	function f_performNeighborDetection (
		in template NeighborSolicitation p_nbrSol,
@@ -239,35 +270,5 @@ module LibIpv6_Rfc2461NeighborDiscovery_Functions {

	}//end group neighborDiscovery

	group redirect {

		/*
		** @desc  	This sends an ICMPv6 redirect for a test component
		**          acting as any IPv6 node to the NUT.
		**			Prior it modifies IPv6 packet payload ength and ICMPv6
		**			checksum to their correct values
		** @remark  The template passed in must NOT contain any matching expressions!
		** @param 	Ipv6 packet template with neighborhood advertisement to be sent
		** @returns	execution status
		*/
		function f_sendRedirect(in template Redirect p_redirect)
		runs on LibIpv6Node
		return FncRetCode {
			var Ipv6Packet v_ipPkt;
			v_ipPkt.redirect := valueof(p_redirect);
			//calc payloadLen
			v_ipPkt.redirect.ipv6Hdr.payloadLength := fx_payloadLength (v_ipPkt);
			//set checksum to zero
			v_ipPkt.redirect.checksum := c_2ZeroBytes;
			//calc checksum
			v_ipPkt.redirect.checksum := fx_icmpv6Checksum(v_ipPkt);
			//send
			ipPort.send(v_ipPkt.redirect);

			return e_success;

		}// end f_sendRedirect

	} // end group redirect

} // end module LibIpv6_Rfc2461NeighborDiscovery_Functions
+1 −1
Original line number Diff line number Diff line
@@ -777,7 +777,7 @@
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *  @param  p_icmpCode
		 *  @param  p_icmpCode ICMP code to be used in router solicitation
		 *	@param  p_rtSolOptions Router Solicitation options.
	    */
		template RouterSolicitation m_rtSol_noExtHdr_code (template Ipv6Address p_src,
Loading