RandomModifier Object


Description:

Use this object to vary a specific portion of a stream block's packet content with random values.

Parents: OpenflowFlowBlock, StreamBlock

RandomModifier Writable Attributes

Attribute Description
Common Writable Attributes Active, Name
DataType

Type to use for the Mask attribute.

Type: enum

Default: NATIVE

Possible Values:

Value Description
NATIVE

Mask attribute is the same type as the PDU field being modified.

BYTE

Mask attribute is a hexadecimal byte pattern.

EnableStream

Whether to use streams or VFDs (Variable Field Definitions) to generate modified values.

Type: bool

Default: FALSE

Possible Values:

Value Description
TRUE

Use streams to generate modified values. A unique signature per stream is generated. The RepeatCount attribute can be an integer value if the per-port limit of 32k streams total across all stream blocks is not exceeded.

FALSE

Use VFDs to generate modified values. The RepeatCount attribute must be a power of two. The number of modifiers with EnableStream set to FALSE is limited by the Spirent TestCenter hardware (4 or 6 depending on the card series).

Mask

Byte mask that specifies the data bytes to be modified. The mask size must be the same size as the data.

Type: string

Default: FF

Offset

Data offset in bytes (starting from most significant byte) to which this modifier applies. This is used when the DataType attribute is set to BYTE.

Type: u32

Default: 0

OffsetReference

String that indicates the protocol field in the PDU object to which the offset applies. Use the format objectName.attribute, where objectName is the value of the Name attribute on the PDU object, and attribute is the attribute you want to reference on that object.

For example, if you want to reference the hardware field in an ARP object, create the ARP object and set its Name attribute to "MyArpPdu". Then in the OffsetReference attribute of the RandomModifier object, refer to this ARP field as MyArpPdu.hardware.

Type: string

Default: "" (empty string)

RecycleCount

Number of times the value will change before reverting to the initial value (applicable only if EnableStream is TRUE).

Note: A large RecycleCount value can degrade performance. If it takes too long to create the stream, try reducing RecycleCount.

Type: u32

Default: 0

RepeatCount

Number of times the value will be repeated (applicable only if EnableStream is TRUE).

Type: u32

Default: 0

Seed

Seed used for generating random numbers.

Type: u32

Default: 0

RandomModifier Read-Only Attributes

There are no read-only attributes.