Skip to main content
Version: 7.26

raw-packet-template


tool/traffic-generator/raw-packet-template​

Type: Directory
Builds packet content from a raw header string. Use this when you need low-level packets that the packet-template builder cannot express. See the Traffic Generator guide.

FlagNameDescription
Ddynamicdynamic
ArgumentTypeDescription
namestringDescriptive name of the RAW packet template.
portenumName of the port (from the port menu) the packets are sent out through.
stringRAW packet header as a hexadecimal string; it fully defines the header stack.
dataenum (uninitialized | random | specific-byte | incrementing) { uninitialized:0, random:1, specific-byte:2, incrementing:3 }How the packet payload (after the header) is filled: uninitialized (not zeroed; fastest), specific-byte (with data-byte), incrementing (bytes 00 01 02 ...), random (random bytes; slowest).
data-bytenumByte used to fill the payload when data=specific-byte.
random-byte-offsets-and-masksmulti { array-id, array-id, offset-and-mask: composite { offset: num [ .. 256] , mask: num [ .. 255] } }Byte offsets in the packet, each with a bit mask, that are filled with random values.
random-rangesobject { random-range: super { offset: num [ .. 256] , [width] :enum (8 | 16 | 32) { 8:8, 16:16, 32:32 } , [range] :range } }Fields at given byte offsets that are filled with random values: width sets the field size (8, 16 or 32 bits) and range the range of the values.
ip-header-offsetmulti { ip-header-offset: num [ .. 65535] }Byte offset of the IPv4 header within the packet, so the generator can locate and parse it.
ipv6-header-offsetmulti { ipv6-header-offset: num [ .. 65535] }Byte offset of the IPv6 header within the packet.
udp-header-offsetmulti { udp-header-offset: num [ .. 65535] }Byte offset of the UDP header within the packet.
udp-compute-checksummulti { udp-compute-checksum: bool }Whether the UDP checksum is computed by the generator.
tcp-header-offsetmulti { tcp-header-offset: num [ .. 65535] }Byte offset of the TCP header within the packet.
boolWhether a special footer is appended to the generated packets.
compute-checksum-from-offsetnumByte offset from which the 2-byte checksum is calculated; for example 14 skips the Ethernet header. no-checksum disables the checksum.
Read-only ArgumentTypeDescription
header-lengthnumTotal length of the packet header in bytes.