[docs]@register_command@dataclassclassPEF_INIT:""" Prepares for setting up a filter definition. When called, all filter definitions in the shadow-set which are not applied are discarded and replaced with the default values (DEFAULT). .. note:: There are 2 register copies used to configure the filters: (1) ``Shadow-copy (type value = 0)`` temporary copy configured by sever. Values stored in ``shadow-copy`` have no immediate effect on the flow filters. PEF_APPLY will pass the values from the ``shadow-copy`` to the ``working-copy``. (2) ``Working-copy (type value = 1)`` reflects what is currently used for filtering in the FPGA. ``Working-copy`` cannot be written directly. Only ``shadow-copy`` allows direct write. (3) All ``set`` actions are performed on ``shadow-copy`` ONLY. (4) Only when PEF_APPLY is called, ``working-copy`` and FPGA are updated with values from the ``shadow-copy``. """code:typing.ClassVar[int]=1700pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:intclassSetDataAttr(RequestBodyStruct):pass
[docs]defset(self)->Token[None]:"""Setting up a filter definition. """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex]))
[docs]@register_command@dataclassclassPEF_APPLY:""" Applies filter definitions from "shadow-copy" to "working-copy". This also pushes these settings to the FPGA. """code:typing.ClassVar[int]=1701pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:intclassSetDataAttr(RequestBodyStruct):pass
[docs]defset(self)->Token[None]:"""Applies filter definitions from "shadow-copy" to "working-copy"."""returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex]))
[docs]@register_command@dataclassclassPEF_ENABLE:""" Defines if filtering is enabled for the flow. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1702pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):state:OnOff=field(XmpByte())"""coded byte, specifies the state of the filter."""classSetDataAttr(RequestBodyStruct):state:OnOff=field(XmpByte())"""coded byte, specifies the state of the filter."""
[docs]defget(self)->Token[GetDataAttr]:"""Get if filtering is enabled for the flow. :return: filter state :rtype: PEF_ENABLE.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,state:OnOff)->Token[None]:"""Set the filter state. :param state: state of the filter :type state: OnOff """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],state=state))
set_off=functools.partialmethod(set,OnOff.OFF)"""Set the filter state to OFF. """set_on=functools.partialmethod(set,OnOff.ON)"""Set the filter state to ON. """
[docs]@register_command@dataclassclassPEF_ETHSETTINGS:""" Defines what filter action is performed on the Ethernet header. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1703pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of Ethernet information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action of Ethernet information."""classSetDataAttr(RequestBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of Ethernet information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action of Ethernet information."""
[docs]defget(self)->Token[GetDataAttr]:"""Get the filter action settings on Ethernet header. :return: Filter setting :rtype: PEF_ETHSETTINGS.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:FilterUse,action:InfoAction)->Token[None]:"""Set the filter action settings on Ethernet header. :param use: specifies if Ethernet information is expected :type use: FilterUse :param action: specifies the use of Ethernet information. :type action: InfoAction """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,action=action))
[docs]@register_command@dataclassclassPEF_ETHSRCADDR:""" Defines the Ethernet Source Address settings for the Ethernet filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1704pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of Ethernet Source Address information."""value:Hex=field(XmpHex(size=6))"""six hex bytes, specifying the six bytes of the address. Default value: 0x000000000000."""mask:Hex=field(XmpHex(size=6))"""six hex bytes, specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF."""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of Ethernet Source Address information."""value:Hex=field(XmpHex(size=6))"""six hex bytes, specifying the six bytes of the address. Default value: 0x000000000000."""mask:Hex=field(XmpHex(size=6))"""six hex bytes, specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF."""
[docs]defget(self)->Token[GetDataAttr]:"""Get the Ethernet Source Address settings for the Ethernet filter. :return: the Ethernet Source Address settings for the Ethernet filter :rtype: PEF_ETHSRCADDR.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:Hex,mask:Hex)->Token[None]:"""Set the Ethernet Source Address settings for the Ethernet filter. :param use: specifies the use of Ethernet Source Address information :type use: OnOff :param value: specifying the six bytes of the address. Default value: 0x000000000000. :type value: Hex :param mask: specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF. :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""Ethernet Source Address is not used for the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""Ethernet Source Address is used for the filter."""
[docs]@register_command@dataclassclassPEF_ETHDESTADDR:""" Defines the Ethernet Destination Address settings for the Ethernet filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1705pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of Ethernet information"""value:Hex=field(XmpHex(size=6))"""six hex bytes, specifying the six bytes of the address. Default value: 0x000000000000"""mask:Hex=field(XmpHex(size=6))"""six hex bytes, specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of Ethernet information"""value:Hex=field(XmpHex(size=6))"""six hex bytes, specifying the six bytes of the address. Default value: 0x000000000000"""mask:Hex=field(XmpHex(size=6))"""six hex bytes, specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the Ethernet Destination Address settings for the Ethernet filter. :return: the Ethernet Destination Address settings for the Ethernet filter. :rtype: PEF_ETHDESTADDR.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:Hex,mask:Hex)->Token[None]:"""Set the Ethernet Destination Address settings for the Ethernet filter. :param use: specifies the use of Ethernet Destination Address information :type use: OnOff :param value: specifying the six bytes of the address. Default value: 0x000000000000 :type value: Hex :param mask: specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""Ethernet Destination Address is not used for the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""Ethernet Destination Address is used for the filter."""
[docs]@register_command@dataclassclassPEF_L2PUSE:""" Defines what Layer 2+ protocols that are present and may be used for the filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1706pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:L2PlusPresent=field(XmpByte())"""coded byte, specifies the presence of Layer 2+ protocols."""classSetDataAttr(RequestBodyStruct):use:L2PlusPresent=field(XmpByte())"""coded byte, specifies the presence of Layer 2+ protocols."""
[docs]defget(self)->Token[GetDataAttr]:"""Get the Layer 2+ protocols settings for the filter. :return: the Layer 2+ protocols settings for the filter :rtype: PEF_L2PUSE.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:L2PlusPresent)->Token[None]:"""Set the Layer 2+ protocols settings for the filter. :param use: specifies the presence of Layer 2+ protocols. :type use: L2PlusPresent """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use))
set_na=functools.partialmethod(set,L2PlusPresent.NA)"""Set the presence of Layer 2+ protocols to NA."""set_vlan1=functools.partialmethod(set,L2PlusPresent.VLAN1)"""Set the presence of Layer 2+ protocols to one VLAN Tag."""set_vlan2=functools.partialmethod(set,L2PlusPresent.VLAN2)"""Set the presence of Layer 2+ protocols to two VLAN Tags."""set_mpls=functools.partialmethod(set,L2PlusPresent.MPLS)"""Set the presence of Layer 2+ protocols to MPLS."""
[docs]@register_command@dataclassclassPEF_VLANSETTINGS:""" Defines what filter action is performed on the VLAN header. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1707pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies if VLAN information is expected."""action:InfoAction=field(XmpByte())"""coded byte, specifies the use of VLAN information."""classSetDataAttr(RequestBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies if VLAN information is expected."""action:InfoAction=field(XmpByte())"""coded byte, specifies the use of VLAN information."""
[docs]defget(self)->Token[GetDataAttr]:"""Get filter action settings on VLAN header. :return: filter action settings on VLAN header :rtype: PEF_VLANSETTINGS.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:FilterUse,action:InfoAction)->Token[None]:"""Set filter action settings on VLAN header. :param use: specifies if VLAN information is expected :type use: FilterUse :param action: specifies the action of VLAN information :type action: InfoAction """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,action=action))
[docs]@register_command@dataclassclassPEF_VLANTAG:""" Basic mode only. Defines the VLAN TAG settings for the VLAN filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1708pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterType_vlan_type:FilterVlanTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of VLAN information"""value:int=field(XmpInt())"""decimal digits, specifying the 12 bit value of the tag. Default value: 0."""mask:Hex=field(XmpHex(size=2))"""two hex digits, specifying the 12 bit value of the tag. Default value: 0x0FFF"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of VLAN information"""value:int=field(XmpInt())"""decimal digits, specifying the 12 bit value of the tag. Default value: 0."""mask:Hex=field(XmpHex(size=2))"""two hex digits, specifying the 12 bit value of the tag. Default value: 0x0FFF"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the VLAN TAG settings for the VLAN filter. :return: the VLAN TAG settings for the VLAN filter :rtype: PEF_VLANTAG.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type,self._vlan_type]))
[docs]defset(self,use:OnOff,value:int,mask:Hex)->Token[None]:"""Set the VLAN TAG settings for the VLAN filter. :param use: specifies the use of VLAN TAG information :type use: OnOff :param value: specifying the 12 bit value of the tag. Default value: 0. :type value: int :param mask: specifying the 12 bit value of the tag. Default value: 0x0FFF :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type,self._vlan_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""VLAN TAG is not used for the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""VLAN TAG is used for the filter."""
[docs]@register_command@dataclassclassPEF_VLANPCP:""" Basic mode only. Defines the VLAN PCP settings for the VLAN filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1709pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterType_vlan_type:FilterVlanTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of VLAN information."""value:int=field(XmpByte())"""byte, specifying the value of the PCP. Default value: 0 (Range: 0 to 7)"""mask:Hex=field(XmpHex(size=1))"""hex byte, specifying the 8 bit value mask. Default value: 0x07"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of VLAN information."""value:int=field(XmpByte())"""byte, specifying the value of the PCP. Default value: 0 (Range: 0 to 7)"""mask:Hex=field(XmpHex(size=1))"""hex byte, specifying the 8 bit value mask. Default value: 0x07"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the VLAN PCP settings for the VLAN filter. :return: the VLAN PCP settings for the VLAN filter :rtype: PEF_VLANPCP.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type,self._vlan_type]))
[docs]defset(self,use:OnOff,value:int,mask:Hex)->Token[None]:"""Set the VLAN PCP settings for the VLAN filter. :param use: specifies the use of VLAN PCP information :type use: OnOff :param value: specifying the value of the PCP. Default value: 0 (Range: 0 to 7) :type value: int :param mask: specifying the 8 bit value mask. Default value: 0x07 :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type,self._vlan_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""VLAN PCP is not used for the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""VLAN PCP is used for the filter."""
[docs]@register_command@dataclassclassPEF_MPLSSETTINGS:""" Basic mode only. Defines what filter action is performed on the MPLS header. """code:typing.ClassVar[int]=1710pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of MPLS information"""action:InfoAction=field(XmpByte())"""coded byte, specifies the action on MPLS information"""classSetDataAttr(RequestBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of MPLS information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action on MPLS information"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the filter action settings on the MPLS header. :return: the filter action settings on the MPLS header :rtype: PEF_MPLSSETTINGS.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:FilterUse,action:InfoAction)->Token[None]:"""Set the filter action settings on the MPLS header. :param use: specifies the use of MPLS information :type use: FilterUse :param action: specifies specifies if MPLS information is expected :type action: InfoAction """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,action=action))
[docs]@register_command@dataclassclassPEF_MPLSLABEL:""" Basic mode only. Defines the MPLS label settings for the filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1711pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of MPLS information."""value:int=field(XmpInt())"""integer, specifying the 20 bit value of the label. Default value: 0."""mask:Hex=field(XmpHex(size=3))"""three hex bytes, specifying the 20 bit value of the label. Default value: 0x0FFFFF,"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of MPLS information."""value:int=field(XmpInt())"""integer, specifying the 20 bit value of the label. Default value: 0."""mask:Hex=field(XmpHex(size=3))"""three hex bytes, specifying the 20 bit value of the label. Default value: 0x0FFFFF,"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the MPLS label settings for the filter. :return: the MPLS label settings for the filter :rtype: PEF_MPLSLABEL.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:int,mask:Hex)->Token[None]:"""Set the MPLS label settings for the filter. :param use: specifies the use of MPLS label information. :type use: OnOff :param value: specifying the 20-bit value of the label. Default value: 0. :type value: int :param mask: specifying the 20-bit value of the label. Default value: 0x0FFFFF, :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""The MPLS label is not used by the filter"""set_on=functools.partialmethod(set,OnOff.ON)"""The MPLS label is used by the filter"""
[docs]@register_command@dataclassclassPEF_MPLSTOC:""" Basic mode only. Defines the MPLS TOC settings for the filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1712pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of MPLS TOC information."""value:int=field(XmpByte())"""byte, specifying the value of the MPLS TOC. Default value: 0 (Range: 0 to 7)."""mask:Hex=field(XmpHex(size=1))"""hex byte, specifying the filter mask for the value of the MPLS TOC. Default value: 0x07"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of MPLS TOC information."""value:int=field(XmpByte())"""byte, specifying the value of the MPLS TOC. Default value: 0 (Range: 0 to 7)."""mask:Hex=field(XmpHex(size=1))"""hex byte, specifying the filter mask for the value of the MPLS TOC. Default value: 0x07"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the MPLS TOC settings for the filter. :return: the MPLS TOC settings for the filter :rtype: PEF_MPLSTOC.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:int,mask:Hex)->Token[None]:"""Set the MPLS TOC settings for the filter. :param use: specifies the use of MPLS TOC information :type use: OnOff :param value: specifying the value of the MPLS TOC. Default value: 0 (Range: 0 to 7). :type value: int :param mask: specifying the filter mask for the value of the MPLS TOC. Default value: 0x07 :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""The MPLS TOC is not used by the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""The MPLS TOC is used by the filter."""
[docs]@register_command@dataclassclassPEF_L3USE:""" Basic mode only. Defines what Layer 3 protocols that are present and may be used for the filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1713pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:L3Present=field(XmpByte())"""coded byte, specifies the presence of Layer 3 protocols:"""classSetDataAttr(RequestBodyStruct):use:L3Present=field(XmpByte())"""coded byte, specifies the presence of Layer 3 protocols:"""
[docs]defget(self)->Token[GetDataAttr]:"""Get Layer 3 protocols settings for the filter. :return: Layer 3 protocols settings for the filter. :rtype: PEF_L3USE.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:L3Present)->Token[None]:"""Set Layer 3 protocols settings for the filter. :param use: specifies the presence of Layer 3 protocols :type use: L3Present """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use))
set_na=functools.partialmethod(set,L3Present.NA)"""Set Layer 3 protocol presence to NA."""set_ip4=functools.partialmethod(set,L3Present.IP4)"""Set Layer 3 protocol presence to IPv4."""set_ip6=functools.partialmethod(set,L3Present.IP6)"""Set Layer 3 protocol presence to IPv6."""
[docs]@register_command@dataclassclassPEF_IPV4SETTINGS:""" Basic mode only. Defines what filter action is performed on the IPv4 header. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1714pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of IPv4 information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action of IPv4 information."""classSetDataAttr(RequestBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of IPv4 information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action of IPv4 information."""
[docs]defget(self)->Token[GetDataAttr]:"""Get the filter action settings on IPv4 header. :return: the filter action settings on IPv4 header :rtype: PEF_IPV4SETTINGS.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:FilterUse,action:InfoAction)->Token[None]:"""Set the filter action settings on IPv4 header. :param use: specifies the use of IPv4 information :type use: FilterUse :param action: specifies the action of IPv4 information :type action: InfoAction """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,action=action))
[docs]@register_command@dataclassclassPEF_IPV4SRCADDR:""" Basic mode only. Defines the IPv4 Source Address settings for the IPv4 filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1715pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv4 Source Address."""value:ipaddress.IPv4Address=field(XmpIPv4Address())"""address, specifying the four bytes of the address. Default value: 0.0.0.0"""mask:Hex=field(XmpHex(size=4))"""four hex bytes, specifying the filter mask of the value. Default value: 0xFFFFFFFF"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv4 Source Address."""value:ipaddress.IPv4Address=field(XmpIPv4Address())"""address, specifying the four bytes of the address. Default value: 0.0.0.0"""mask:Hex=field(XmpHex(size=4))"""four hex bytes, specifying the filter mask of the value. Default value: 0xFFFFFFFF"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the IPv4 Source Address settings for the IPv4 filter. :return: the IPv4 Source Address settings for the IPv4 filter :rtype: PEF_IPV4SRCADDR.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:ipaddress.IPv4Address,mask:Hex)->Token[None]:"""Set the IPv4 Source Address settings for the IPv4 filter. :param use: specifies the use of IPv4 Source Address information :type use: OnOff :param value: specifying the four bytes of the address. Default value: 0.0.0.0 :type value: ipaddress.IPv4Address :param mask: specifying the filter mask of the value. Default value: 0xFFFFFFFF :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""IPv4 Source Address is not used by the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""IPv4 Source Address is used by the filter."""
[docs]@register_command@dataclassclassPEF_IPV4DESTADDR:""" Basic mode only. Defines the IPv4 Destination Address settings for the IPv4 filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1716pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv4 Destination Address."""value:ipaddress.IPv4Address=field(XmpIPv4Address())"""address, specifying the four bytes of the address. Default value: 0.0.0.0"""mask:Hex=field(XmpHex(size=4))"""four hex bytes, specifying the filter mask of the value. Default value: 0xFFFFFFFF"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv4 Destination Address."""value:ipaddress.IPv4Address=field(XmpIPv4Address())"""address, specifying the four bytes of the address. Default value: 0.0.0.0"""mask:Hex=field(XmpHex(size=4))"""four hex bytes, specifying the filter mask of the value. Default value: 0xFFFFFFFF"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the IPv4 Destination Address settings for the IPv4 filter. :return: the IPv4 Destination Address settings for the IPv4 filter :rtype: PEF_IPV4DESTADDR.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:ipaddress.IPv4Address,mask:Hex)->Token[None]:"""Set the IPv4 Destination Address settings for the IPv4 filter. :param use: specifies the use of IPv4 Destination Address information :type use: OnOff :param value: specifying the four bytes of the address. Default value: 0.0.0.0 :type value: ipaddress.IPv4Address :param mask: specifying the filter mask of the value. Default value: 0xFFFFFFFF :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""IPv4 Destination Address is not used by the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""IPv4 Destination Address is used by the filter."""
[docs]@register_command@dataclassclassPEF_IPV4DSCP:""" Basic mode only. Defines if IPv4 DSCP/TOS settings used for the IPv4 filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1717pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv4 information."""value:int=field(XmpByte())"""byte, specifying the value of the IPv4 DSCP/TOS in the upper 6 bits. value[7:2] = DSCP/TOS, value[1:0] = reserved (must be zero). Default value: 0"""mask:Hex=field(XmpHex(size=1))"""hex byte, specifying the filter mask of the value in the upper 6 bits. mask[7:2] = DSCP/TOS mask, mask[1:0] = reserved (must be zero). Default value: 0xFC"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv4 information."""value:int=field(XmpByte())"""byte, specifying the value of the IPv4 DSCP/TOS in the upper 6 bits. value[7:2] = DSCP/TOS, value[1:0] = reserved (must be zero). Default value: 0"""mask:Hex=field(XmpHex(size=1))"""hex byte, specifying the filter mask of the value in the upper 6 bits. mask[7:2] = DSCP/TOS mask, mask[1:0] = reserved (must be zero). Default value: 0xFC"""
[docs]defget(self)->Token[GetDataAttr]:"""Get IPv4 DSCP/TOS settings for the filter. :return: IPv4 DSCP/TOS settings for the filter. :rtype: PEF_IPV4DSCP.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:int,mask:Hex)->Token[None]:"""Set IPv4 DSCP/TOS settings for the filter. :param use: specifies the use of IPv4 DSCP/TOS information. :type use: OnOff :param value: specifying the value of the IPv4 DSCP/TOS in the upper 6 bits. value[7:2] = DSCP/TOS, value[1:0] = reserved (must be zero). Default value: 0 :type value: int :param mask: specifying the filter mask of the value in the upper 6 bits. mask[7:2] = DSCP/TOS mask, mask[1:0] = reserved (must be zero). Default value: 0xFC :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""IPv4 DSCP/TOS is not used in the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""IPv4 DSCP/TOS is used in the filter."""
[docs]@register_command@dataclassclassPEF_IPV6SETTINGS:""" Basic mode only. Defines what filter action is performed on the IPv6 header. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1718pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of IPv6 information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action of IPv6 information."""classSetDataAttr(RequestBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of IPv6 information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action of IPv6 information."""
[docs]defget(self)->Token[GetDataAttr]:"""Get filter action settings on the IPv6 header. :return: specifies the use of IPv6 header :rtype: PEF_IPV6SETTINGS.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:FilterUse,action:InfoAction)->Token[None]:"""Set filter action settings on the IPv6 header. :param use: specifies the use of IPv6 header :type use: FilterUse :param action: specifies the action of IPv6 header :type action: InfoAction """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,action=action))
[docs]@register_command@dataclassclassPEF_IPV6SRCADDR:""" Basic mode only. Defines the IPv6 Source Address settings for the IPv6 filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1719pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv6 Source Address."""value:ipaddress.IPv6Address=field(XmpIPv6Address())"""16 hex bytes, specifying the address. Default : 0x00000000000000000000000000000000"""mask:Hex=field(XmpHex(size=16))"""16 hex bytes, specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv6 Source Address."""value:ipaddress.IPv6Address=field(XmpIPv6Address())"""16 hex bytes, specifying the address. Default : 0x00000000000000000000000000000000"""mask:Hex=field(XmpHex(size=16))"""16 hex bytes, specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the IPv6 Source Address settings for the IPv6 filter. :return: the IPv6 Source Address settings for the IPv6 filter :rtype: PEF_IPV6SRCADDR.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:ipaddress.IPv6Address,mask:Hex)->Token[None]:"""Set the IPv6 Source Address settings for the IPv6 filter. :param use: specifies the use of IPv6 Source Address information :type use: OnOff :param value: specifying the address. Default : 0x00000000000000000000000000000000 :type value: ipaddress.IPv6Address :param mask: specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""IPv6 Source Address is not used in the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""IPv6 Source Address is used in the filter."""
[docs]@register_command@dataclassclassPEF_IPV6DESTADDR:""" Basic mode only. Defines the IPv6 Destination Address settings for the IPv6 filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1720pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv6 Destination Address."""value:ipaddress.IPv6Address=field(XmpIPv6Address())"""16 hex bytes, specifying the address. Default : 0x00000000000000000000000000000000"""mask:Hex=field(XmpHex(size=16))"""16 hex bytes, specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv6 Destination Address."""value:ipaddress.IPv6Address=field(XmpIPv6Address())"""16 hex bytes, specifying the address. Default : 0x00000000000000000000000000000000"""mask:Hex=field(XmpHex(size=16))"""16 hex bytes, specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the IPv6 Destination Address settings for the IPv6 filter. :return: IPv6 Destination Address settings for the IPv6 filter :rtype: PEF_IPV6DESTADDR.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:ipaddress.IPv6Address,mask:Hex)->Token[None]:"""Set the IPv6 Destination Address settings for the IPv6 filter. :param use: specifies the use of IPv6 Destination Address information :type use: OnOff :param value: specifying the address. Default : 0x00000000000000000000000000000000 :type value: ipaddress.IPv6Address :param mask: specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""IPv6 Destination Address is not used in the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""IPv6 Destination Address is used in the filter."""
[docs]@register_command@dataclassclassPEF_IPV6TC:""" Basic mode only. Defines the IPv6 Traffic Class settings used for the filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1721pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv6 information."""value:int=field(XmpByte())"""byte, specifying the value of the IPv6 Traffic Class in the upper 6 bits. value[7:2] = IPv6 Traffic Class. value[1:0] = reserved (must be zero). Default value: 0"""mask:Hex=field(XmpHex(size=1))"""hex byte, specifying the filter mask for the value in the upper 6 bits. mask[7:2] = IPv6 Traffic Class mask. mask[1:0] = reserved (must be zero). Default value: 0xFC"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of IPv6 information."""value:int=field(XmpByte())"""byte, specifying the value of the IPv6 Traffic Class in the upper 6 bits. value[7:2] = IPv6 Traffic Class. value[1:0] = reserved (must be zero). Default value: 0"""mask:Hex=field(XmpHex(size=1))"""hex byte, specifying the filter mask for the value in the upper 6 bits. mask[7:2] = IPv6 Traffic Class mask. mask[1:0] = reserved (must be zero). Default value: 0xFC"""
[docs]defget(self)->Token[GetDataAttr]:"""Get IPv6 Traffic Class settings used for the filter. :return: IPv6 Traffic Class settings used for the filter :rtype: PEF_IPV6TC.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:int,mask:Hex)->Token[None]:"""Set IPv6 Traffic Class settings used for the filter. :param use: specifies the use of the IPv6 Traffic Class information. :type use: OnOff :param value: specifying the value of the IPv6 Traffic Class in the upper 6 bits. value[7:2] = IPv6 Traffic Class. value[1:0] = reserved (must be zero). Default value: 0 :type value: int :param mask: specifying the filter mask for the value in the upper 6 bits. mask[7:2] = IPv6 Traffic Class mask. mask[1:0] = reserved (must be zero). Default value: 0xFC :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""IPv6 Traffic Class is not used in the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""IPv6 Traffic Class is used in the filter."""
[docs]@register_command@dataclassclassPEF_UDPSETTINGS:""" Basic mode only. Controls if UDP packet information is used for flow filtering. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1722pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of UDP information."""action:InfoAction=field(XmpByte())"""coded byte, specifies action use of UDP information."""classSetDataAttr(RequestBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of UDP information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action of UDP information."""
[docs]defget(self)->Token[GetDataAttr]:"""Get filter settings on the UDP header. :return: filter action settings on the UDP header :rtype: PEF_UDPSETTINGS.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:FilterUse,action:InfoAction)->Token[None]:"""Set filter settings on the UDP header. :param use: specifies the use of UDP information. :type use: FilterUse :param action: specifies the action of UDP information. :type action: InfoAction """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,action=action))
[docs]@register_command@dataclassclassPEF_UDPSRCPORT:""" Basic mode only. Defines UDP Source Port settings used for the filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy`` """code:typing.ClassVar[int]=1723pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of UDP Source Port information"""value:int=field(XmpInt())"""integer , specifying the value of the UDP Source Port. Default value: 0"""mask:Hex=field(XmpHex(size=2))"""two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of UDP Source Port information"""value:int=field(XmpInt())"""integer , specifying the value of the UDP Source Port. Default value: 0"""mask:Hex=field(XmpHex(size=2))"""two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
[docs]defget(self)->Token[GetDataAttr]:"""Get UDP Source Port settings used for the filter. :return: UDP Source Port settings used for the filter. :rtype: PEF_UDPSRCPORT.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:int,mask:Hex)->Token[None]:"""Set UDP Source Port settings used for the filter. :param use: specifies the use of UDP Source Port information :type use: OnOff :param value: specifying the value of the UDP Source Port. Default value: 0 :type value: int :param mask: specifying the filter mask for the value. Default value: 0xFFFF :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""UDP Source Port is not used in the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""UDP Source Port is used in the filter."""
[docs]@register_command@dataclassclassPEF_UDPDESTPORT:""" Basic mode only. Defines UDP Destination Port settings used for the filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy``. """code:typing.ClassVar[int]=1724pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of UDP Destination Port information"""value:int=field(XmpInt())"""integer , specifying the value of the UDP Destination Port. Default value: 0"""mask:Hex=field(XmpHex(size=2))"""two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of UDP Destination Port information"""value:int=field(XmpInt())"""integer , specifying the value of the UDP Destination Port. Default value: 0"""mask:Hex=field(XmpHex(size=2))"""two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
[docs]defget(self)->Token[GetDataAttr]:"""Get UDP Destination Port settings used for the filter. :return: UDP Destination Port settings used for the filter. :rtype: PEF_UDPDESTPORT.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:int,mask:Hex)->Token[None]:"""Set UDP Destination Port settings used for the filter. :param use: specifies the use of UDP Destination Port information :type use: OnOff :param value: specifying the value of the UDP Destination Port. Default value: 0 :type value: int :param mask: specifying the filter mask for the value. Default value: 0xFFFF :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""UDP Destination Port is not used in the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""UDP Destination Port is used in the filter."""
[docs]@register_command@dataclassclassPEF_TCPSETTINGS:""" Basic mode only. Defines if filtering on TCP information is used for flow filtering. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy``. """code:typing.ClassVar[int]=1725pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of TCP information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action of TCP information."""classSetDataAttr(RequestBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of TCP information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action of TCP information."""
[docs]defget(self)->Token[GetDataAttr]:"""Get filter action settings on the TCP header. :return: filter action settings on the TCP header. :rtype: PEF_TCPSETTINGS.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:FilterUse,action:InfoAction)->Token[None]:"""Set filter action settings on the TCP header. :param use: specifies the use of TCP information. :type use: FilterUse :param action: specifies the action of TCP information. :type action: InfoAction """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,action=action))
[docs]@register_command@dataclassclassPEF_TCPSRCPORT:""" Basic mode only. Defines TCP Source Port settings used for the filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy``. """code:typing.ClassVar[int]=1726pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of TCP Source Port information"""value:int=field(XmpInt())"""integer , specifying the value of the TCP Source Port. Default value: 0"""mask:Hex=field(XmpHex(size=2))"""two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of TCP Source Port information"""value:int=field(XmpInt())"""integer , specifying the value of the TCP Source Port. Default value: 0"""mask:Hex=field(XmpHex(size=2))"""two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
[docs]defget(self)->Token[GetDataAttr]:"""Get TCP Source Port settings used for the filter. :return: TCP Source Port settings used for the filter. :rtype: PEF_TCPSRCPORT.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:int,mask:Hex)->Token[None]:"""Set TCP Source Port settings used for the filter. :param use: specifies the use of TCP Source Port information :type use: OnOff :param value: specifies the value of the TCP Source Port. Default value: 0 :type value: int :param mask: specifies the filter mask for the value. Default value: 0xFFFF :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""TCP Source Port is not used in the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""TCP Source Port is used in the filter."""
[docs]@register_command@dataclassclassPEF_TCPDESTPORT:""" Basic mode only. Defines TCP Destination Port settings used for the filter. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy``. """code:typing.ClassVar[int]=1727pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of TCP Destination Port information"""value:int=field(XmpInt())"""integer , specifying the value of the TCP Destination Port. Default value: 0"""mask:Hex=field(XmpHex(size=2))"""two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of TCP Destination Port information"""value:int=field(XmpInt())"""integer , specifying the value of the TCP Destination Port. Default value: 0"""mask:Hex=field(XmpHex(size=2))"""two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
[docs]defget(self)->Token[GetDataAttr]:"""Get TCP Destination Port settings used for the filter. :return: TCP Destination Port settings used for the filter. :rtype: PEF_TCPDESTPORT.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:OnOff,value:int,mask:Hex)->Token[None]:"""Set TCP Destination Port settings used for the filter. :param use: specifies the use of TCP Destination Port information :type use: OnOff :param value: specifies the value of the TCP Destination Port. Default value: 0 :type value: int :param mask: specifies the filter mask for the value. Default value: 0xFFFF :type mask: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,value=value,mask=mask))
set_off=functools.partialmethod(set,OnOff.OFF)"""TCP Destination Port is not used in the filter."""set_on=functools.partialmethod(set,OnOff.ON)"""TCP Destination Port is used in the filter."""
[docs]@register_command@dataclassclassPEF_ANYSETTINGS:""" Basic mode only. Defines if filtering on ANY field in a packet is used for flow filtering. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy``. """code:typing.ClassVar[int]=1728pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of ANY field information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action of ANY field information."""classSetDataAttr(RequestBodyStruct):use:FilterUse=field(XmpByte())"""coded byte, specifies the use of ANY field information."""action:InfoAction=field(XmpByte())"""coded byte, specifies the action of ANY field information."""
[docs]defget(self)->Token[GetDataAttr]:"""Get the settings of filtering state on ANY field in a packet. :return: settings of filtering state on ANY field in a packet. :rtype: PEF_ANYSETTINGS.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,use:FilterUse,action:InfoAction)->Token[None]:"""Set the settings of filtering state on ANY field in a packet. :param use: specifies the use of ANY field information. :type use: FilterUse :param action: specifies the action of ANY field information. :type action: InfoAction """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],use=use,action=action))
[docs]@register_command@dataclassclassPEF_ANYCONFIG:""" Basic mode only. Defines the ANY field filter configuration. The "ANY field" filter will match 6 consecutive bytes in the incoming packets at a programmable offset. Applying a mask, allows to only filter based on selected bits within the 6 bytes. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy``. """code:typing.ClassVar[int]=1729pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):position:int=field(XmpByte())"""byte, specifies the start position of the ANY field. Default value: 0, Range:0-127"""value:Hex=field(XmpHex(size=6))"""6 hex bytes, specifying the six bytes of the field. Default value: 0x000000000000"""mask:Hex=field(XmpHex(size=6))"""6 hex bytes, specifying the six bytes of the field. Default value: 0xFFFFFFFFFFFF"""classSetDataAttr(RequestBodyStruct):position:int=field(XmpByte())"""byte, specifies the start position of the ANY field. Default value: 0, Range:0-127"""value:Hex=field(XmpHex(size=6))"""6 hex bytes, specifying the six bytes of the field. Default value: 0x000000000000"""mask:Hex=field(XmpHex(size=6))"""6 hex bytes, specifying the six bytes of the field. Default value: 0xFFFFFFFFFFFF"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the ANY field filter configuration. :return: the ANY field filter configuration :rtype: PEF_ANYCONFIG.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,position:int,value:Hex,mask:Hex)->Token[None]:"""Set the ANY field filter configuration :param position: specifies the start position of the ANY field. Default value: 0, Range:0-127 :type position: int :param value: specifying the six bytes of the field. Default value: 0x000000000000 :type value: str :param mask: specifying the six bytes of the field. Default value: 0xFFFFFFFFFFFF :type mask: str """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],position=position,value=value,mask=mask))
[docs]@register_command@dataclassclassPEF_TPLDSETTINGS:""" Defines if filtering on TPLD field in a packet is used for flow filtering. The TPLD filter allows filtering based on the Xena TPLD ID. The TPLD ID is meta data, which can be inserted into the Ethernet packets by Xena traffic generators. For each flow filter, can the filter be based on 16 TPLD ID values. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy``. """code:typing.ClassVar[int]=1730pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):action:InfoAction=field(XmpByte())"""coded byte, specifies the action of TPLD information."""classSetDataAttr(RequestBodyStruct):action:InfoAction=field(XmpByte())"""coded byte, specifies the action of TPLD information."""
[docs]defget(self)->Token[GetDataAttr]:"""Get the settings of filtering on TPLD field in a packet. :return: the settings of filtering on TPLD field in a packet. :rtype: PEF_TPLDSETTINGS.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,action:InfoAction)->Token[None]:"""Set the settings of filtering on TPLD field in a packet. :param action: specifies the action of TPLD information. :type action: InfoAction """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],action=action))
[docs]@register_command@dataclassclassPEF_TPLDCONFIG:""" Defines the TPLD filter configuration. There are only 16 TPLD filter, thus the index values are from 0 to 15. .. note:: For SET, the only allowed ``_filter_type`` is ``shadow-copy``. """code:typing.ClassVar[int]=1731pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterType_test_payload_filter_index:intclassGetDataAttr(ResponseBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of TPLD field information."""id:int=field(XmpInt())"""int, specifies the TPLD ID. Range: 0-2015, Default value: 0"""classSetDataAttr(RequestBodyStruct):use:OnOff=field(XmpByte())"""coded byte, specifies the use of TPLD field information."""id:int=field(XmpInt())"""int, specifies the TPLD ID. Range: 0-2015, Default value: 0"""
[docs]defget(self)->Token[GetDataAttr]:"""Get the TPLD filter configuration. :return: the use of TPLD field information, and the TPLD ID. Range: 0-2015, Default value: 0 :rtype: PEF_TPLDCONFIG.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type,self._test_payload_filter_index]))
[docs]defset(self,use:OnOff,id:int)->Token[None]:"""Set the TPLD filter configuration. :param use: specifies the use of TPLD field information :type use: OnOff :param id: specifies the TPLD ID. Range: 0-2015, Default value: 0 :type id: int """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type,self._test_payload_filter_index],use=use,id=id))
set_off=functools.partialmethod(set,OnOff.OFF)"""The TPLD information is not used."""set_on=functools.partialmethod(set,OnOff.ON)"""The TPLD information is used."""
[docs]@register_command@dataclassclassPEF_ISSHADOWDIRTY:""" Get shadow filter status (if shadow is in sync with working copy or not). """code:typing.ClassVar[int]=1734pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:intclassGetDataAttr(ResponseBodyStruct):is_in_sync:YesNo=field(XmpByte())"""coded byte, if shadow is in sync with working copy or not."""
[docs]defget(self)->Token[GetDataAttr]:"""Get shadow filter status. :return: if shadow is in sync with working copy or not. :rtype: PEF_ISSHADOWDIRTY.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex]))
[docs]@register_command@dataclassclassPEF_CANCEL:"""Undo updates to shadow filter settings, sets dirty false."""code:typing.ClassVar[int]=1735pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:intclassSetDataAttr(RequestBodyStruct):pass
[docs]defset(self)->Token[None]:"""Undo updates to shadow filter settings, sets dirty false. """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex]))
[docs]@register_command@dataclassclassPEF_VALUE:""" This command is valid only for ``Extended filter mode`` (check :class:`PEF_MODE`). Defines the byte values that can be matched if selected by :class:`PEF_MASK`. If ``<protocol_segment_index> = 0`` the maximum number of match value bytes that can be set is determined by the total length of the protocol segments specified with PEF_PROTOCOL. E.g. if PEF_PROTOCOL is set to ETHERNET then only 12 bytes can be set. In order to set the full 128 bytes, either specify a detailed protocol segment list, or use the raw protocol segment type. This specifies 12 + 116 = 128 bytes. If ``<protocol_segment_index> != 0`` only the bytes covered by that segment are manipulated, so if PEF_PROTOCOL is set to ``ETHERNET VLAN ETHERTYPE eCPRI`` then ``<protocol_segment_index> = 4`` selects the 8 bytes of the eCPRI header starting at byte position (12 + 2 + 4) = 18. For ``set`` command where fewer value bytes are provided than specified by the protocol segment, those unspecified bytes are set to zero. The ``get`` command always returns the number of bytes specified by the protocol segment. """code:typing.ClassVar[int]=1777pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterType_protocol_segment_index:intclassGetDataAttr(ResponseBodyStruct):value:Hex=field(XmpHex())"""list of hex bytes, the raw bytes comprising the packet header."""classSetDataAttr(RequestBodyStruct):value:Hex=field(XmpHex())"""list of hex bytes, the raw bytes comprising the packet header."""
[docs]defget(self)->Token[GetDataAttr]:"""Get the byte values that can be matched if selected by :class:`PEF_MASK`. :return: the byte values that can be matched if selected by :class:`PEF_MASK` :rtype: PEF_VALUE.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,value:Hex)->Token[None]:"""Set the byte values that can be matched if selected by :class:`PEF_MASK`. :param value: the raw bytes comprising the packet header :type value: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],value=value))
[docs]@register_command@dataclassclassPEF_MASK:""" This command is valid only for ``Extended filter mode`` (check :class:`PEF_MODE`). Defines the mask byte values that select the values specified by :class:`PEF_VALUE`. For a chosen ``<protocol_segment_index>`` the first byte in the value masks the first byte of the corresponding :class:`PEF_VALUE` and so on. If ``<protocol_segment_index> = 0`` the maximum number of match value bytes that can be set is determined by the total length of the protocol segments specified with PEF_PROTOCOL`. E.g. if PEF_PROTOCOL is set to ETHERNET then only 12 bytes can be set. In order to set the full 128 bytes, either specify a detailed protocol segment list, or use the raw protocol segment type. This specifies 12 + 116 = 128 bytes. If ``<protocol_segment_index> != 0`` only the bytes covered by that segment are manipulated, so if PEF_PROTOCOL is set to ``ETHERNET VLAN ETHERTYPE eCPRI`` then ``<protocol_segment_index> = 4`` selects the 8 bytes of the eCPRI header starting at byte position (12 + 2 + 4) = 18. ``get/set`` semantics are similar to :class:`PEF_VALUE`. """code:typing.ClassVar[int]=1778pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterType_protocol_segment_index:intclassGetDataAttr(ResponseBodyStruct):masks:Hex=field(XmpHex())classSetDataAttr(RequestBodyStruct):masks:Hex=field(XmpHex())
[docs]defget(self)->Token[GetDataAttr]:"""Get the mask byte values that select the values specified by :class:`PEF_VALUE`. :return: the mask byte values that select the values specified by :class:`PEF_VALUE`. :rtype: PEF_MASK.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,masks:Hex)->Token[None]:"""Set the mask byte values that select the values specified by :class:`PEF_VALUE``. :param masks: mask byte values :type masks: Hex """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],masks=masks))
[docs]@register_command@dataclassclassPEF_PROTOCOL:""" This command is valid only for ``Extended filter mode`` (check :class:`PEF_MODE`). Defines the sequence of protocol segments that can be matched. The total length of the specified segments cannot exceed 128 bytes. If an existing sequence of segments is changed (using PEF_PROTOCOL) the underlying value and mask bytes remain unchanged, even though the semantics of those bytes may have changed. However, if the total length, in bytes, of the segments is reduced, then the excess bytes of value and mask are set to zero. I.e. to update an existing filter, you must first correct the list of segments (using PEF_PROTOCOL) and subsequently update the filtering value (using :class:`PEF_VALUE`) and filtering mask (:class:`PEF_MASK`). """code:typing.ClassVar[int]=1779pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):segment_list:typing.List[ProtocolOption]=field(XmpSequence(types_chunk=[XmpByte()]))"""list of bytes, specifying the list of protocol segment types in the order they are expected in a frame. First segment type must be ETHERNET; the following can be chosen freely. """classSetDataAttr(RequestBodyStruct):segment_list:typing.List[ProtocolOption]=field(XmpSequence(types_chunk=[XmpByte()]))"""list of bytes, specifying the list of protocol segment types in the order they are expected in a frame. First segment type must be ETHERNET; the following can be chosen freely. """
[docs]defget(self)->Token[GetDataAttr]:"""Get the sequence of protocol segments that can be matched. :return: the sequence of protocol segments that can be matched. :rtype: PEF_PROTOCOL.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,segment_list:typing.List[ProtocolOption])->Token[None]:"""Set the sequence of protocol segments that can be matched. :param segment_list: specifying the list of protocol segment types in the order they are expected in a frame. First segment type must be ``ETHERNET``; the following can be chosen freely. :type segment_list: typing.List[ProtocolOption] """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],segment_list=segment_list))
[docs]@register_command@dataclassclassPEF_MODE:"""Control the filter mode."""code:typing.ClassVar[int]=1780pushed:typing.ClassVar[bool]=False_connection:'interfaces.IConnection'_module:int_port:int_flow_xindex:int_filter_type:FilterTypeclassGetDataAttr(ResponseBodyStruct):mode:FilterMode=field(XmpByte())"""integer, the mode of the filter."""classSetDataAttr(RequestBodyStruct):mode:FilterMode=field(XmpByte())"""integer, the mode of the filter."""
[docs]defget(self)->Token[GetDataAttr]:"""Get the filter mode. :return: the filter mode :rtype: PEF_MODE.GetDataAttr """returnToken(self._connection,build_get_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type]))
[docs]defset(self,mode:FilterMode)->Token[None]:"""Set the filter mode. :param mode: the mode of the filter. :type sid: FlowMode """returnToken(self._connection,build_set_request(self,module=self._module,port=self._port,indices=[self._flow_xindex,self._filter_type],mode=mode))
set_basic=functools.partialmethod(set,FilterMode.BASIC)"""Set the filter mode to Basic."""set_extended=functools.partialmethod(set,FilterMode.EXTENDED)"""Set the filter mode to Extended."""