Package onep :: Package policyservice :: Module match :: Class Port
[frames] | no frames]

Class Port


Match on a port or port range.

port_direction - match.Direction enum protocol - Port.Protocol enum port1 - start port range port2 - end port range (default is value of port1)

Instance Methods
 
__init__(self, port_direction, protocol, port1, port2=None)
Constructs a port or port range match.
 
__eq__(self, obj)

Inherited from Match: check_match_support, get_match_type, match_type, set_negate

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  Protocol = enum(TCP= 6, UDP= 17, SCTP= 132,)

Inherited from Match: MatchOpCode, MatchType, __metaclass__

Properties

Inherited from object: __class__

Method Details

__init__(self, port_direction, protocol, port1, port2=None)
(Constructor)

 

Constructs a port or port range match.

Parameters:
  • port_direction (Direction) - Either source or destination port.
  • protocol (type) - Port.Protocol enum
  • port1 (int) - start port range
  • port2 (int) - end port range (default is value of port1)
Raises:
Overrides: object.__init__