Get raw text for this example
// 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
PARAMETERS: <field's mask>
Defines the mask for the next defined field. Mask is hexadecimal number. Value for field will be written only in bits corresponding not null bits of mask. See "headers/tcp_header.fws".
0xf0
// only 4 first bits belong to this field
OFFSET
PARAMETERS: <number of bites>
The position of the next defined field will be shifted to the left for the given <number of bits> which must be from 1 to 7. So every written value will be shifter to the left before writing. Nevertheless, after the writing the left bits will be also changed and set to 0. To avoid this use command MASK
PARAMETERS: <field's mask>
Defines the mask for the next defined field. Mask is hexadecimal number. Value for field will be written only in bits corresponding not null bits of mask. See "headers/tcp_header.fws".
. See "headers/tcp_header.fws"
4
// offsetting 4 bits to the left from byte border
// Protocol version field (mask 0xf0, OFFSET
PARAMETERS: <number of bites>
The position of the next defined field will be shifted to the left for the given <number of bits> which must be from 1 to 7. So every written value will be shifter to the left before writing. Nevertheless, after the writing the left bits will be also changed and set to 0. To avoid this use command MASK
PARAMETERS: <field's mask>
Defines the mask for the next defined field. Mask is hexadecimal number. Value for field will be written only in bits corresponding not null bits of mask. See "headers/tcp_header.fws".
. See "headers/tcp_header.fws"
4)
.ip6.ver 0x6
// Traffic class field
BACK
PARAMETERS: <number of bytes>
Reduces the pointer for the given <number of bytes>.
1
// returning by one byte
MASK
PARAMETERS: <field's mask>
Defines the mask for the next defined field. Mask is hexadecimal number. Value for field will be written only in bits corresponding not null bits of mask. See "headers/tcp_header.fws".
0xff0 OFFSET
PARAMETERS: <number of bites>
The position of the next defined field will be shifted to the left for the given <number of bits> which must be from 1 to 7. So every written value will be shifter to the left before writing. Nevertheless, after the writing the left bits will be also changed and set to 0. To avoid this use command MASK
PARAMETERS: <field's mask>
Defines the mask for the next defined field. Mask is hexadecimal number. Value for field will be written only in bits corresponding not null bits of mask. See "headers/tcp_header.fws".
. See "headers/tcp_header.fws"
4
// Traffic class field (mask 0xff0, OFFSET
PARAMETERS: <number of bites>
The position of the next defined field will be shifted to the left for the given <number of bits> which must be from 1 to 7. So every written value will be shifter to the left before writing. Nevertheless, after the writing the left bits will be also changed and set to 0. To avoid this use command MASK
PARAMETERS: <field's mask>
Defines the mask for the next defined field. Mask is hexadecimal number. Value for field will be written only in bits corresponding not null bits of mask. See "headers/tcp_header.fws".
. See "headers/tcp_header.fws"
4)
.ip6.class 0x0000 BACK
PARAMETERS: <number of bytes>
Reduces the pointer for the given <number of bytes>.
1 MASK
PARAMETERS: <field's mask>
Defines the mask for the next defined field. Mask is hexadecimal number. Value for field will be written only in bits corresponding not null bits of mask. See "headers/tcp_header.fws".
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
PARAMETERS: <number of bytes>
Reduces the pointer for the given <number of bytes>.
1
// Next header field
.ip6.proto 0
// Hop limit field
.ip6.hop 0 BACK
PARAMETERS: <number of bytes>
Reduces the pointer for the given <number of bytes>.
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
PARAMETERS: <name> <value>
Defines the substitution which will be applied while reading some values (in parameters to commands and others). <name> will be replaced by <value>. This substitution may be also performed in strings enclosed in apostrophes. In this case the <name> must be enclosed in $ (ex: 'value = $name$'. See also command GDEF
PARAMETERS: <new name> <original name>
Defines the substitution which will be applied while reading almost any read word from text. <New name> will be replaced by <original name>. This substitution may be also performed in strings enclosed in apostrophes. In this case the name must be enclosed in $ (ex: 'value = $name$').
.
tcp 0x06 DEFINE
PARAMETERS: <name> <value>
Defines the substitution which will be applied while reading some values (in parameters to commands and others). <name> will be replaced by <value>. This substitution may be also performed in strings enclosed in apostrophes. In this case the <name> must be enclosed in $ (ex: 'value = $name$'. See also command GDEF
PARAMETERS: <new name> <original name>
Defines the substitution which will be applied while reading almost any read word from text. <New name> will be replaced by <original name>. This substitution may be also performed in strings enclosed in apostrophes. In this case the name must be enclosed in $ (ex: 'value = $name$').
.
udp 0x11 DEFINE
PARAMETERS: <name> <value>
Defines the substitution which will be applied while reading some values (in parameters to commands and others). <name> will be replaced by <value>. This substitution may be also performed in strings enclosed in apostrophes. In this case the <name> must be enclosed in $ (ex: 'value = $name$'. See also command GDEF
PARAMETERS: <new name> <original name>
Defines the substitution which will be applied while reading almost any read word from text. <New name> will be replaced by <original name>. This substitution may be also performed in strings enclosed in apostrophes. In this case the name must be enclosed in $ (ex: 'value = $name$').
.
icmp 0x01 DEFINE
PARAMETERS: <name> <value>
Defines the substitution which will be applied while reading some values (in parameters to commands and others). <name> will be replaced by <value>. This substitution may be also performed in strings enclosed in apostrophes. In this case the <name> must be enclosed in $ (ex: 'value = $name$'. See also command GDEF
PARAMETERS: <new name> <original name>
Defines the substitution which will be applied while reading almost any read word from text. <New name> will be replaced by <original name>. This substitution may be also performed in strings enclosed in apostrophes. In this case the name must be enclosed in $ (ex: 'value = $name$').
.
no_next_header 59.