| Argument | Type | Description |
|---|
| name | string | Descriptive name of the packet template. |
| multi { header: enum (mac | vlan | ip | udp | raw | ipv6 | tcp) { mac:1, vlan:2, ip:3, udp:4, raw:5, ipv6:6, tcp:7 }
} | Sequence of headers in the generated packet: mac (Ethernet, 14 bytes), vlan (802.1Q tag, 4 bytes), ip (IPv4, 20 bytes), udp (UDP, 8 bytes), raw (arbitrary bytes as a hex string), ipv6 (IPv6, 40 bytes), tcp (TCP). Most header types may appear several times; there can be at most two IP headers and one UDP header per packet. Sequence limitations follow protocol rules (for example a VLAN header can follow only a mac header or another VLAN header). |
| port | enum | Name of the port (from the port menu) the packets are sent out through. Mutually exclusive with interface; the port can also be set in the stream. |
| interface | iface_enum | Interface the packets are sent out through. Mutually exclusive with port; convenient for quick tests since a port entry is then created dynamically. |
| mac-src | multi { array-id, array-id, mac-mask: composite { mac: macAddr
, mask: [ macAddr]
}
} | Source MAC address(es), with optional masks, of the Ethernet header. |
| mac-dst | multi { array-id, array-id, mac-mask: composite { mac: macAddr
, mask: [ macAddr]
}
} | Destination MAC address(es), with optional masks, of the Ethernet header. |
| mac-protocol | multi { protocol: alt { protocol-name: enum ()
, protocol-number: num [ .. 65535]
}
} | EtherType of the Ethernet frame, by name or by protocol number (0-65535). |
| vlan-priority | multi { priority: num [ .. 7]
} | VLAN priority (0-7) of the 802.1Q tag. |
| vlan-id | multi { id: num [ .. 4095]
} | VLAN ID (0-4095) of the 802.1Q tag. |
| vlan-protocol | multi { protocol: alt { protocol-name: enum ()
, protocol-number: num [ .. 65535]
}
} | VLAN protocol, by name or by EtherType number (0-65535). |
| ip-dscp | multi { dscp: num [ .. 255]
} | DS Field value(s) (0-255) of the IPv4 header (DS Field holds the DSCP and ECN values). |
| ip-id | multi { id: num [ .. 65535]
} | IPv4 identification value(s) (0-65535). |
| ip-frag-off | multi { frag-off: num [ .. 65535]
} | IPv4 fragmentation offset(s) (0-65535). |
| ip-ttl | multi { ttl: num [ .. 255]
} | IPv4 time-to-live value(s) (0-255). |
| ip-src | multi { array-id, array-id, ip-range: ipRange
} | Source IPv4 address(es), with optional masks, of the IPv4 header. |
| ip-dst | multi { array-id, array-id, ip-range: ipRange
} | Destination IPv4 address(es), with optional masks, of the IPv4 header. |
| ip-protocol | multi { protocol-name: enum ()
} | IPv4 protocol, for example tcp, udp or icmp. |
| ip-gateway | ipAddr | Next-hop IPv4 address. When the sender and the receiver are the same device the next hop cannot be derived from ip-dst; when ip-gateway is set, the destination MAC is assumed from the resolved gateway. |
| udp-src-port | multi { array-id, array-id, port-range: range [ .. 65535]
} | UDP source port(s) or port range(s) (0-65535). |
| udp-dst-port | multi { array-id, array-id, port-range: range [ .. 65535]
} | UDP destination port(s) or port range(s) (0-65535). |
| udp-checksum | multi { array-id, checksum: num [ .. 65535]
} | UDP checksum value(s) (0-65535). |
| multi { raw-header: string
} | Raw header bytes as a hexadecimal string. |
| ipv6-src | multi { array-id, array-id, ipv6-mask: ip6Prefix
} | Source IPv6 address(es), with optional masks, of the IPv6 header. |
| ipv6-dst | multi { array-id, array-id, ipv6-mask: ip6Prefix
} | Destination IPv6 address(es), with optional masks, of the IPv6 header. |
| multi { protocol: enum ()
} | IPv6 Next Header protocol. |
| ipv6-gateway | ip6Addr | Next-hop IPv6 address; the destination MAC is assumed from the resolved gateway. |
| ipv6-traffic-class | multi { traffic-class: num [ .. 255]
} | IPv6 traffic class value(s) (0-255). |
| ipv6-flow-label | multi { flow-label: num [ .. 0xfffff]
} | IPv6 flow label value(s) (0-1048575). |
| ipv6-hop-limit | multi { hop-limit: num [ .. 255]
} | IPv6 hop limit value(s) (0-255). |
| tcp-src-port | multi { array-id, array-id, port-range: range [ .. 65535]
} | TCP source port(s) or port range(s) (0-65535). |
| tcp-dst-port | multi { array-id, array-id, port-range: range [ .. 65535]
} | TCP destination port(s) or port range(s) (0-65535). |
| tcp-syn | multi { array-id, array-id, syn-range: range
} | TCP sequence number value(s), can be a range. |
| tcp-ack | multi { array-id, array-id, ack-range: range
} | TCP acknowledgement number value(s), can be a range. |
| tcp-data-offset | multi { data-offset: num [ .. 15]
} | TCP data offset (0-15, in 32-bit words). |
| tcp-flags | multi { flags: ubit (fin, syn, rst, psh, ack, urg, ece, cwr, ns, res0, res1, res2)
} | TCP flag bits to set: fin, syn, rst, psh, ack, urg, ece, cwr, ns, res0, res1, res2. |
| tcp-window-size | multi { window-size: num [ .. 65535]
} | TCP window size value(s) (0-65535). |
| tcp-urgent-pointer | multi { urgent-pointer: num [ .. 65535]
} | TCP urgent pointer value(s) (0-65535). |
| data | enum (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-byte | num | Byte used to fill the payload when data=specific-byte. |
| random-byte-offsets-and-masks | multi { 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-ranges | object { 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. |
| bool | Whether a special footer is appended to the generated packets. |
| compute-checksum-from-offset | num | Byte offset from which the 2-byte checksum is calculated; for example 14 skips the Ethernet header. no-checksum disables the checksum. |
| Read-only Argument | Type | Description |
|---|
| assumed-port | enum (none) { none:0xffffffff } | Assumed port the packets are sent out through, derived when only an interface is set. |
| assumed-interface | iface_enum | Assumed interface the packets are sent out through. |
| assumed-mac-src | multi { mac: macAddr
} | Assumed source MAC address (the MAC address of the interface). |
| assumed-mac-dst | multi { mac: macAddr
} | Assumed destination MAC address, derived from ip-dst or from resolving ip-gateway. |
| assumed-mac-protocol | multi { protocol: alt { protocol-name: enum ()
, protocol-number: num
}
} | Assumed EtherType, derived from the header stack (for example ip). |
| assumed-vlan-priority | multi { priority: num
} | Assumed VLAN priority of the 802.1Q tag. |
| assumed-vlan-id | multi { priority: num
} | Assumed VLAN ID of the 802.1Q tag. |
| assumed-vlan-protocol | multi { protocol: alt { protocol-name: enum ()
, protocol-number: num
}
} | Assumed VLAN protocol of the 802.1Q tag. |
| assumed-ip-dscp | multi { dscp: num
} | Assumed IPv4 DS Field value. |
| assumed-ip-id | multi { id: num
} | Assumed IPv4 identification value. |
| assumed-ip-frag-off | multi { frag-off: num
} | Assumed IPv4 fragmentation offset. |
| assumed-ip-ttl | multi { ttl: num
} | Assumed IPv4 time-to-live value (for example 64). |
| assumed-ip-src | multi { assumed-ip-src: ipAddr
} | Assumed source IPv4 address (an address of the interface). |
| assumed-ip-dst | multi { assumed-ip-dst: ipAddr
} | Assumed destination IPv4 address. |
| assumed-ip-protocol | multi { ip-protocol: enum ()
} | Assumed IPv4 protocol, derived from the header stack (for example udp). |
| assumed-udp-src-port | multi { port: num
} | Assumed UDP source port. |
| assumed-udp-dst-port | multi { port: num
} | Assumed UDP destination port. |
| assumed-udp-checksum | multi { checksum: num
} | Assumed UDP checksum value. |
| multi { assumed-raw-header: string
} | Assumed raw header bytes, as a hexadecimal string. |
| assumed-ipv6-src | multi { ip: ip6Addr
} | Assumed source IPv6 address (an address of the interface). |
| assumed-ipv6-dst | multi { ip: ip6Addr
} | Assumed destination IPv6 address. |
| multi { ip-protocol: enum ()
} | Assumed IPv6 Next Header protocol. |
| assumed-ipv6-traffic-class | multi { traffic-class: num
} | Assumed IPv6 traffic class value. |
| assumed-ipv6-flow-label | multi { flow-label: num
} | Assumed IPv6 flow label value. |
| assumed-ipv6-hop-limit | multi { hop-limit: num
} | Assumed IPv6 hop limit value. |
| assumed-tcp-src-port | multi { port: num
} | Assumed TCP source port. |
| assumed-tcp-dst-port | multi { port: num
} | Assumed TCP destination port. |
| assumed-tcp-syn | multi { syn: num
} | Assumed TCP sequence number. |
| assumed-tcp-ack | multi { ack: num
} | Assumed TCP acknowledgement number. |
| assumed-tcp-data-offset | multi { data-offset: num
} | Assumed TCP data offset. |
| assumed-tcp-flags | multi { flags: num
} | Assumed TCP flags. |
| assumed-tcp-window-size | multi { window-size: num
} | Assumed TCP window size. |
| assumed-tcp-urgent-pointer | multi { urgent-pointer: num
} | Assumed TCP urgent pointer value. |