Commit e5f59b13 authored by peter's avatar peter
Browse files

No commit message

No commit message
parent 65fd8d3b
Loading
Loading
Loading
Loading
+53 −103
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
	    */
		template Ipv6Header m_ipHdr (	UInt8 p_nextHdr,
		template Ipv6Header m_ipHdr_nextHdr_srcDst (	UInt8 p_nextHdr,
										template Ipv6Address p_src,
										template Ipv6Address p_dst) := {
			version 		:= c_ipv6Version ,
@@ -40,53 +40,37 @@

		/*
		 *	@param  p_nextHdr Next header identifier value to be used.
	    */
		template Ipv6Header mw_ipHdr (	UInt8 p_nextHdr) := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= ?, //c_trafficClassZero ,
			flowLabel 		:= c_flowLabelZero ,
			payloadLength 	:= ?,
			nextHeader 		:= p_nextHdr,
			hopLimit 		:= ?,
			sourceAddress 	:= ?,
			destinationAddress := ?
		}

		/*  @desc   Template for NUT Local Link Address determination
		 *	@param  p_nextHdr Next header identifier value to be used.
		 *	@param  p_hopLimit Number of hops to be used.
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
	    */
		template Ipv6Header mw_ipHdr_init (	UInt8 p_nextHdr,
		template Ipv6Header m_ipHdr_nextHdr_hop_srcDst (	UInt8 p_nextHdr,
											UInt8 p_hopLimit,
											template Ipv6Address p_src,
											template Ipv6Address p_dst ) := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= c_trafficClassZero ,
			flowLabel 		:= c_flowLabelZero ,
			payloadLength 	:= c_zeroPayloadLength,
			nextHeader 		:= p_nextHdr,
			hopLimit 		:= ?,
			sourceAddress 	:= ?,
			hopLimit 		:= p_hopLimit,
			sourceAddress 	:= p_src,
			destinationAddress := p_dst
		}

		/*
		 *	@param  p_nextHdr Next header identifier value to be used.
		 *	@param  p_hopLimit Number of hops to be used.
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
	    */
		template Ipv6Header m_ipHdr_hop (	UInt8 p_nextHdr,
											UInt8 p_hopLimit,
											template Ipv6Address p_src,
											template Ipv6Address p_dst ) := {
		template Ipv6Header mw_ipHdr_nextHdr ( UInt8 p_nextHdr ) := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= c_trafficClassZero ,
			trafficClass 	:= ?, //c_trafficClassZero ,
			flowLabel 		:= c_flowLabelZero ,
			payloadLength 	:= c_zeroPayloadLength,
			payloadLength 	:= ?,
			nextHeader 		:= p_nextHdr,
			hopLimit 		:= p_hopLimit,
			sourceAddress 	:= p_src,
			destinationAddress := p_dst
			hopLimit 		:= ?,
			sourceAddress 	:= ?,
			destinationAddress := ?
		}

		/*
@@ -94,7 +78,7 @@
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
	    */
		template Ipv6Header mw_ipHdr_basic ( template Ipv6Address p_src,
		template Ipv6Header mw_ipHdr_srcDst ( template Ipv6Address p_src,
											template Ipv6Address p_dst):= {
			version 		:= c_ipv6Version,
			trafficClass 	:= ? ,
@@ -112,7 +96,7 @@
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
	    */
		template Ipv6Header mw_ipHdr_srcDst_nextHdr_hopL255 (	template UInt8 p_nextHdr,
		template Ipv6Header mw_ipHdr_nextHdr_srcDst (	template UInt8 p_nextHdr,
												template Ipv6Address p_src,
												template Ipv6Address p_dst) := {
			version 		:= c_ipv6Version ,
@@ -120,26 +104,30 @@
			flowLabel 		:= ? ,
			payloadLength 	:= ?,
			nextHeader 		:= p_nextHdr,
			hopLimit 		:= 255,
			hopLimit 		:= ?,
			sourceAddress 	:= p_src,
			destinationAddress := p_dst
		}

		/*
		 *	@param  p_nextHdr Next header identifier value to be used.
		 *	@param  p_hopLimit Number of hops to be used.
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
	    */
		template Ipv6Header mw_ipHdr_srcDst (	template UInt8 p_nextHdr,
		template Ipv6Header mw_ipHdr_nextHdr_hop_srcDst (
			UInt8 p_nextHdr,
			UInt8 p_hopLimit,
			template Ipv6Address p_src,
												template Ipv6Address p_dst) := {
			template Ipv6Address p_dst
		) := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= ?,
			flowLabel 		:= ?,
			payloadLength 	:= ?,
			nextHeader 		:= p_nextHdr,
			hopLimit 		:= ?,
			hopLimit 		:= p_hopLimit,
			sourceAddress 	:= p_src,
			destinationAddress := p_dst
		}
@@ -147,7 +135,7 @@
		/*
		 *	@param  p_dst destination address for DAD.
		*/
		template Ipv6Header mw_ipHdr_src0 (template Ipv6Address p_dst) := {
		template Ipv6Header mw_ipHdr_dAD_unspecSrc_dst (template Ipv6Address p_dst) := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= c_trafficClassZero ,
			flowLabel 		:= c_flowLabelZero ,
@@ -158,44 +146,6 @@
			destinationAddress := p_dst
		}

		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
	    */
		template Ipv6Header mw_ipHdr_srcDst_hopL255 (	template Ipv6Address p_src,
														template Ipv6Address p_dst) := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= ? ,
			flowLabel 		:= ? ,
			payloadLength 	:= ?,
			nextHeader 		:= c_icmpHdr,
			hopLimit 		:= c_hopLimit255,
			sourceAddress 	:= p_src,
			destinationAddress := p_dst
		}

		/*
		 *	@param  p_nextHdr Next header identifier value to be used.
		 *	@param  p_hopLimit Number of hops to be used.
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
	    */
		template Ipv6Header mw_ipHdr_srcDst_hop (	UInt8 p_nextHdr,
											UInt8 p_hopLimit,
											template Ipv6Address p_src,
											template Ipv6Address p_dst ) := {
			version 		:= c_ipv6Version ,
			trafficClass 	:= ?,
			flowLabel 		:= ?,
			payloadLength 	:= ?,
			nextHeader 		:= p_nextHdr,
			hopLimit 		:= p_hopLimit,
			sourceAddress 	:= p_src,
			destinationAddress := p_dst
		}

	} // end ipv6Header

	group extensionHeader {
@@ -218,23 +168,6 @@
			p_extHdr2
		}

		/*
		**	@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,
			UInt8 p_hdrExtLen,
			template HopByHopOptionList p_optionList
		) := {
			hopByHopHeader := {
				nextHeader := p_nextHeader,
				hdrExtLen := p_hdrExtLen,
				hopByHopOptionList := p_optionList
			}
		}

		/*
		**	@param  p_nextHeader Next header identifier value to be used
		**	@param  p_hdrExtLen Length of this extension header
@@ -276,6 +209,23 @@
			}
		}

		/*
		**	@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,
			UInt8 p_hdrExtLen,
			template HopByHopOptionList p_optionList
		) := {
			hopByHopHeader := {
				nextHeader := p_nextHeader,
				hdrExtLen := p_hdrExtLen,
				hopByHopOptionList := p_optionList
			}
		}

		/*
		**	@param  p_nextHeader Next header identifier value to be used
		**	@param  p_hdrExtLen Length of this extension header in 8-octet units
@@ -325,14 +275,14 @@
		**	@param  p_dst Binary IPv6 address associated with NUT.
		**	@param  p_data Data sent in the Echo Request packet.
		*/
		template GeneralIpv6 m_generalIpv6_extHdr_data (
		template GeneralIpv6 m_generalIpv6_extHdr_srcDst_data (
			UInt8 p_nextHeader,
			template ExtensionHeaderList p_extHdrList,
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			octetstring p_data
		) := {
			ipv6Hdr := m_ipHdr(p_nextHeader, p_src, p_dst),
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
			extHdrList := p_extHdrList,
			data:= p_data
		}
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ module LibIpv6_Rfc2461NeighborDiscovery_Functions {
														c_infiniteLifetime,
														c_unspecifiedReachTime,
														c_unspecifiedRetransTime,
														m_rtAdvOpt_prefix (		p_prefixLength,
														m_rtAdvOpt_prefixOpt (		p_prefixLength,
																				c_lFlag1,
																				c_aFlag1,
																				c_infiniteLifetime,
+973 −1030

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ module LibIpv6_Rfc2462StatelessAddressAutoconf_Functions {
		
		tc_ac.start;
		alt {
			[]	ipPort.receive(mw_nbrSol_init (p_solNodeMcaNut, p_llaAddrNut)) {
			[]	ipPort.receive(mw_nbrSol_addressDetermination (p_solNodeMcaNut, p_llaAddrNut)) {
					tc_ac.stop;
					v_ret := e_success;
				}
@@ -77,7 +77,7 @@ module LibIpv6_Rfc2462StatelessAddressAutoconf_Functions {

		tc_ac.start ;
		alt {
			[]	ipPort.receive(mw_nbrSol_init(p_dst, p_target)) {
			[]	ipPort.receive(mw_nbrSol_addressDetermination(p_dst, p_target)) {
					tc_ac.stop ;
					v_ret := e_success;
				}
+30 −18
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
	import from LibIpv6_Interface all ;
	import from LibIpv6_ModuleParameters all ;
	import from LibIpv6_Interface { type Ipv6Packet };
	import from LibIpv6_Rfc2460Root_TypesAndValues { type all };
	import from LibIpv6_Rfc2460Root_TypesAndValues all;
	import from LibIpv6_Rfc2460Root_Templates all;
	import from LibIpv6_Rfc2463Icmpv6_Templates all;
	import from LibIpv6_Rfc2463Icmpv6_TypesAndValues all;
@@ -104,9 +104,11 @@

		var FncRetCode v_ret;

		v_ret := f_sendEchoRequest( m_echoRequest_hop_noExtHdr_noData(  p_hops,
		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;}
@@ -141,9 +143,11 @@

			var FncRetCode v_ret;

			v_ret := f_sendEchoRequest( m_echoRequest_hop_noExtHdr_noData(  p_hops,
			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;}
@@ -476,15 +480,23 @@
	runs on LibIpv6Node	return FncRetCode {

	var FncRetCode v_ret;
	v_ret := f_sendEchoRequest( m_echoRequest_noExtHdr_dataHopL255( p_llaAddrTn,
	v_ret := f_sendEchoRequest (
		m_echoRequest_noExtHdr_data_hop (
			p_llaAddrTn,
			p_llaAddrNut,
															c_defId, c_defSeqNo,
			c_hopLimit255,
			c_defId,
			c_defSeqNo,
			c_1280ZeroBytes ) );

	if ( v_ret == e_success ) {
		tc_ac.start;
			alt {
				[]	ipPort.receive(mw_echoReply_hopL255_data ( 	p_llaAddrNut,
				[]	ipPort.receive (
						mw_echoReply_noExtHdr_data_hop (
							p_llaAddrNut,
							p_llaAddrTn,
							c_hopLimit255,
							c_1280ZeroBytes ) ) {
						tc_ac.stop;
						return e_success;
Loading