Automation Knowledge Base

PS_PACKETHEADER [sid] hexdata

Explanation

The first portion of the packet bytes that are transmitted for a stream. This starts with the 14 bytes of the Ethernet header, followed by any contained protocol segments.

All packets transmitted for the stream start with this fixed header. Individual byte positions of the packet header may be varied on a packet-to-packet basis using modifiers.

The full packet comprises the header, the payload, an optional test payload, and the frame checksum.

The header data is specified as raw bytes, since the script environment does not know the field-by-field layout of the various protocol segments. But ValkyrieManager does, so in practice you may use ValkyrieManager’s packet editor, and simply query for the resulting hex string at the script level.

sid:

integer, the sub-index value of the stream definition. hexdata: hex bytes, the raw bytes comprising the packet header.

Summary

set and get, stream index, value types: H*

Example, set:

0/1 PS_PACKETHEADER [5] 0x02AABB…


PS_HEADERPROTOCOL [sid] segment segment …

Explanation

This parameter will inform the Xena tester how to interpret the packet header byte sequence specified with PS_PACKETHEADER.

This is mainly for information purposes, and the stream will transmit the packet header bytes even if no protocol segments are specified. The Xena tester however support calculation of certain field values in hardware, such as the IP, TCP and UDP length and checksum fields. This allow the use of hardware modifiers for these protocol segments. In order for this function to work the Xena tester needs to know the type of each segment that precedes the segment where the hardware calculation is to be performed.

Refer to this page for more details on hardware-based calculation of protocol fields.

sid:

integer, the sub-index value of the stream definition.

segment:

coded integer, a number specifying a built-in protocol segment:

  • ETHERNET (14 bytes)
  • VLAN (4 bytes)
  • ARP (28 bytes)
  • IP (20 bytes)
  • IPV6 (40 bytes)
  • UDP (8 bytes)
  • TCP (20 bytes)
  • LLC (3 bytes)
  • SNAP (5 bytes)
  • GTP (20 bytes)
  • ICMP (8 bytes)
  • RTP (12 bytes)
  • RTCP (4 bytes)
  • STP (35 bytes)
  • SCTP (12 bytes)
  • MACCTRL (4 bytes)
  • MPLS (4 bytes)
  • PBBTAG (4 bytes)
  • FCOE (14 bytes)
  • FC (24 bytes)
  • FCOETAIL > > (4 bytes)
  • IGMP0 (12 bytes)
  • IGMP1 (16 bytes)
  • 46 (eCPRI) (8 bytes)
  • 47 (RoE) (8 bytes)
  • -n (n bytes raw segment)

Summary

set and get, stream index, value types: B*

Example, set:

0/1 PS_HEADERPROTOCOL [5] ETHERNET -4 IP UDP


PS_INSERTFCS [sid] onoff

Explanation

Whether a valid frame checksum is added to the packets of a stream.

sid:

integer, the sub-index value of the stream definition.

onoff:

coded integer, whether frame checksums are inserted: OFF, ON

Summary

set and get, stream index, value type: B

Example, set or get:

0/1 PS_INSERTFCS [5] ON


PS_ARPREQUEST [sid] macaddress

Explanation

Generates an outgoing ARP request on the test port.

The packet header for the stream must contain an IP protocol segment, and the destination IP address is used in the ARP request. If there is a gateway IP address specified for the port and it is on a different subnet than the destination IP address in the packet header, then the gateway IP address is used instead.

The framing of the ARP request matches the packet header, including any VLAN protocol segments.

This script parameter does not generate an immediate result, but waits until an ARP reply is received on the test port. If no reply is received within 500 milliseconds, it returns .

macaddress:

hex bytes, specifying the six bytes of the MAC address.

Summary

get only, value type: HHHHHH

Example, get:

0/3 PS_ARPREQUEST [5] 0x001122776655


PS_PINGREQUEST [sid] delay ttl

Explanation

Generates an outgoing ping request using the ICMP protocol on the test port.

The packet header for the stream must contain an IP protocol segment, with valid source and destination IP addresses.

The framing of the ping request matches the packet header, including any VLAN protocol segments, and the destination MAC address must also be valid, possibly containing a value obtained with PS_ARPREQUEST.

This script parameter does not generate an immediate result, but waits until a ping reply is received on the test port. If no reply is received within 2000 milliseconds, it returns .

delay:

integer, the number of milliseconds for the ping reply to arrive. ttl: byte, the time-to-live value in the ping reply packet.

Summary

get only, value type: I,B

Example, set:

0/3 PS_PINGREQUEST [5] 12 128