#!/usr/bin/perl # # $Name: V6LC_P2_1_4_6 $ # # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Yokogawa Electric 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: EX_HdrProcessingOrder_HFD_M10.seq,v 1.4 2005/04/11 08:27:20 akisada Exp $ # ###################################################################### BEGIN { $V6evalTool::TestVersion = '$Name: V6LC_P2_1_4_6 $'; } use V6evalTool; use CommonSPEC; $pktdesc{'echo_request_HFD_M_10'} = 'Send Echo Request (Frg.hdr precedes Dst.hdr, Error from Frg.hdr)'; $pktdesc{'icmperr'} = 'Recv ICMP Error (Parameter Problem, erroneous header field encountered)'; $endStatus = $V6evalTool::exitPass; $IF = 'Link0'; vCapture($IF); #----- test vSend($IF, 'echo_request_HFD_M_10'); %ret = nd_vRecv_EN($IF, $CommonSPEC::wait_reply, 0, 0, 'icmperr'); if ($ret{'status'} == 0) { vLogHTML('OK
'); } else { vLogHTML('Cannot receive ICMP Error message
'); vLogHTML('NG
'); $endStatus = $V6evalTool::exitFail; } #----- end test $ret = cleanup($IF); vStop($IF); if ($ret == $CommonSPEC::Success) { exit($endStatus); } else { exit($V6evalTool::exitFatal); } ###################################################################### __END__ =head1 NAME EX_HdrProcessingOrder_HFD_M10 - Extension Header Processing Order (Fragment Header precedes Destination Options Header, Error from Fragment Header) =head1 TARGET Host and Router =head1 SYNOPSIS =begin html
  EX_HdrProcessingOrder_HFD_M10.seq [-tooloption ...] -pkt EX_HdrProcessingOrder_HFD_M10.def
    -tooloption : v6eval tool option
=end html =head1 INITIALIZATION None =head1 TEST PROCEDURE Tester Target | | |-------------------------->| | Echo Request | | | | | |<--------------------------| | Neighbor Solicitation | | | | | |-------------------------->| | Neighbor Advertisement | | | | | |<--------------------------| | ICMP Error | | | v v 1. Send Echo Request 2. Wait ICMP Error or NS 3. If NS received then send NA, and wait ICMP Error again 4. Receive ICMP Error Echo Request Data is: IPv6 Header Version = 6 Traffic Class = 0 FlowLabel = 0 PayloadLength = 37 NextHeader = 0 (Hop-by-Hop Options Header) SourceAddress = Tester Link Local Address DestinationAddress = Target Link Local Address Hop-by-Hop Options Header NextHeader = 44 (Fragment Header) HeaderExtLength = 0 OptionType = 1 (PadN) OptDataLength = 4 pad = {0, 0, 0, 0} Fragment Header NextHeader = 60 (Destination Header) FragmentOffset = 0 MFlag = 1 FragmentID = 103 Destination Header NextHeader = 58 (ICMPv6) HeaderExtLength = 0 OptionType = 0x87 (Unrecognized Option, Type 10) OptDataLength = 4 data = {0, 0, 0, 0} ICMP Echo Request Type = 128 (Echo Request) Code = 0 Checksum = (auto) Identifier = 0xffff SequenceNumber = 1 PayloadData = {1, 2, 3, 4, 5} =head1 JUDGEMENT PASS: ICMP Error Received IPv6 Header Version = 6 Traffic Class = 0 FlowLabel = 0 PayloadLength = 85 NextHeader = 58 (ICMPv6) SourceAddress = Target Link Local Address Destination Address = Tester Link Local Address ICMP Error Type = 4 (Parameter Problem) Code = 0 (erroneous header field encountered) Checksum = (auto) Pointer = 4 (Payload Length field in IPv6 Header) PayloadData = (Sent Packet) =cut # =head1 REFERENCE # # RFC2460 # # 4.1 Extension Header Order # # When more than one extension header is used in the same packet, it is # recommended that those headers appear in the following order: # # IPv6 header # Hop-by-Hop Options header # Destination Options header (note 1) # Routing header # Fragment header # Authentication header (note 2) # Encapsulating Security Payload header (note 2) # Destination Options header (note 3) # upper-layer header # # note 1: for options to be processed by the first destination # that appears in the IPv6 Destination Address field # plus subsequent destinations listed in the Routing # header. # # note 2: additional recommendations regarding the relative # order of the Authentication and Encapsulating # Security Payload headers are given in [RFC-2406]. # # note 3: for options to be processed only by the final # destination of the packet. # # 4.5 Fragment Header # # If the length of a fragment, as derived from the fragment packet's # Payload Length field, is not a multiple of 8 octets and the M flag # of that fragment is 1, then that fragment must be discarded and an # ICMP Parameter Problem, Code 0, message should be sent to the # source of the fragment, pointing to the Payload Length field of # the fragment packet. # =pod =head1 REFERENCE =begin html
RFC 2460 - IPv6 Specification
=end html =head1 SEE ALSO perldoc V6evalTool =cut