// Script for program Fwtest // Definition of IPv6 header // Attention: you can use this header only if you build some complex headers, containing IP header // This header must be combined with some other headers (on the channel level at least) /* Information about IPv6 header (from RFC2460) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| Traffic Class | Flow Label | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload Length | Next Header | Hop Limit | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Source Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Destination Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Version 4-bit Internet Protocol version number = 6. Traffic Class 8-bit traffic class field. See section 7. Flow Label 20-bit flow label. See section 6. Payload Length 16-bit unsigned integer. Length of the IPv6 payload, i.e., the rest of the packet following this IPv6 header, in octets. (Note that any extension headers [section 4] present are considered part of the payload, i.e., included in the length count.) Next Header 8-bit selector. Identifies the type of header immediately following the IPv6 header. Uses the same values as the IPv4 Protocol field [RFC-1700 et seq.]. Hop Limit 8-bit unsigned integer. Decremented by 1 by each node that forwards the packet. The packet is discarded if Hop Limit is decremented to zero. Source Address 128-bit address of the originator of the packet. See [ADDRARCH]. Destination Address 128-bit address of the intended recipient of the packet (possibly not the ultimate recipient, if a Routing header is present). See [ADDRARCH] and section 4.4. */ // Protocol version field MASK 0xf0 // only 4 first bits belong to this field OFFSET 4 // offsetting 4 bits to the left from byte border // Protocol version field (mask 0xf0, offset 4) .ip6.ver 0x6 // Traffic class field BACK 1 // returning by one byte MASK 0xff0 OFFSET 4 // Traffic class field (mask 0xff0, offset 4) .ip6.class 0x0000 BACK 1 MASK 0x0fffff // Flow label field (mask 0x0fffff) .ip6.flow 0x000000 // Payload length field .ip6.len 0s2 ip6.len IPv6len // Next header field .ip6.next 0 BACK 1 // Next header field .ip6.proto 0 // Hop limit field .ip6.hop 0 BACK 1 // TTL .ip6.ttl 0 // in memory of IPv4 // Source address field .ip6.src 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 //.ip6.src 0x112233445566778899aabbccddeeff00 // Destination address field .ip6.dst 00ff:eedd:ccbb:aa99:8877:6655:4433:2211 // definition of Destination must be the last // protocols over IPv6 DEFINE tcp 0x06 DEFINE udp 0x11 DEFINE icmp 0x01 DEFINE no_next_header 59.