Newer
Older
/*
* @author STF 276
* @version $Id$
* @desc This module specifies common template definitions
* to specify ICMPv6 packets
*
*/
//LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
//LibIpv6
import from LibIpv6_Interface_TypesAndValues all;
import from LibIpv6_Interface_Templates all;
import from LibIpv6_CommonRfcs_TypesAndValues all;
import from LibIpv6_ModuleParameters all;
import from LibIpv6_Rfc2463Icmpv6_TypesAndValues all;
import from LibIpv6_Rfc2461NeighborDiscovery_TypesAndValues all;
/*
* @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.
*/
template DestinationUnreachable m_destUnreachable_noExtHdr_hop(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt8 p_hopLimit,
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 }
}
/*
* @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 }
}
}
/*
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
template DestinationUnreachable mw_destUnreachable_code(
template Ipv6Address p_dst,
template UInt8 p_icmpCode) := {
ipv6Payload := {
destinationUnreachableMsg := {
icmpType := c_destinationUnreachableMsg,
icmpCode := p_icmpCode,
checksum := ?,
unused := '00000000'O,
data := * }
}
}
} // end group Destination_Unreachable
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.
*/
template EchoReply m_echoReply_noExtHdr_data(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt16 p_id,
UInt16 p_seqNr,
template octetstring p_data) := {
extHdrList := omit,
ipv6Payload := {
echoReplyMsg := {
icmpType := c_echoReplyMsg,
icmpCode := c_icmpCode0,
checksum := c_2ZeroBytes,
identifier := p_id,
sequenceNumber := p_seqNr,
data := p_data }
}
}
/*
* @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.
*/
template EchoReply m_echoReply_noExtHdr_noData(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt16 p_id,
UInt16 p_seqNr) := {
extHdrList := omit,
ipv6Payload := {
echoReplyMsg := {
icmpType := c_echoReplyMsg,
icmpCode := c_icmpCode0,
checksum := c_2ZeroBytes,
identifier := p_id,
sequenceNumber := p_seqNr,
data := omit }
}
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
}
/*
* @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 }
}
/*
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
template EchoReply mw_echoReply(
template Ipv6Address p_src,
template Ipv6Address p_dst) := {
extHdrList := *,
ipv6Payload := {
echoReplyMsg := {
icmpType := c_echoReplyMsg,
icmpCode := c_icmpCode0,
checksum := ?,
identifier := ?,
sequenceNumber := ?,
data := * }
}
}
template EchoReply mw_echoReply_any := {
ipv6Hdr := mw_ipHdr_nextHdr(c_icmpHdr),
extHdrList := *,
ipv6Payload := {
echoReplyMsg := {
icmpType := c_echoReplyMsg,
icmpCode := c_icmpCode0,
checksum := ?,
identifier := ?,
sequenceNumber := ?,
data := * }
}
template EchoReply mw_echoReply_AHHeaders := {
ipv6Hdr := mw_ipHdr_nextHdr(c_authHdr),
extHdrList := *,
ipv6Payload := {
echoReplyMsg := {
icmpType := c_echoReplyMsg,
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 EchoReply mw_echoReply_Fragment(
template Ipv6Address p_src,
template Ipv6Address p_dst) := {
extHdrList := *,
ipv6Payload := {
echoReplyMsg := {
icmpType := c_echoReplyMsg,
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.
* @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 Ipv6Address p_src,
template Ipv6Address p_dst,
UInt8 p_nextHeader,
template ExtensionHeaderList p_extHdrList,
ipv6Hdr := mw_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
extHdrList := p_extHdrList,
ipv6Payload := {
echoReplyMsg := {
icmpType := c_echoReplyMsg,
icmpCode := c_icmpCode0,
checksum := ?,
identifier := p_id,
sequenceNumber := p_seqNr,
data := 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.
UInt8 p_nextHeader,
template ExtensionHeaderList p_extHdrList,
UInt16 p_id,
UInt16 p_seqNr,
template octetstring p_data) := {
ipv6Hdr := mw_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
extHdrList := p_extHdrList,
ipv6Payload := {
echoReplyMsg := {
icmpType := c_echoReplyMsg,
icmpCode := c_icmpCode0,
checksum := ?,
identifier := p_id,
sequenceNumber := p_seqNr,
data := p_data }
}
/*
* @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.
*/
template EchoReply mw_echoReply_noExtHdr_data(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt16 p_id,
UInt16 p_seqNr,
template octetstring p_data) := {
extHdrList := omit,
ipv6Payload := {
echoReplyMsg := {
icmpType := c_echoReplyMsg,
icmpCode := c_icmpCode0,
checksum := ?,
identifier := p_id,
sequenceNumber := p_seqNr,
data := p_data }
}
/*
* @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.
*/
template EchoReply mw_echoReply_noExtHdr_data_hop(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt8 p_hopLimit,
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 }
}
/*
* @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.
*/
template EchoReply mw_echoReply_noExtHdr_noData(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt16 p_id,
UInt16 p_seqNr) := {
extHdrList := omit,
ipv6Payload := {
echoReplyMsg := {
icmpType := c_echoReplyMsg,
icmpCode := c_icmpCode0,
checksum := ?,
identifier := p_id,
sequenceNumber := p_seqNr,
data := omit }
}
}
} // end group ICMPv6_Echo_Reply
/*
* @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.
UInt8 p_nextHeader,
template ExtensionHeaderList p_extHdrList,
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt16 p_id,
UInt16 p_seqNr,
octetstring p_data) := {
ipv6Hdr := m_ipHdr_nextHdr_srcDst(p_nextHeader, 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 := p_data }
}
}
/*
* @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.
*/
template EchoRequest m_echoRequest_extHdr_noData(
UInt8 p_nextHeader,
template ExtensionHeaderList p_extHdrList,
template Ipv6Address p_src,
template Ipv6Address p_dst,
ipv6Hdr := m_ipHdr_nextHdr_srcDst(p_nextHeader, 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 }
}
* @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.
* @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 EchoRequest m_echoRequest_extHdr_noData_hop(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt8 p_hops,
UInt8 p_nextHeader,
template ExtensionHeaderList p_extHdrList,
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 }
}
* @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.
*/
template EchoRequest m_echoRequest_noExtHdr_data(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt16 p_id,
UInt16 p_seqNr,
octetstring p_data) := {
extHdrList := omit,
ipv6Payload := {
echoRequestMsg := {
icmpType := c_echoRequestMsg,
icmpCode := c_icmpCode0,
checksum := c_2ZeroBytes,
identifier := p_id,
sequenceNumber := p_seqNr,
data := p_data }
}
}
/*
* @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.
*/
template EchoRequest m_echoRequest_noExtHdr_data_hop(
template Ipv6Address p_src,
template Ipv6Address p_dst,
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 }
}
}
/*
* @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.
*/
template EchoRequest m_echoRequest_noExtHdr_noData(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt16 p_id,
UInt16 p_seqNr) := {
extHdrList := omit,
ipv6Payload := {
echoRequestMsg := {
icmpType := c_echoRequestMsg,
icmpCode := c_icmpCode0,
checksum := c_2ZeroBytes,
identifier := p_id,
sequenceNumber := p_seqNr,
data := omit }
}
/*
* @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.
*/
template EchoRequest m_echoRequest_noExtHdr_noData_hop(
template Ipv6Address p_src,
template Ipv6Address p_dst,
in UInt8 p_hops,
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 }
}
}
/*
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
*/
template EchoRequest mw_echoRequest(
template Ipv6Address p_src,
template Ipv6Address p_dst) := {
extHdrList := *,
ipv6Payload := {
echoRequestMsg := {
icmpType := c_echoRequestMsg,
icmpCode := c_icmpCode0,
checksum := ?,
identifier := ?,
sequenceNumber := ?,
data := * }
}
* @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.
*/
template EchoRequest mw_echoRequest_extHdr_noData(
UInt8 p_nextHeader,
template ExtensionHeaderList p_extHdrList,
template Ipv6Address p_src,
template Ipv6Address p_dst,
ipv6Hdr := mw_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
extHdrList := p_extHdrList,
ipv6Payload := {
echoRequestMsg := {
icmpType := c_echoRequestMsg,
icmpCode := c_icmpCode0,
checksum := ?,
identifier := p_id,
sequenceNumber := p_seqNr,
data := omit }
}
}
/*
* @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.
*/
template EchoRequest mw_echoRequest_noExtHdr_noData(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt16 p_id,
UInt16 p_seqNr) := {
extHdrList := omit,
ipv6Payload := {
echoRequestMsg := {
icmpType := c_echoRequestMsg,
icmpCode := c_icmpCode0,
checksum := ?,
identifier := p_id,
sequenceNumber := p_seqNr,
data := omit }
}
}
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
/*
* @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
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
}
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
}
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
} //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(
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(
UInt8 p_nextHeader) := {
ipv6Hdr := mw_ipHdr_nextHdr(p_nextHeader),
extHdrList := *,
ipv6Payload := omit
}
} //end group ICMPv6_Echo_Reply_Esp
/*
* @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_icmpCode ICMPv6 code to be used
template OtherIcmpv6 m_otherIcmpv6_noExtHdr_noData(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt8 p_icmpType,
UInt8 p_icmpCode) := {
extHdrList := omit,
ipv6Payload := {
otherIcmpv6Msg := {
icmpType := p_icmpType,
icmpCode := p_icmpCode,
checksum := c_2ZeroBytes,
data := omit }
}
}
/*
* @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 }
}
/*
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
template PacketTooBig m_packetTooBig_noExtHdr_hop(
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 }
}
/*
* @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 }
}
}
/*
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
template PacketTooBig m_packetTooBig_noExtHdr_mtu(
extHdrList := omit,
ipv6Payload := {
packetTooBigMsg := {
icmpType := c_packetTooBigMsg,
icmpCode := c_icmpCode0,
checksum := c_2ZeroBytes,
mtu := p_mtu,
data := omit }
}
/*
* @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.
*/
template PacketTooBig m_packetTooBig_noExtHdr_mtu_data(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt32 p_mtu,
extHdrList := omit,
ipv6Payload := {
packetTooBigMsg := {
icmpType := c_packetTooBigMsg,
icmpCode := c_icmpCode0,
checksum := c_2ZeroBytes,
mtu := p_mtu,
data := p_data }
}
/*
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
* @param p_icmpCode ICMPv6 Code value in the received message.
template PacketTooBig mw_packetTooBig_noExtHdr_code(
extHdrList := omit,
ipv6Payload := {
packetTooBigMsg := {
icmpType := c_packetTooBigMsg,
icmpCode := p_icmpCode,
checksum := ?,
mtu := ?,
data := * }
}
}
} // end group Packet_Too_Big
/*
* @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
*/
template ParameterProblem m_parameterProblem_noExtHdr_hop(
octetstring p_data) := {
ipv6Hdr :=
m_ipHdr_nextHdr_hop_srcDst(c_icmpHdr, p_hopLimit, p_src, p_dst),
extHdrList := omit,
ipv6Payload := {
parameterProblemMsg := {
icmpType := c_parameterProblemMsg,
icmpCode := p_icmpCode,
checksum := c_2ZeroBytes,
pointer := p_pointer,
data := p_data }
}
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
/*
* @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 ParameterProblem m_parameterProblem_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 := {
parameterProblemMsg := {
icmpType := c_parameterProblemMsg,
icmpCode := p_icmpCode,
checksum := c_2ZeroBytes,
pointer := c_icmpPointer24, //arbitrary pointer value
data := p_data }
}
}
/*
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
*/
extHdrList := *,
ipv6Payload := {
parameterProblemMsg := {
icmpType := c_parameterProblemMsg,
icmpCode := ?,
checksum := ?,
pointer := ?,
data := * }
}
/*
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
*/
template ParameterProblem mw_parameterProblem_noExtHdr(
template Ipv6Address p_src,
template Ipv6Address p_dst) := {
ipv6Hdr := mw_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
extHdrList := omit,
ipv6Payload := {
parameterProblemMsg := {
icmpType := c_parameterProblemMsg,
icmpCode := ?,
checksum := ?,
pointer := ?,
data := * }
}
}
/*
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
* @param p_icmpCode ICMPv6 code to be used
* @param p_pointer ICMPv6 pointer to be used
template ParameterProblem mw_parameterProblem_code_pointer(
extHdrList := *,
ipv6Payload := {
parameterProblemMsg := {
icmpType := c_parameterProblemMsg,
icmpCode := p_icmpCode,
checksum := ?,
pointer := p_pointer,
data := * }
}
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
/*
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
* @param p_icmpCode ICMPv6 code to be used
* @param p_pointer ICMPv6 pointer to be used
*/
template ParameterProblem mw_parameterProblem_code(
template Ipv6Address p_src,
template Ipv6Address p_dst,
UInt8 p_icmpCode) := {
ipv6Hdr := mw_ipHdr_nextHdr_srcDst(c_icmpHdr, p_src, p_dst),
extHdrList := omit,
ipv6Payload := {
parameterProblemMsg := {
icmpType := c_parameterProblemMsg,
icmpCode := p_icmpCode,
checksum := ?,
pointer := ?,
data := * }
}
}
/*
* @param p_nextHeader
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
* @param p_icmpCode ICMPv6 code to be used
* @param p_extHdrList
* @param p_pointer ICMPv6 pointer to be used
*/
template ParameterProblem mw_parameterProblem_code_pointer_extHdr(
UInt8 p_nextHeader,
template Ipv6Address p_src,
template Ipv6Address p_dst,
template ExtensionHeaderList p_extHdrList,
UInt8 p_icmpCode,
ipv6Hdr := mw_ipHdr_nextHdr_srcDst(p_nextHeader, p_src, p_dst),
extHdrList := p_extHdrList,
ipv6Payload := {
parameterProblemMsg := {
icmpType := c_parameterProblemMsg,
icmpCode := p_icmpCode,
checksum := ?,
pointer := p_pointer,
data := * }
}
} // end group ICMPv6_Parameter_Problem
group ICMPv6_Time_Exceeded {
/*
* @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
*/
template TimeExceeded m_timeExceeded_noExtHdr_hop(
octetstring p_data) := {
ipv6Hdr :=
m_ipHdr_nextHdr_hop_srcDst(c_icmpHdr, p_hopLimit, p_src, p_dst),
extHdrList := omit,
ipv6Payload := {
timeExceededMsg := {
icmpType := c_timeExceededMsg,
icmpCode := p_icmpCode,
checksum := c_2ZeroBytes,
unused := 0,
data := p_data }
}
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
/*
* @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 TimeExceeded m_timeExceeded_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 := {
timeExceededMsg := {
icmpType := c_timeExceededMsg,
icmpCode := c_icmpCode0,
checksum := c_2ZeroBytes,
unused := 0,
data := p_data }
}
}
/*
* @param p_src Binary IPv6 address associated with the
* test component.
* @param p_dst Binary IPv6 address associated with NUT.
* @param p_icmpCode ICMPv6 code to be used
*/
template TimeExceeded mw_timeExceeded_noExtHdr(
template Ipv6Address p_src,
template Ipv6Address p_dst,
template UInt8 p_icmpCode) := {
extHdrList := omit,
ipv6Payload := {
timeExceededMsg := {
icmpType := c_timeExceededMsg,
icmpCode := p_icmpCode,
checksum := ?,
unused := ?,
data := * }
}
}
} // end group ICMPv6_Time_Exceeded
} // end module LibIpv6_Rfc2463Icmpv6_Templates