+
        ?                        a  R t0 t ^ RIHt ^ RIt^RIHtHtHtHt Rt	] ^ k  ! R R]P                  ]P                  4      tR# )    )IterableN)mixinsquery	policyreputilPortconQueryc                      a  ] tR t^t o RtRtRtRtRtRt	Rt
]V 3R lR l4       t]P                  V 3R lR l4       t]V 3R lR	 l4       t]P                  V 3R
 lR l4       tV 3R lR ltV 3R ltRtV tR# )r   a  
Port context query.

Parameter:
policy          The policy to query.

Keyword Parameters/Class attributes:
protocol        The protocol to match (socket.IPPROTO_TCP for
                TCP or socket.IPPROTO_UDP for UDP)

ports           A 2-tuple of the port range to match. (Set both to
                the same value for a single port)
ports_subset    If true, the criteria will match if it is a subset
                of the portcon's range.
ports_overlap   If true, the criteria will match if it overlaps
                any of the portcon's range.
ports_superset  If true, the criteria will match if it is a superset
                of the portcon's range.
ports_proper    If true, use proper superset/subset operations.
                No effect if not using set operations.

user            The criteria to match the context's user.
user_regex      If true, regular expression matching
                will be used on the user.

role            The criteria to match the context's role.
role_regex      If true, regular expression matching
                will be used on the role.

type_           The criteria to match the context's type.
type_regex      If true, regular expression matching
                will be used on the type.

range_          The criteria to match the context's range.
range_subset    If true, the criteria will match if it is a subset
                of the context's range.
range_overlap   If true, the criteria will match if it overlaps
                any of the context's range.
range_superset  If true, the criteria will match if it is a superset
                of the context's range.
range_proper    If true, use proper superset/subset operations.
                No effect if not using set operations.
NFc                B   < V ^8  d   QhRS[ P                  R,          /#    returnN)r   PortconRange)format__classdict__s   ";/usr/lib64/python3.14/site-packages/setools/portconquery.py__annotate__PortconQuery.__annotate__C   s      y--4     c                    V P                   # N)_portsselfs   &r   portsPortconQuery.portsB   s    {{r   c                l   < V ^8  d   QhRS[ P                  S[S[S[3,          ,          R,          RR/# r   valueNr   )r   r   tupleint)r   r   s   "r   r   r   G   s7     L L911E#s(OCdJ Lt Lr   c                    \        V\        P                  4      '       d	   Wn        R # V'       d   \        P                  ! V!  MR V n        R # r   )
isinstancer   r   r   r   r   s   &&r   r   r   F   s0    eY3344K<A)00%8tDKr   c                B   < V ^8  d   QhRS[ P                  R,          /# r   )r   PortconProtocol)r   r   s   "r   r   r   N   s      )33d: r   c                    V P                   # r   )	_protocolr   s   &r   protocolPortconQuery.protocolM   s    ~~r   c                V   < V ^8  d   QhRS[ P                  S[,          R,          RR/# r   )r   r%   str)r   r   s   "r   r   r   R   s+     " "i77#=D " "r   c                p    V'       d'   \         P                  P                  V4      V n        R # R V n        R # r   )r   r%   lookupr'   r#   s   &&r   r(   r)   Q   s$    &66==eDDN!DNr   c                D   < V ^8  d   QhRS[ S[P                  ,          /# )r   r   )r   r   Portcon)r   r   s   "r   r   r   X   s      )"3"34 r   c              #  x  "   V P                   P                  RV P                   24       V P                   P                  RV P                  : RV P
                  : RV P                  : RV P                  : RV P                  : 2
4       V P                   P                  RV P                  : 24       V P                  V P                   4       V P                  P                  4        F  pV P                  '       d`   \        P                  ! VP                  V P                  V P                  V P
                  V P                  V P                  4      '       g   Kt  V P                  '       d   V P                  VP                  8w  d   K  V P                  VP                  4      '       g   K  Vx  K  	  R# 5i)	z-Generator which yields all matching portcons.z Generating portcon results from zself.ports=z, self.ports_overlap=z, self.ports_subset=z, self.ports_superset=z, self.ports_proper=zProtocol: self.protocol=N)loginfopolicydebugr   ports_overlapports_subsetports_supersetports_properr(   _match_context_debugportconsr   match_range_match_contextcontext)r   portcons   & r   resultsPortconQuery.resultsX   sP    8FG+$**&<););(==R@Q@Q?S T/--//D$2C2C1EG 	H2DMM#345!!$((+{{++-Gzzz$"2"2MMJJ%%&&''%%#' #' }}}'2B2B!B&&w77M# .s   EF:F:0=F:.F:c                   < V ^8  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[;R&   S[;R&   S[;R&   S[;R&   # )r   Nr'   r   r6   r5   r7   r8   )r   r%   r   bool)r   r   s   "r   r   r      su     \ ((4/6] ^ ""T)0_ ` a b c d  e f g r   )r   r'   )__name__
__module____qualname____firstlineno____doc__r'   r   r6   r5   r7   r8   propertyr   setterr(   r?   __annotate_func____static_attributes____classdictcell__)r   s   @r   r   r      s     *X 37I,0FLM NL  \\L L   __" " W  r   c                    V ^8  d   Qh/ ^ \         9   d,   \        P                  \        \        R3,          ,          ;R&   # )r   .__all__)__conditional_annotations__typingFinalr   r+   )r   s   "r   r   r      s+     $ $
 ; :eCHo	& : %r   )r   )rO   collections.abcr   rP    r   r   r   r   rN   MatchContextPolicyQueryr   r   )rO   s   @r   <module>rV      s;   
 % $  , ,): :d6&&(9(9 dr   