8.3.1.10. Match Term
This module contains the L23 port match term classes that deal with configuration of the length term on the received traffic of a port.
The match term command names all have the form PM_<xxx>
, and require both a module index id and a port index id, as well as a sub-index identifying a particular match term.
The match 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 PM_CREATE[source]
Bases:
object
Creates an empty match term definition with the specified sub-index value.
- class PM_DELETE[source]
Bases:
object
Deletes the match term definition with the specified sub-index value. A match term cannot be deleted while it is used in the condition of any filter for the port.
- class PM_INDICES[source]
Bases:
object
The full list of which match terms are defined for a port. These are the sub- index values that are used for the parameters defining the content-based matching of packets received for the port. Setting the value of this parameter creates a new empty match term for each value that is not already in use, and deletes each match term that is not mentioned in the list. The same can be accomplished one match-term-at-a-time using the PM_CREATE and PM_DELETE commands.
- class GetDataAttr[source]
Bases:
ResponseBodyStruct
- match_term_xindices
list of integers, the sub-index of a match term definition for the port.
- class SetDataAttr[source]
Bases:
RequestBodyStruct
- match_term_xindices
list of integers, the sub-index of a match term definition for the port.
- class PM_MATCH[source]
Bases:
object
The value that must be found at the match term position for packets received on the port. The mask can make certain bit positions don’t-care.
- class GetDataAttr[source]
Bases:
ResponseBodyStruct
- mask
eight hex bytes, which bits are significant in the match operation.
- value
eight hex bytes, the value that must be found for the match term to be true.
- class SetDataAttr[source]
Bases:
RequestBodyStruct
- mask
eight hex bytes, which bits are significant in the match operation.
- value
eight hex bytes, the value that must be found for the match term to be true.
- class PM_POSITION[source]
Bases:
object
The position within each received packet where content matching begins for the port.
- class GetDataAttr[source]
Bases:
ResponseBodyStruct
- byte_offset
integer, offset from the start of the packet bytes.
- class SetDataAttr[source]
Bases:
RequestBodyStruct
- byte_offset
integer, offset from the start of the packet bytes.
- class PM_PROTOCOL[source]
Bases:
object
The protocol segments assumed on the packets received on the port. This is mainly for information purposes, and helps you identify which portion of the packet header is being matched. The actual value definition of the match position is specified with PM_POSITION.
- class GetDataAttr[source]
Bases:
ResponseBodyStruct
- segments
list of coded bytes, a number specifying a built-in protocol segment: Uses the same coded values as the PS_HEADERPROTOCOL parameter.
- class SetDataAttr[source]
Bases:
RequestBodyStruct
- segments
list of coded bytes, a number specifying a built-in protocol segment: Uses the same coded values as the PS_HEADERPROTOCOL parameter.
- get()[source]
Get the protocol segments assumed on the packets received on the port.
- Returns:
a number specifying a built-in protocol segment: Uses the same coded values as the PS_HEADERPROTOCOL parameter.
- Return type:
- set(segments)[source]
Set the protocol segments assumed on the packets received on the port.
- Parameters:
segments (List[ProtocolOption]) – a number specifying a built-in protocol segment: Uses the same coded values as the PS_HEADERPROTOCOL parameter