8.3.1.12. Length Term
This module contains the L23 port length term classes that deal with configuration of the length term on the received traffic of a port.
The length term command names all have the form PL_<xxx>
, and require both a module index id and a port index id, as well as a sub-index identifying a particular length term.
The length terms provide basic true/false indications for each packet received on the port.
While a filter is enabled, neither its condition nor the definition of each match term or length term used by the condition can be changed.
- class PL_CREATE[source]
Bases:
object
Creates an empty length term definition with the specified sub-index value.
- class PL_DELETE[source]
Bases:
object
Deletes the length term definition with the specified sub-index value. A length term cannot be deleted while it is used in the condition of any filter for the port.
- class PL_INDICES[source]
Bases:
object
The full list of which length terms are defined for a port. These are the sub- index values that are used for the parameters defining the length-based matching of packets received for the port. Setting the value of this parameter creates a new empty length term for each value that is not already in use, and deletes each length term that is not mentioned in the list. The same can be accomplished one- length-term-at-a-time using the PL_CREATE and PL_DELETE commands.
- class GetDataAttr[source]
Bases:
ResponseBodyStruct
- length_term_xindices
list of integers, the sub-index of a length term definition for the port.
- class SetDataAttr[source]
Bases:
RequestBodyStruct
- length_term_xindices
list of integers, the sub-index of a length term definition for the port.
- class PL_LENGTH[source]
Bases:
object
The specification for a length-based check that is applied on the packets received on the port.
- class GetDataAttr[source]
Bases:
ResponseBodyStruct
- length_check_type
coded integer, whether to test for shorter-than or longer-than.
- size
integer, the value to compare the packet length against.
- class SetDataAttr[source]
Bases:
RequestBodyStruct
- length_check_type
coded integer, whether to test for shorter-than or longer-than.
- size
integer, the value to compare the packet length against.
- get()[source]
Get the configuration of a length-based check that is applied on the packets received on a port.
- Returns:
whether to test for shorter-than or longer-than, and the value to compare the packet length against
- Return type:
- set(length_check_type, size)[source]
Set the configuration of a length-based check that is applied on the packets received on a port.
- Parameters:
length_check_type (LengthCheckType) – whether to test for shorter-than or longer-than
size (int) – the value to compare the packet length against
- set_at_least(size)
Set the length check to be longer than or equal to the given length (at least).
- set_at_most(size)
Set the length check to be short than or equal to the given length (at most).