Get raw text for this example
// Header file for program AnetTest
// **** Description of IP header (version 4) ******
// 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)
 
/*     0 1 2 3   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |Version| IHL |Type of Service| Total Length |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | Identification |Flags| Fragment 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"
|   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | Time to Live | Protocol | Header Checksum |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | Source Address |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | Destination Address |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | Options | Padding |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     Example Internet Datagram Header    */
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 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
// version of IP protocol (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)
.ip.ver 4 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".
0x0f
// length of IP header (in fours of bytes, mask 0x0f)
.ip.hlen 5
// IP: type of service
.ip.tos 0
// More detailed TOS byte
 
/*     Bits 0-2: Precedence.   Bit 3: 0 = Normal Delay, 1 = Low Delay.   Bits 4: 0 = Normal Throughput, 1 = High Throughput.   Bits 5: 0 = Normal Relibility, 1 = High Relibility.   Bit 6-7: Reserved for Future Use.     0 1 2 3 4 5 6 7   +-----+-----+-----+-----+-----+-----+-----+-----+   | | | | | | |   | PRECEDENCE | D | T | R | 0 | 0 |   | | | | | | |   +-----+-----+-----+-----+-----+-----+-----+-----+    */
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".
0x10 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
// TOS: delay flag
.delay 0 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".
0x8 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"
3
// TOS: throughput flag
.throughput 0 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".
0x4 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"
2
// TOS: reliability flag
.reliability 0 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".
0x2 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"
1
// TOS: cost flag
.cost 2 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".
0xe0 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"
5
// TOS: priority flag
.priority 0
// end of description of TOS field
// the length of IP datagram
.ip.len 20s2. ip.len IPlen
// auto calculated value
// ID of IP datagram
.ip.id 0s2. 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".
0x1fff
// IP: the field of 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"
(mask 0x1fff)
.ip.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"
0s2. BACK
PARAMETERS: <number of bytes>
Reduces the pointer for the given <number of bytes>.
2 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".
0xe0
// IP flags (mask 0xe0)
.ip.flags 0x00 PASS
PARAMETERS: <number of bytes>
Increases the byte pointer for the given <number of bytes>.
1
// ttl
.ip.ttl 255s1.
// IP: the code of higher level protocol
.ip.proto 0x00
// IP crc
.ip.crc 0x0000 ip.crc IPcrc
// auto calculated value
// address of source
.srcip 192.168.0.1
// field's type is IP address, DNS name may be specified later
BACK
PARAMETERS: <number of bytes>
Reduces the pointer for the given <number of bytes>.
4
// address of source, first byte
.srcip1 192.
// address of source, second byte
.srcip2 168.
// address of source, third byte
.srcip3 0.
// address of source, fourth byte
.srcip4 1.
// address of destination
.dstip 192.168.0.3 BACK
PARAMETERS: <number of bytes>
Reduces the pointer for the given <number of bytes>.
4
// address of destination, first byte
.dstip1 192
// address of destination, second byte
.dstip2 168
// address of destination, third byte
.dstip3 0
// address of destinationm, fourth byte
.dstip4 3
// protocols over IP
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$').
.
ospf 0x59