// // Copyright (C) 1999,2000 Yokogawa Electric Corporation and // YDC Corporation. // All rights reserved. // // Redistribution and use of this software in source and binary // forms, with or without modification, are permitted provided that // the following conditions and disclaimer are agreed and accepted // by the user: // // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in // the documentation and/or other materials provided with // the distribution. // // 3. Neither the names of the copyrighters, the name of the project // which is related to this software (hereinafter referred to as // "project") nor the names of the contributors may be used to // endorse or promote products derived from this software without // specific prior written permission. // // 4. No merchantable use may be permitted without prior written // notification to the copyrighters. // // 5. The copyrighters, the project and the contributors may prohibit // the use of this software at any time. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHTERS, THE PROJECT AND // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING // BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHTERS, THE PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING // IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // $Id: checkPMTUincrease.def,v 1.1.1.1 2000/10/31 22:39:41 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); } )