//
// $Copyright$
//
// $Id: checkPMTUincrease.def,v 1.1.1.1 2000/10/31 22:39:04 sekiya Exp $

#include "PMTUaddress2.def"
#include "PMTU.def"

//
// Too Big Mesg
//

// Ping   Packet Size : 1500
Payload invoke_data_1500 {
         data=repeat(0xff,1452);
}
PMTU_echo_request_tn2nut_GLOBALADDR(EchoRequest_1500,invoke_data_1500)
PMTU_echo_reply_nut2tn_GLOBALADDR(EchoReply_1500,invoke_data_1500)

// Ping   Packet Size : 1350
Payload invoke_data_1350 {
         data=repeat(0xff,1302);
}
PMTU_echo_request_tn2nut_GLOBALADDR(EchoRequest_1350,invoke_data_1350)
PMTU_echo_reply_nut2tn_GLOBALADDR(EchoReply_1350,invoke_data_1350)


FEM_icmp6_packet_too_big(
	TooBigMesg_1350,
	_HETHER_tn2nut,
        	{
		_SRC(tnv6());
                _DST(v6merge(   NUT_GLOBAL_UCAST_PRFX, 
                                GLOBAL_UCAST_PRFXLEN, 
                                nutv6())); 
	},
		{
		MTU=1350;
		payload=invoke_packet_1280;
	}
)
 
FEM_icmp6_packet_too_big(
	TooBigMesg_1300,
	_HETHER_tn2nut,
        	{
		_SRC(tnv6());
                _DST(v6merge(   NUT_GLOBAL_UCAST_PRFX, 
                                GLOBAL_UCAST_PRFXLEN, 
                                nutv6())); 
	},
		{
		MTU=1300;
		payload=invoke_packet_1280;
	}
)

Payload invoke_packet_1280 {
	data=substr(_PACKET_IPV6_NAME(EchoReply_1500),0,1232);
}

//
// Fragment Echo Request (packet size : 1400) and reply
//
Payload frag_data_1400 {
         data=repeat(0xff,1352);
}

PMTU_echo_request_tn2nut_GLOBALADDR(frag_frame_1400,frag_data_1400)

PMTU_fragment_tn2nut_GLOBALADDR( 
         frag_1400_1st, 
                 {
                 NextHeader=58;
                 FragmentOffset=0;
                 MFlag=1;
                 Identification=2000483648;
         },
                { 
        data=substr(_PACKET_IPV6_NAME(frag_frame_1400),40,800);
         } 
) 

PMTU_fragment_tn2nut_GLOBALADDR( 
         frag_1400_2nd, 
                {
                NextHeader=58;
                FragmentOffset=100;
                MFlag=0;
                Identification=2000483648;
        },
                { 
        data=substr(_PACKET_IPV6_NAME(frag_frame_1400),840,560);
         } 
)

PMTU_echo_reply_nut2tn_GLOBALADDR(reply_1400,frag_data_1400)

PMTU_fragment_nut2tn_GLOBALADDR(
         frag_1400_reply_1st,
                 {
                 NextHeader=58;
                 FragmentOffset=0;
                 MFlag=1;
                 Identification=any;
         },
                {
        data=substr(_PACKET_IPV6_NAME(reply_1400),40,1296);
         } 
)

PMTU_fragment_nut2tn_GLOBALADDR(
         frag_1400_reply_2nd,
                 {
                 NextHeader=58;
                 FragmentOffset=162;
                 MFlag=0;
                 Identification=any;
         },
                {
        data=substr(_PACKET_IPV6_NAME(reply_1400),1336,64);
         } 
)

//
// Fragment Echo Request (packet size 1500) and Reply
//
Payload frag_data_1500 {
         data=repeat(0xff,1452);
}

//PMTU_echo_request_tn2nut_GLOBALADDR(EchoRequest_1500,frag_data_1500)

PMTU_fragment_tn2nut_GLOBALADDR(
         EchoRequest_1st_1500,
                 {
                 NextHeader=58;
                 FragmentOffset=0;
                 MFlag=1;
                 Identification=2147483649;
         },
                {
        data=substr(_PACKET_IPV6_NAME(EchoRequest_1500),40,800);
         } 
)

PMTU_fragment_tn2nut_GLOBALADDR(
         EchoRequest_2nd_1500,
                {
                NextHeader=58;
                FragmentOffset=100;
                MFlag=0;
                Identification=2147483649;
        },
                {
        data=substr(_PACKET_IPV6_NAME(EchoRequest_1500),840,660);
         }
)

//PMTU_echo_reply_nut2tn_GLOBALADDR(EchoReply_1500,frag_data_1500)

PMTU_echo_reply_nut2tn_GLOBALADDR(reply_1500,frag_data_1500)

PMTU_fragment_nut2tn_GLOBALADDR(
         frag_1500_reply_1st,
                 {
                 NextHeader=58;
                 FragmentOffset=0;
                 MFlag=1;
                 Identification=any;
         },
                {
        data=substr(_PACKET_IPV6_NAME(reply_1500),40,1248);
         } 
)

PMTU_fragment_nut2tn_GLOBALADDR(
         frag_1500_reply_2nd,
                 {
                 NextHeader=58;
                 FragmentOffset=156;
                 MFlag=0;
                 Identification=any;
         },
                {
        data=substr(_PACKET_IPV6_NAME(reply_1500),1288,212);
         } 
)
