RangeModifier Object


Description:

Use this object to vary a specific portion of a stream block's packet content with a range of values. It is considered an error if the number of modifiers with EnableStream set to False is greater than the VFDs (variable field definitions) supported by the hardware. If the data type is MAC address, IPv4 address, or IPv6 address, the offset is ignored, and will automatically be updated according to the step value and count.

Parents: OpenflowFlowBlock, StreamBlock

Relations:

Side name
(Type)
Relative Description
CarryChainTo
(CarryChainTo)

ExtendedTableModifier, RangeModifier, TableModifier

Link to another modifier.

RangeModifier Writable Attributes

Attribute Description
Common Writable Attributes Active, Name
Data

Data that is the vector of bytes to be modified.

Type: string

Default: 00

DataType

Type to use for the Data, StepValue, and Mask attributes.

Type: enum

Default: NATIVE

Possible Values:

Value Description
NATIVE

Data, StepValue, and Mask attributes are the same type as the PDU field being modified. For example, XX:XX:XX:XX:XX:XX for MAC addresses and X.X.X.X for IPv4 addresses.

BYTE

Data, StepValue, and Mask attributes are hexadecimal byte patterns.

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

ModifierMode

Step mode.

Type: enum

Default: INCR

Possible Values:

Value Description
INCR

Increment data values.

DECR

Decrement data values.

SHUFFLE

Provide every data value once in random order.

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 RangeModifier 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.

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.

Type: u32

Default: 0

StepValue

Step value of the modifier. If EnableStream is FALSE, the value is constrained to be a power of 2 and a maximum size of 4 bytes.

Type: string

Default: 01

RangeModifier Read-Only Attributes

There are no read-only attributes.