LibIpv6_Rfc2463Icmpv6_Templates.ttcn 35.1 KB
Newer Older
alex's avatar
alex committed
/*
 *	@author 	STF 276
 *  @version 	$Id$
 *	@desc		This module specifies common template definitions
 *              to specify ICMPv6 packets
 *
 */
vouffofeudji's avatar
vouffofeudji committed
module LibIpv6_Rfc2463Icmpv6_Templates {
alex's avatar
alex committed
	//LibCommon
	import from LibCommon_BasicTypesAndValues all;
	import from LibCommon_DataStrings all;
vouffofeudji's avatar
vouffofeudji committed
	//LibIpv6
	import from LibIpv6_Interface_TypesAndValues all;
	import from LibIpv6_Interface_Templates all;
	import from LibIpv6_CommonRfcs_TypesAndValues all;
alex's avatar
alex committed
	import from LibIpv6_ExternalFunctions all;
vouffofeudji's avatar
vouffofeudji committed
	import from LibIpv6_ModuleParameters all;
	import from LibIpv6_Rfc2463Icmpv6_TypesAndValues all;
	import from LibIpv6_Rfc2461NeighborDiscovery_TypesAndValues all;
alex's avatar
alex committed

vouffofeudji's avatar
vouffofeudji committed
	group Destination_Unreachable {
peter's avatar
peter committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_hopLimit Number of hops to be used in IPv6 header.
		 *	@param  p_icmpCode ICMPv6 type to be used
		 *	@param  p_data data in ICMPv6 Destination Unreachable message.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template DestinationUnreachable m_destUnreachable_noExtHdr_hop(
peter's avatar
peter committed
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt8 p_hopLimit,
vouffofeudji's avatar
vouffofeudji committed
			UInt8 p_icmpCode,
			template octetstring p_data) := {
			ipv6Hdr :=
				m_ipHdr_nextHdr_hop_srcDst(c_icmpHdr, p_hopLimit, p_src, p_dst),
			extHdrList := omit,
			ipv6Payload := {
				destinationUnreachableMsg := {
					icmpType := c_destinationUnreachableMsg,
					icmpCode := p_icmpCode,
					checksum := c_2ZeroBytes,
					unused := '00000000'O,
					data := p_data }
			}
peter's avatar
peter committed
		}
alex's avatar
alex committed

		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_icmpCode ICMPv6 type to be used
		 *	@param  p_data data in ICMPv6 Destination Unreachable message.
		*/
		template DestinationUnreachable m_destUnreachable_noExtHdr(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt8 p_icmpCode,
			octetstring p_data) := {
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
			extHdrList := omit,
			ipv6Payload := {
				destinationUnreachableMsg := {
					icmpType := c_destinationUnreachableMsg,
					icmpCode := p_icmpCode,
					checksum := c_2ZeroBytes,
					unused := '00000000'O,
					data := p_data }
			}
		}

alex's avatar
alex committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
peter's avatar
peter committed
		 *	@param  p_icmpCode ICMPv6 type to be used
alex's avatar
alex committed
		*/
vouffofeudji's avatar
vouffofeudji committed
		template DestinationUnreachable mw_destUnreachable_code(
peter's avatar
peter committed
			template Ipv6Address p_src,
vouffofeudji's avatar
vouffofeudji committed
			template Ipv6Address p_dst,
			template UInt8 p_icmpCode) := {
peter's avatar
peter committed
			ipv6Hdr := mw_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
schmitting's avatar
schmitting committed
			extHdrList := omit,
vouffofeudji's avatar
vouffofeudji committed
			ipv6Payload := {
				destinationUnreachableMsg := {
					icmpType := c_destinationUnreachableMsg,
					icmpCode := p_icmpCode,
					checksum := ?,
					unused := '00000000'O,
					data := * }
			}
		}
	} // end group Destination_Unreachable
peter's avatar
peter committed
	group ICMPv6_Echo_Reply {
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		 *	@param  p_data data in ICMPv6 echo reply.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoReply m_echoReply_noExtHdr_data(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt16 p_id,
			UInt16 p_seqNr,
			template octetstring p_data) := {
peter's avatar
peter committed
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := omit,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := p_data }
			}
alex's avatar
alex committed
		}

		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoReply m_echoReply_noExtHdr_noData(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt16 p_id,
			UInt16 p_seqNr) := {
peter's avatar
peter committed
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := omit,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := omit }
			}
mullers's avatar
mullers committed
		}

		/*
		 *	@param  p_nextHeader Next header identifier value to be used.
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_extHdrList List of extension header in the packet.
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		*/
		template EchoReply m_echoReply_extHdr_noData(
			UInt8 p_nextHeader,
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			template ExtensionHeaderList p_extHdrList,
			UInt16 p_id,
			UInt16 p_seqNr) := {
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
			extHdrList := p_extHdrList,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := omit }
			}
alex's avatar
alex committed
		}

peter's avatar
peter committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
peter's avatar
peter committed
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoReply mw_echoReply(
			template Ipv6Address p_src,
			template Ipv6Address p_dst) := {
peter's avatar
peter committed
			ipv6Hdr := mw_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := *,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := ?,
					sequenceNumber := ?,
					data := * }
			}
		}

		template EchoReply mw_echoReply_any := {
			ipv6Hdr := mw_ipHdr_nextHdr(c_icmpHdr),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := *,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := ?,
					sequenceNumber := ?,
					data := * }
			}
		template EchoReply mw_echoReply_AHHeaders := {
berge's avatar
berge committed
			ipv6Hdr := mw_ipHdr_nextHdr(c_authHdr),
			extHdrList := *,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := ?,
					sequenceNumber := ?,
					data := * }
			}
		}
peter's avatar
peter committed

validator's avatar
""  
validator committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoReply mw_echoReply_Fragment(
			template Ipv6Address p_src,
			template Ipv6Address p_dst) := {
validator's avatar
""  
validator committed
			ipv6Hdr := mw_ipHdr_nextHdr_srcDst(c_fragHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := *,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := ?,
					sequenceNumber := ?,
					data := * }
			}
		}
validator's avatar
""  
validator committed

		/*
		 *	@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_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoReply mw_echoReply_extHdr_noData(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt8 p_nextHeader,
			template ExtensionHeaderList p_extHdrList,
vouffofeudji's avatar
vouffofeudji committed
			UInt16 p_id,
			UInt16 p_seqNr) := {
			ipv6Hdr := mw_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := p_extHdrList,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := omit }
			}
peter's avatar
peter committed
		/*
		 *	@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.
peter's avatar
peter committed
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
peter's avatar
peter committed
		 *	@param  p_data data in ICMPv6 echo reply.
peter's avatar
peter committed
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoReply mw_echoReply_extHdr_data(
peter's avatar
peter committed
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
peter's avatar
peter committed
			UInt8 p_nextHeader,
			template ExtensionHeaderList p_extHdrList,
vouffofeudji's avatar
vouffofeudji committed
			UInt16 p_id,
			UInt16 p_seqNr,
			template octetstring p_data) := {
peter's avatar
peter committed
			ipv6Hdr := mw_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := p_extHdrList,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := p_data }
			}
peter's avatar
peter committed
		}
peter's avatar
peter committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		 *	@param  p_data data in ICMPv6 echo reply.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoReply mw_echoReply_noExtHdr_data(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt16 p_id,
			UInt16 p_seqNr,
			template octetstring p_data) := {
peter's avatar
peter committed
			ipv6Hdr := mw_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := omit,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := p_data }
			}
peter's avatar
peter committed
		}
peter's avatar
peter committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_hopLimit Number of hops to be used in IPv6 header.
		 *	@param  p_data data in ICMPv6 echo reply.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoReply mw_echoReply_noExtHdr_data_hop(
peter's avatar
peter committed
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt8 p_hopLimit,
vouffofeudji's avatar
vouffofeudji committed
			octetstring p_data) := {
			ipv6Hdr :=
				mw_ipHdr_nextHdr_hop_srcDst(
					c_icmpHdr,
					p_hopLimit,
					p_src,
					p_dst),
			extHdrList := *,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := ?,
					sequenceNumber := ?,
					data := p_data }
			}
peter's avatar
peter committed
		}

alex's avatar
alex committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoReply mw_echoReply_noExtHdr_noData(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt16 p_id,
			UInt16 p_seqNr) := {
peter's avatar
peter committed
			ipv6Hdr := mw_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := omit,
			ipv6Payload := {
				echoReplyMsg := {
					icmpType := c_echoReplyMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := omit }
			}
		}
	} // end group ICMPv6_Echo_Reply
peter's avatar
peter committed
	group ICMPv6_Echo_Request {
alex's avatar
alex committed
		/*
		 *	@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_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
peter's avatar
peter committed
		 *	@param  p_data Data sent in the Echo Request packet.
alex's avatar
alex committed
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoRequest m_echoRequest_extHdr_data(
alex's avatar
alex committed
			UInt8 p_nextHeader,
			template ExtensionHeaderList p_extHdrList,
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
vouffofeudji's avatar
vouffofeudji committed
			UInt16 p_id,
			UInt16 p_seqNr,
			octetstring p_data) := {
peter's avatar
peter committed
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := p_extHdrList,
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := p_data }
			}
alex's avatar
alex committed
		}

		/*
		 *	@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_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoRequest m_echoRequest_extHdr_noData(
alex's avatar
alex committed
			UInt8 p_nextHeader,
			template ExtensionHeaderList p_extHdrList,
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
vouffofeudji's avatar
vouffofeudji committed
			UInt16 p_id,
			UInt16 p_seqNr) := {
peter's avatar
peter committed
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := p_extHdrList,
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := omit }
			}
alex's avatar
alex committed
		}

		/*
peter's avatar
peter committed
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_hops Hop Limit value to be used.
alex's avatar
alex committed
		 *	@param  p_nextHeader Next header identifier value to be used.
		 *	@param  p_extHdrList List of extension header in the packet.
peter's avatar
peter committed
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoRequest m_echoRequest_extHdr_noData_hop(
peter's avatar
peter committed
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt8 p_hops,
			UInt8 p_nextHeader,
			template ExtensionHeaderList p_extHdrList,
vouffofeudji's avatar
vouffofeudji committed
			UInt16 p_id,
			UInt16 p_seqNr) := {
			ipv6Hdr :=
				m_ipHdr_nextHdr_hop_srcDst(p_nextHeader, p_hops, p_src, p_dst),
			extHdrList := p_extHdrList,
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := omit }
			}
peter's avatar
peter committed
		}

		/*
alex's avatar
alex committed
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		 *	@param  p_data Data sent in the Echo Request packet.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoRequest m_echoRequest_noExtHdr_data(
alex's avatar
alex committed
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
vouffofeudji's avatar
vouffofeudji committed
			UInt16 p_id,
			UInt16 p_seqNr,
			octetstring p_data) := {
peter's avatar
peter committed
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := omit,
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := p_data }
			}
alex's avatar
alex committed
		}

		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
peter's avatar
peter committed
		 *	@param  p_hops Hop Limit value to be used.
alex's avatar
alex committed
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		 *	@param  p_data Data sent in the Echo Request packet.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoRequest m_echoRequest_noExtHdr_data_hop(
alex's avatar
alex committed
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
peter's avatar
peter committed
			UInt8 p_hops,
vouffofeudji's avatar
vouffofeudji committed
			UInt16 p_id,
			UInt16 p_seqNr,
			octetstring p_data) := {
			ipv6Hdr :=
				m_ipHdr_nextHdr_hop_srcDst(c_icmpHdr, p_hops, p_src, p_dst),
			extHdrList := omit,
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := p_data }
			}
alex's avatar
alex committed
		}

		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoRequest m_echoRequest_noExtHdr_noData(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt16 p_id,
			UInt16 p_seqNr) := {
peter's avatar
peter committed
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := omit,
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := omit }
			}
alex's avatar
alex committed
		}
peter's avatar
peter committed

alex's avatar
alex committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
peter's avatar
peter committed
		 *	@param  p_hops Number of hops to be used in IPv6 header.
alex's avatar
alex committed
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoRequest m_echoRequest_noExtHdr_noData_hop(
peter's avatar
peter committed
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			in UInt8 p_hops,
vouffofeudji's avatar
vouffofeudji committed
			UInt16 p_id,
			UInt16 p_seqNr) := {
			ipv6Hdr :=
				m_ipHdr_nextHdr_hop_srcDst(c_icmpHdr, p_hops, p_src, p_dst),
			extHdrList := omit,
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := omit }
			}
alex's avatar
alex committed
		}

		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoRequest mw_echoRequest(
			template Ipv6Address p_src,
			template Ipv6Address p_dst) := {
peter's avatar
peter committed
			ipv6Hdr := mw_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := *,
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := ?,
					sequenceNumber := ?,
					data := * }
			}
alex's avatar
alex committed
		}

		/*
peter's avatar
peter committed
		 *	@param  p_nextHeader Next header identifier value to be used.
		 *	@param  p_extHdrList List of extension header in the packet.
alex's avatar
alex committed
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoRequest mw_echoRequest_extHdr_noData(
peter's avatar
peter committed
			UInt8 p_nextHeader,
			template ExtensionHeaderList p_extHdrList,
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
vouffofeudji's avatar
vouffofeudji committed
			UInt16 p_id,
			UInt16 p_seqNr) := {
peter's avatar
peter committed
			ipv6Hdr := mw_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := p_extHdrList,
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := omit }
			}
peter's avatar
peter committed
		}

		/*
		 *	@param  p_src Binary IPv6 address associated with the
alex's avatar
alex committed
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_id ICMPv6 echo identifier.
		 *	@param  p_seqNr ICMPv6 echo sequence number.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template EchoRequest mw_echoRequest_noExtHdr_noData(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt16 p_id,
			UInt16 p_seqNr) := {
peter's avatar
peter committed
			ipv6Hdr := mw_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := omit,
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := p_id,
					sequenceNumber := p_seqNr,
					data := omit }
			}
		}
schmitting's avatar
schmitting committed

		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_moreFlag indicates whether there are more segment or not
		*/
		template EchoRequest mw_echoRequest_extHdr_fragment(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt1 p_moreFlag) := {
			ipv6Hdr := mw_ipHdr_nextHdr_fragment(p_src, p_dst),
			extHdrList := mw_extHdrList_1Elem_superSet(mw_extHdr_fragmentHeader(p_moreFlag)),
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := ?,
					sequenceNumber := ?,
					data := ? }
			}
		}

		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		*/
		template EchoRequest mw_echoRequest_extHdr_noFragment(
			template Ipv6Address p_src,
			template Ipv6Address p_dst) := {
			ipv6Hdr := mw_ipHdr_nextHdr_noFragment(p_src, p_dst),
			extHdrList := omit,
			ipv6Payload := {
				echoRequestMsg := {
					icmpType := c_echoRequestMsg,
					icmpCode := c_icmpCode0,
					checksum := ?,
					identifier := ?,
					sequenceNumber := ?,
					data := omit }
			}
		}

} // end group ICMPv6_Echo_Request
berge's avatar
berge committed
	
	group ICMPv6_EchoReplyMsg {
berge's avatar
berge committed
		template EchoReplyMsg m_echoReplyMsg(UInt16 p_id, UInt16 p_seqNr) := {
			icmpType := c_echoReplyMsg,
			icmpCode := c_icmpCode0,
			checksum := c_2ZeroBytes,
			identifier := p_id,
			sequenceNumber := p_seqNr,
			data := omit
		}

		template EchoReplyMsg mw_echoReplyMsg(UInt16 p_id, UInt16 p_seqNr) := {
			icmpType := c_echoReplyMsg,
			icmpCode := c_icmpCode0,
			checksum := ?,
			identifier := p_id,
			sequenceNumber := p_seqNr,
			data := omit
		}
berge's avatar
berge committed
	} //end group ICMPv6_EchoReplyMsg
	
			
	group ICMPv6_EchoRequestMsg {

vouffofeudji's avatar
vouffofeudji committed
		template EchoRequestMsg m_echoRequestMsg(UInt16 p_id, UInt16 p_seqNr) := {
			icmpType := c_echoRequestMsg,
			icmpCode := c_icmpCode0,
			checksum := c_2ZeroBytes,
			identifier := p_id,
			sequenceNumber := p_seqNr,
			data := omit
		}

		template EchoRequestMsg mw_echoRequestMsg(UInt16 p_id, UInt16 p_seqNr) := {
			icmpType := c_echoRequestMsg,
			icmpCode := c_icmpCode0,
			checksum := ?,
			identifier := p_id,
			sequenceNumber := p_seqNr,
			data := omit
		}

berge's avatar
berge committed
	} //end group ICMPv6_EchoRequestMsg
	
	group ICMPv6_Echo_Request_Esp {
			/*
			 *	@param  p_nextHeader Next header identifier value to be used.
			 *	@param  p_src Binary IPv6 address associated with the
			 *          test component.
			 *	@param  p_dst Binary IPv6 address associated with NUT.
			 *	@param  p_extHdrList List of extension header in the packet.
			*/
			template EchoRequest m_echoRequest_esp(
				UInt8 p_nextHeader,
				template Ipv6Address p_src,
				template Ipv6Address p_dst,
				template ExtensionHeaderList p_extHdrList) := {
				ipv6Hdr := m_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
				extHdrList := p_extHdrList,
				ipv6Payload := omit
			}


		} //end group ICMPv6_Echo_Request_Esp
	
		group ICMPv6_Echo_Reply_Esp {
		
				/*
			 *	@param  p_nextHeader Next header identifier value to be used.
			 *	@param  p_src Binary IPv6 address associated with the
			 *          test component.
			 *	@param  p_dst Binary IPv6 address associated with NUT.
			 *	@param  p_extHdrList List of extension header in the packet.
			*/
			template EchoReply mw_echoReply_esp(
berge's avatar
berge committed
				UInt8 p_nextHeader,
				template Ipv6Address p_src,
				template Ipv6Address p_dst,
				template ExtensionHeaderList p_extHdrList) := {
				ipv6Hdr := mw_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
				extHdrList := p_extHdrList,
				ipv6Payload := omit
			}
			
			/*
			 *	@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_id ICMPv6 echo identifier.
			 *	@param  p_seqNr ICMPv6 echo sequence number.
			*/
			template EchoReply mw_echoReply_anyEsp(
berge's avatar
berge committed
				UInt8 p_nextHeader) := {
				ipv6Hdr := mw_ipHdr_nextHdr(p_nextHeader),
				extHdrList := *,
				ipv6Payload := omit
			}


		} //end group ICMPv6_Echo_Reply_Esp

	
peter's avatar
peter committed
	group ICMPv6_Other {
alex's avatar
alex committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
peter's avatar
peter committed
		 *	@param  p_icmpType ICMPv6 type to be used
		 *	@param  p_icmpCode ICMPv6 code to be used
alex's avatar
alex committed
		*/
vouffofeudji's avatar
vouffofeudji committed
		template OtherIcmpv6 m_otherIcmpv6_noExtHdr_noData(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt8 p_icmpType,
			UInt8 p_icmpCode) := {
peter's avatar
peter committed
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := omit,
			ipv6Payload := {
				otherIcmpv6Msg := {
					icmpType := p_icmpType,
					icmpCode := p_icmpCode,
					checksum := c_2ZeroBytes,
					data := omit }
			}
schmitting's avatar
schmitting committed
		}

		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_icmpType ICMPv6 type to be used
		 *	@param  p_data data content to be used
		*/
		template OtherIcmpv6 m_otherIcmpv6_noExtHdr_Data(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt8 p_icmpType,
			octetstring p_data) := {
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
			extHdrList := omit,
			ipv6Payload := {
				otherIcmpv6Msg := {
					icmpType := p_icmpType,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					data := p_data }
			}
alex's avatar
alex committed
		}
schmitting's avatar
schmitting committed

peter's avatar
peter committed
	} // end group ICMPv6_Other
vouffofeudji's avatar
vouffofeudji committed
	group Packet_Too_Big {
alex's avatar
alex committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
peter's avatar
peter committed
		 *	@param  p_hopLimit Number of hops to be used in IPv6 header.
alex's avatar
alex committed
		*/
vouffofeudji's avatar
vouffofeudji committed
		template PacketTooBig m_packetTooBig_noExtHdr_hop(
peter's avatar
peter committed
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
validator's avatar
""  
validator committed
			UInt8 p_hopLimit,
vouffofeudji's avatar
vouffofeudji committed
			octetstring p_data) := {
			ipv6Hdr :=
				m_ipHdr_nextHdr_hop_srcDst(c_icmpHdr, p_hopLimit, p_src, p_dst),
			extHdrList := omit,
			ipv6Payload := {
				packetTooBigMsg := {
					icmpType := c_packetTooBigMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					mtu := c_mtu1280,
					data := p_data }
			}
peter's avatar
peter committed
		}
peter's avatar
peter committed

		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_data data in ICMPv6 Destination Unreachable message.
		*/
		template PacketTooBig m_packetTooBig_noExtHdr(
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			octetstring p_data) := {
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
			extHdrList := omit,
			ipv6Payload := {
				packetTooBigMsg := {
					icmpType := c_packetTooBigMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					mtu := c_mtu1280,
					data := p_data }
			}
		}

peter's avatar
peter committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
peter's avatar
peter committed
		 *	@param  p_mtu MTU value to be sent.
peter's avatar
peter committed
		*/
vouffofeudji's avatar
vouffofeudji committed
		template PacketTooBig m_packetTooBig_noExtHdr_mtu(
peter's avatar
peter committed
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
vouffofeudji's avatar
vouffofeudji committed
			UInt32 p_mtu) := {
peter's avatar
peter committed
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := omit,
			ipv6Payload := {
				packetTooBigMsg := {
					icmpType := c_packetTooBigMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					mtu := p_mtu,
					data := omit }
			}
alex's avatar
alex committed
		}
peter's avatar
peter committed

validator's avatar
""  
validator committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_mtu MTU value to be sent.
		*/
vouffofeudji's avatar
vouffofeudji committed
		template PacketTooBig m_packetTooBig_noExtHdr_mtu_data(
validator's avatar
""  
validator committed
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
			UInt32 p_mtu,
vouffofeudji's avatar
vouffofeudji committed
			octetstring p_data) := {
validator's avatar
""  
validator committed
			ipv6Hdr := m_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := omit,
			ipv6Payload := {
				packetTooBigMsg := {
					icmpType := c_packetTooBigMsg,
					icmpCode := c_icmpCode0,
					checksum := c_2ZeroBytes,
					mtu := p_mtu,
					data := p_data }
			}
validator's avatar
""  
validator committed
		}

alex's avatar
alex committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
peter's avatar
peter committed
		 *	@param  p_icmpCode ICMPv6 Code value in the received message.
alex's avatar
alex committed
		*/
vouffofeudji's avatar
vouffofeudji committed
		template PacketTooBig mw_packetTooBig_noExtHdr_code(
peter's avatar
peter committed
			template Ipv6Address p_src,
			template Ipv6Address p_dst,
vouffofeudji's avatar
vouffofeudji committed
			UInt8 p_icmpCode) := {
peter's avatar
peter committed
			ipv6Hdr := mw_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
vouffofeudji's avatar
vouffofeudji committed
			extHdrList := omit,
			ipv6Payload := {
				packetTooBigMsg := {
					icmpType := c_packetTooBigMsg,
					icmpCode := p_icmpCode,
					checksum := ?,
					mtu := ?,
					data := * }
			}
		}
	} // end group Packet_Too_Big
alex's avatar
alex committed
	group ICMPv6_Parameter_Problem {
peter's avatar
peter committed
		/*
		 *	@param  p_src Binary IPv6 address associated with the
		 *          test component.
		 *	@param  p_dst Binary IPv6 address associated with NUT.
		 *	@param  p_hopLimit Number of hops to be used in IPv6 header.
		 *	@param  p_icmpCode ICMPv6 type to be used
		 *	@param  p_pointer ICMPv6 pointer to be used
		*/
vouffofeudji's avatar
vouffofeudji committed
		template ParameterProblem m_parameterProblem_noExtHdr_hop(
peter's avatar
peter committed
			template Ipv6Address p_src,
vouffofeudji's avatar
vouffofeudji committed
			template Ipv6Address p_dst,
peter's avatar
peter committed
			UInt8 p_hopLimit,
			UInt8 p_icmpCode,
validator's avatar
""  
validator committed
			UInt32 p_pointer,
vouffofeudji's avatar
vouffofeudji committed
			octetstring p_data) := {
			ipv6Hdr :=
				m_ipHdr_nextHdr_hop_srcDst(c_icmpHdr, p_hopLimit, p_src, p_dst),
			extHdrList := omit,
			ipv6Payload := {