/opt/support/venv/lib/python3.13/site-packages/netaddr/ip/__pycache__
NameSizeModeActions
glob.cpython-313.pyc116760644editdlrm
iana.cpython-313.pyc176260644editdlrm
nmap.cpython-313.pyc43410644editdlrm
rfc1924.cpython-313.pyc23530644editdlrm
sets.cpython-313.pyc259360644editdlrm
__init__.cpython-313.pyc831360644editdlrm
Edit: /opt/support/venv/lib/python3.13/site-packages/netaddr/ip/__pycache__/sets.cpython-313.pyc (25936B)
ifZSrSSKrSSKrSSKJrJrJrJ r J r J r Sr Sr "SS\5rg)z2Set based operations for IP addresses and subnets.N) IPNetwork IPAddressIPRange cidr_merge cidr_excludeiprange_to_cidrsc.URRnXnURUR:a*URX@RURS- 45 US- nUnU[ U5:amXnXp;aOcUR S-UR:XaO-URXFR S-URS- 45 US- nUnU[ U5:aMmUR S-nUR n X::aURXHU 45 U$)aCalculate IPSet([supernet]) - IPSet(subnets). Assumptions: subnets is sorted, subnet_idx points to the first element in subnets that is a subnet of supernet. Results are appended to the ranges parameter as tuples of in format (version, first, last). Return value is the first subnet_idx that does not point to a subnet of supernet (or len(subnets) if all subsequents items are a subnet of supernet). )_moduleversionfirstappendlenlast) supernetsubnets subnet_idxrangesr subnet prev_subnet cur_subnetr rs A/opt/support/venv/lib/python3.13/site-packages/netaddr/ip/sets.py _subtractrs &&G  F ||hnn$ w q0@AB!OJK s7| #(  %    a :#3#3 3  MM7$4$4q$8*:J:JQ:NO Pa   s7| #   q E ==D } wt,- c## U(dgUSupnUSSH5upEnXSS-:Xa XA:XaUnM[X!5[X154v UnUnUnM7 [X!5[X154v g7f)aYIterate over sorted_ranges, merging where possible Sorted ranges must be a sorted iterable of (version, first, last) tuples. Merging occurs for pairs like [(4, 10, 42), (4, 43, 100)] which is merged into (4, 10, 100), and leads to return value ( IPAddress(10, 4), IPAddress(100, 4) ), which is suitable input for the iprange_to_cidrs function. Nrr )r) sorted_rangescurrent_version current_start current_stop next_version next_start next_stops r_iter_merged_rangesr#6s 3@3C0OL/# UHupn[X4US9v M g7f))r N)r).0value prefixlenr s r %IPSet.__setstate__..s" c]b@YRYY)7 ;]bsTN)r/r0r')r4states r __setstate__IPSet.__setstate__|s mm c]b c   rcURnURnURnURURR :Xa6UR 5H!nXPR;dMURU g O/nURH}nURRU:wdXq:XaM$URnURn X:aX::aURU5 MYX::dM`X:dMgURU U(ae g UHn URU M URR UR- n URS:waURU - S-n U (aUR5n OUR5n XR;agURU URU U=RS-sl U S- n URU - U -Ul SURU'URS:waMgg)z Same as compact(), but assume that added_network is the only change and that this IPSet was properly compacted before added_network was added. This allows to perform compaction much faster. added_network must already be present in self._cidrs. Nrr T) r rr _prefixlenr widthrr'rrC_valuepreviousnext)r4 added_network added_first added_last added_versionpotential_supernet to_remover.r ritem shift_widththe_bit candidates r_compact_single_networkIPSet._compact_single_networks$)) "'' %--   # #}'<'<'B'B B'4&<&<&>"%4 M2'? I <<''=8D$$T*)d.@ M2 )(=$ "KK%"$++11M4K4KK %%*$++{:a?G)224 )..0  + I& M*  # #q ( # 1 K$1$8$8K$GK#WM )-DKK &)%%*rcd[UR5n[RUS5Ulg)zB Compact internal list of `IPNetwork` objects using a CIDR merge. TN)rr'r/r0r4cidrss rcompact IPSet.compacts$4;;'mmE40 rc[S5e)z Raises ``TypeError`` if this method is called. .. note:: IPSet objects are not hashable and cannot be used as dictionary keys or as members of other sets. zIP sets are unhashable!) TypeErrorr4s r__hash__IPSet.__hash__s122rc[U5nX R;agUR(a8U=RS-slX R;agUR(aM8g)zl :param ip: An IP address or subnet. :return: ``True`` if IP address or subnet is a member of this IP set. Tr F)rr'rJ)r4iprs r __contains__IPSet.__contains__sTR= {{ "!!   1 $ ;;&!!!rc,[UR5$)z9Return True if IPSet contains at least one IP, else False)boolr'rbs r__bool__IPSet.__bool__sDKK  rcN[R"[UR56$)z@ :return: an iterator over the IP addresses within this IP set. ) _itertoolschainsortedr'rbs r__iter__IPSet.__iter__s !455rc,[UR5$)zE :return: an iterator over individual IP subnets within this IP set. )rpr'rbs rr1IPSet.iter_cidrssdkk""rc[U[5(aR[R[ USUS5S5nUR R U5 UR5 g[U[5(a URnO3[U[5(a[[XS95nO [U5nSUR U'URU5 g)a Adds an IP address or subnet or IPRange to this IP set. Has no effect if it is already present. Note that where possible the IP address or subnet is merged with other members of the set to form more concise CIDR blocks. :param addr: An IP address or subnet in either string or object form, or an IPRange object. :param flags: decides which rules are applied to the interpretation of the addr value. See the :class:`IPAddress` documentation for supported constant values. rr*TNr+) r-rr/r0rr'updater^rr.r2rrY)r4r7r, new_cidrss radd IPSet.adds dG $ $ &6tAwR&I4PI KK  y ) LLN  dI & &99D c " "Yt9:DT?D  D $$T*rc[U[5(a-[USUS5nUHnURU5 M g[U[5(a [ XS9nO [ U5nURU5 SnSnURHnX;dM [XA5nUn O Ub&URU UHnSURU'M gg)a Removes an IP address or subnet or IPRange from this IP set. Does nothing if it is not already a member. Note that this method behaves more like discard() found in regular Python sets because it doesn't raise KeyError exceptions if the IP address or subnet is question does not exist. It doesn't make sense to fully emulate that behaviour here as IP sets contain groups of individual IP addresses as individual set members using IPNetwork objects. :param addr: An IP address or subnet, or an IPRange. :param flags: decides which rules are applied to the interpretation of the addr value. See the :class:`IPAddress` documentation for supported constant values. rr*Nr+T) r-rrremover2rrrxr'r)r4r7r,r]r. remainder matching_cidrs rr{ IPSet.remove#s& dG $ $$T!Wd2h7E D!  dC T/DT?D   KKD|(4 $      M*!$( D!" !rc<URR5S$)zl Removes and returns an arbitrary IP address or subnet from this IP set. :return: An IP address or subnet. r)r'popitemrbs rpop IPSet.pop[s{{""$Q''rc2URU5nU(+$)z :param other: an IP set. :return: ``True`` if this IP set has no elements (IP addresses or subnets) in common with other. Intersection *must* be an empty set. ) intersection)r4otherresults r isdisjointIPSet.isdisjointds""5)zrcpUR5nURRUR5 U$)z':return: a shallow copy of this IP set.) __class__r'rv)r4obj_copys rcopy IPSet.copyos)>>#t{{+rc [U[5(aq[RS[ [ R "URR5URR5555S5Ulg[U[[45(aURU5 g[US5(d [S5e/nUH2n[U[5(a [XBS9nUR!U5 M4 [ [ R "URR5U55HnSURU'M UR#5 g)aB Update the contents of this IP set with the union of itself and other IP set. :param iterable: an iterable containing IP addresses, subnets or ranges. :param flags: decides which rules are applied to the interpretation of the addr value. See the :class:`IPAddress` documentation for supported constant values. c3&# UHnUv M g7f)N)rArfs rrDIPSet.update..ssTNrqzan iterable was expected!r+)r-r%r/r0rrnror'keysrrrxhasattrrar2rrr^r3s rrv IPSet.updateus h & &--("(()9)9);X__=Q=Q=ST DK  9g"6 7 7 HHX  x,,78 8 D$$$ 3   T " z// 0@0@0BINOD $DKK P rc0Ulg)z5Remove all IP addresses and subnets from this IP set.Nr'rbs rclear IPSet.clears  rcbURUR:H$![a [s$f=f)z{ :param other: an IP set :return: ``True`` if this IP set is equivalent to the ``other`` IP set, ``False`` otherwise. r'AttributeErrorNotImplementedr4rs r__eq__ IPSet.__eq__/ ";;%,,. . "! ! " ..cbURUR:g$![a [s$f=f)z{ :param other: an IP set :return: ``False`` if this IP set is equivalent to the ``other`` IP set, ``True`` otherwise. rrs r__ne__ IPSet.__ne__rrc[US5(d[$URUR:=(a URU5$)zw :param other: an IP set :return: ``True`` if this IP set is less than the ``other`` IP set, ``False`` otherwise. r')rrsizeissubsetrs r__lt__ IPSet.__lt__s8uh''! !yy5::%>$--*>>rc8URH nX!;dM g g)zz :param other: an IP set. :return: ``True`` if every IP address and subnet in this IP set is found within ``other``. FTrr4rr.s rrIPSet.issubsets KKD  rc[US5(d[$URUR:=(a URU5$)z{ :param other: an IP set. :return: ``True`` if this IP set is greater than the ``other`` IP set, ``False`` otherwise. r')rrr issupersetrs r__gt__ IPSet.__gt__s8uh''! !yy5::%@$//%*@@rcf[US5(d[$URH nX ;dM g g)zz :param other: an IP set. :return: ``True`` if every IP address and subnet in other IP set is found within this one. r'FT)rrr'rs rrIPSet.issupersets3uh''! !LLD!rcHUR5nURU5 U$)z :param other: an IP set. :return: the union of this IP set and another as a new IP set (combines IP addresses and subnets from both sets). )rrv)r4rip_sets runion IPSet.unions  e rcr0n[UR5n[UR5nSnSn[U5n[U5nXW:a[Xh:aVX5n XFn X:XaSX)'US- nUS- nO.X;a SX)'US- nOX;a SX*'US- nOX:aUS- nOUS- nXW:aXh:aMV[5n X+lU $)z :param other: an IP set. :return: the intersection of this IP set and another as a new IP set. (IP addresses and subnets common to both sets). rTr )rpr'rr%) r4r result_cidrsown_nets other_netsown_idx other_idxown_len other_lenown_cur other_currs rrIPSet.intersections $++&ELL)  h- O I$9'G"-I#(, %1 Q %(, %1 %*. 'Q &qLGNI'I$9.$  rc /n[UR5n[UR5nSnSn[U5n[U5nXW:aXh:aX5n XFn X:Xa US- nUS- nOX;a[XXR5nUS- nOX;a[XXb5nUS- nOX:aBUR U R R U RU R45 US- nOAUR U R R U RU R45 US- nXW:aXh:aMXW:aLX5n UR U R R U RU R45 US- nXW:aMLXh:aLXFn UR U R R U RU R45 US- nXh:aML[5n [U5H(up[X5nUHnSU RU'M M* U $)z :param other: an IP set. :return: the symmetric difference of this IP set and another as a new IP set (all IP addresses and subnets that are in exactly one of the sets). rr T) rpr'rrrr r r rr%r#r)r4r result_rangesrrrrrrrrrstartstopr]r.s rsymmetric_differenceIPSet.symmetric_difference*s $++&ELL)  h- O I$9'G"-I#1 Q %#IPQ %%g9T 1 &!(('//*A*A7==RYR^R^)_`qLG!(("**22IOOY^^TNI-I$94'G  '//"9"97==',,!W X qLG#"-I  )"3"3";";Y__inn!] ^ NI# .}=KE$U1E&* d#> rc/n0n[UR5n[UR5nSnSn[U5n[U5n Xh:a_Xy:aZXFn XWn X:Xa US- nUS- nO6X;aUS- nO+X;a[XXr5nUS- nOX:a SX:'US- nOUS- nXh:aXy:aMZXh:aSX4U'US- nXh:aM[ U5Hup[ X5HnSX>'M M [ 5nX?lU$)z :param other: an IP set. :return: the difference between this IP set and another as a new IP set (all IP addresses and subnets that are in this IP set but not found in the other.) rr T)rpr'rrr#rr%)r4rrrrrrrrrrrrrr.rs r differenceIPSet.differencels5  $++&ELL)  h- O I$9'G"-I#1 Q %1 %%g9T 1 &,0L)qLGNI%I$9,.2L'* + qLG/}=KE(5%) "6>$  rc~URnU[R:a[S[R-5eU$)z :return: the cardinality of this IP set (i.e. sum of individual IP addresses). Raises ``IndexError`` if size > maxsize (a Python limitation). Use the .size property for subnets of any size. zVrange contains more than %d (sys.maxsize) IP addresses!Use the .size property instead.)r_sysmaxsize IndexError)r4rs r__len__ IPSet.__len__s? yy $,, 248LLA  rcj[URVs/sHoRPM sn5$s snf)z The cardinality of this IP set (based on the number of individual IP addresses including those implicitly defined in subnets). )sumr'rr=s rr IPSet.sizes' $++6+$II+6776s0cpS[UR5Vs/sHn[U5PM sn-$s snf)z8:return: Python statement to create an equivalent objectz IPSet(%r))rpr'str)r4cs r__repr__IPSet.__repr__s.fT[[.AB.Ac!f.ABBBBs3cUR5n[U5S:a$USSnUHnUSU:wa gUSS-nM g)z Returns True if the members of the set form a contiguous IP address range (with no gaps), False otherwise. :return: ``True`` if the ``IPSet`` object is contiguous. r rFr*T)r1r)r4r]rMr.s r iscontiguousIPSet.iscontiguoussS! u:>Qx{H7h& 8a<rcUR5(a0UR5nU(dg[USSUSS5$[S5e)z Generates an IPRange for this IPSet, if all its members form a single contiguous sequence. Raises ``ValueError`` if the set is not contiguous. :return: An ``IPRange`` for all IPs in the IPSet. Nrr*zIPSet is not contiguous)rr1r ValueErrorr\s riprange IPSet.iprangesN     OO%E58A;b " 6 667 7rc## UR5Vs/sH/oRRURUR4PM1 nn[ U5Hup4[ X45v M gs snf7f)zGenerate the merged IPRanges for this IPSet. In contrast to self.iprange(), this will work even when the IPSet is not contiguous. Adjacent IPRanges will be merged together, so you get the minimal number of IPRanges. N)r1r r r rr#r)r4r.rrrs r iter_iprangesIPSet.iter_iprangessgGKooFW FWd\\ ! !4::tyy 9FW  /}=KE%& &>  sA46A/ )A4r)Nr)r)0__name__ __module__ __qualname____firstlineno____doc__ __slots__r8r<rGrYr^rcrgrkrqr1rxr{rrrrvrrrrr__le__rr__ge__r__or__r__and__r__xor__r__sub__rpropertyrr__str__rrr__static_attributes__rrrr%r%Qs *I-<D H.T13&!6 # +@4)p(  'R " " ? F A F F(TG>@#G1fG 88CG 8" 'rr%)r itertoolsrnsysr netaddr.iprrrrrrrr#objectr%rrrrs0 9``%P`6Y 'FY 'r