# NAME

            rfc2765_4.1_options.seq - Verify IPv6 <-> IPv4 header
            translation in accordance with RFC2765 [SIIT]

# TARGET

            Router

# SYNOPSIS

            rfc2765_4.1_options.seq [-tooloption ...]
            -p rfc2765_4.1_options.def

# INITIALIZATION

    	Before this test starts, run initialize.seq.

# TEST PROCEDURE

            This test verifies that NUT ignores IPv6 header options (except
            unexpired Routing Headers, which are not tested here.)

            Network Topology

            Link0
            --------------------------
                |               |
               TN              NUT
                |               |
            --------------------------
            Link1

            TN -- (Link0) -- NUT        NUT -- (Link1) -- TN

            ---------------------      ------------------------

            1.1.
            ===================>
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : TN LINK1 IPv4 embedded IPv6 address
                    Hop-By-Hop option header
                            PadN (3 bytes)
                            Pad1 (1 bytes)
                            Pad1 (1 bytes)
                            Pad1 (1 bytes)
                    ICMPv6 echo request

            1.2.
            <<JUDGMENT>>
                                       ===================>
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK0 IPv4 address
                            dst address : TN LINK1 IPv4 address
                    ICMPv4 echo request

            2.1.
            ===================>
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : TN LINK1 IPv4 embedded IPv6 address
                    Routing option header
                            RoutingType = 0;
                            SegmentsLeft = 0;
                            Address = "::"
                    ICMPv6 echo request

            2.2.
            <<JUDGMENT>>
                                       ===================>
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK0 IPv4 address
                            dst address : TN LINK1 IPv4 address
                    ICMPv4 echo request

            3.1.
            ===================>
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : TN LINK1 IPv4 embedded IPv6 address
                    Fragment option header
                            NextHeader = 58; // ICMPv6
                    ICMPv6 echo request

            3.2.
            <<JUDGMENT>>
                                       ===================>
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK0 IPv4 address
                            dst address : TN LINK1 IPv4 address
                            DF = 1
                    ICMPv4 echo request

            4.1.
            ===================>
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : TN LINK1 IPv4 embedded IPv6 address
                    Destination option header
                            PadN (3 bytes)
                            Pad1 (1 bytes)
                            Pad1 (1 bytes)
                            Pad1 (1 bytes)
                    ICMPv6 echo request

            4.2.
            <<JUDGMENT>>
                                       ===================>
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK0 IPv4 address
                            dst address : TN LINK1 IPv4 address
                    ICMPv4 echo request

            5.1.
            ===================>
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : TN LINK1 IPv4 embedded IPv6 address
                    Hop-By-Hop option header
                            PadN (3 bytes)
                            Pad1 (1 bytes)
                            Pad1 (1 bytes)
                            Pad1 (1 bytes)
                    Routing option header
                            RoutingType = 0;
                            SegmentsLeft = 0;
                            Address = "::"
                    Fragment option header
                            NextHeader = 60; // Destination option header
                    Destination option header
                            PadN (3 bytes)
                            Pad1 (1 bytes)
                            Pad1 (1 bytes)
                            Pad1 (1 bytes)
                    ICMPv6 echo request

            5.2.
            <<JUDGMENT>>
                                       ===================>
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK0 IPv4 address
                            dst address : TN LINK1 IPv4 address
                            DF = 1
                    ICMPv4 echo request

            6.1.
            ===================>
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : NUT LINK0 global IPv6 address
                    Routing option header
                            RoutingType = 0;
                            SegmentsLeft = 1;
                            Address = TN LINK1 IPv4 embedded IPv6 address
                    ICMPv6 echo request

            6.2.
            <<JUDGMENT>>
                                       ===================>
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK0 IPv4 address
                            dst address : TN LINK1 IPv4 address
                    ICMPv4 echo request

# JUDGMENT

            << PASS >>
                    NUT ignores all options and translates the echo requests.

            << FAIL >>
                    NUT doesn't translate the ICMPv6 echo requests to
                    ICMPv4 echo requests.

# NOTE

# REFERENCE

RFC2765

4.1. Translating IPv6 Headers into IPv4 Headers

       If any of an IPv6 hop-by-hop options header, destination options
       header, or routing header with the Segments Left field equal to zero
       are present in the IPv6 packet, they are ignored i.e., there is no
       attempt to translate them.  However, the Total Length field and the
       Protocol field would have to be adjusted to "skip" these extension
       headers.

# SEE ALSO

            perldoc V6evalTool