PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  w{Zc@sdZddlZddlZddlmZddlm Z m Z m Z m Z m Z ddlmZmZmZmZdZdefdYZdS( s2Set based operations for IP addresses and subnets.iN(tIntSet(t IPNetworkt IPAddresst cidr_merget cidr_excludetiprange_to_cidrs(t_zipt _sys_maxintt _dict_keyst _int_typecCst|dstdng}g}xX|D]P}t|dsUtdn|jdkrt|j|q1|j|q1W||fS(s Takes a sequence of IP addresses and networks splitting them into two separate sequences by IP version. @param iterable: a sequence or iterator contain IP addresses and networks. @return: a two element tuple (ipv4_list, ipv6_list). t__iter__s#A sequence or iterator is expected!tversions IPAddress or IPNetwork expected!i(thasattrt ValueErrort TypeErrorR tappend(titerabletipv4tipv6tip((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyt partition_ipss  tIPSetcBsOeZdZdZd ddZdZdZdZdZ dZ d Z d Z dd Z dd Zd ZdZdZddZdZdZdZdZdZeZdZdZeZdZeZdZeZdZ e Z!dZ"e"Z#dZ$e%dZ&dZ'e'Z(RS(!s[ Represents an unordered collection (set) of unique IP addresses and subnets. t_cidrsicCsi|_|dk rg}x?|D]7}t|trLt|d|}n|j|q"Wx$t|D]}t|j|tt|j}tt|tgt||_dS(sS Compact internal list of L{IPNetwork} objects using a CIDR merge. N(RtlistRtdictRRtlen(Rtcidrs((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pytcompactkscCstddS(s B{Please Note}: IPSet objects are not hashable and cannot be used as dictionary keys or as members of other sets. Raises C{TypeError} if this method is called. sIP sets are unhashable!N(R(R((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyt__hash__rscCs4t|}x!|jD]}||krtSqWtS(s @param ip: An IP address or subnet. @return: C{True} if IP address or subnet is a member of this IP set. (RRRtFalse(RRR((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyt __contains__zs   cCstjt|jS(sP @return: an iterator over the IP addresses within this IP set. (t _itertoolstchaintsortedR(R((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyR scCs t|jS(sU @return: an iterator over individual IP subnets within this IP set. (R6R(R((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyt iter_cidrsscCsKt|tr$t|d|}n t|}t|j|<|jdS(s Adds an IP address or subnet 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. @param flags: decides which rules are applied to the interpretation of the addr value. See the netaddr.core namespace documentation for supported constant values. RN(RR RRRRR0(RRR((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pytadds   cCst|tr$t|d|}n t|}|j|d}d}x6|jD]+}||krSt||}|}PqSqSW|dk r|j|=x|D]}t|j|s++++cCs8t|dstSt|t|ko7|j|S(s @param other: an IP set. @return: C{True} if this IP set is greater than the C{other} IP set, C{False} otherwise. R(R RHR.t issuperset(RR?((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyt__gt__Xsc Cst|dstSt|j\}}t|j\}}tg|D]}|j|jf^qG}tg|D]}|j|jf^qr}tg|D]}|j|jf^q} tg|D]}|j|jf^q} |j|} | j| } | o| S(s @param other: an IP set. @return: C{True} if every IP address and subnet in other IP set is found within this one. R(R RHRRRMRNRORY( RR?RPRQRRRSRTRURVRWRXRR((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyRYds++++cCs'|j}|j||j|S(s @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). (RERCR0(RR?tip_set((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pytunion~s   cCsg}t|j\}}t|j\}}tg|D]}|j|jf^q:}tg|D]}|j|jf^qe} || @} xOt| jD]>\} } tt| dt| dd} |j | qWtg|D]}|j|jf^q}tg|D]}|j|jf^q}||@}xOt|jD]>\} } tt| dt| dd} |j | qRWt |S(s @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). iii( RRRMRNROR,t_rangesRRtextendR(RR?t cidr_listRPRQRRRSRTRURVt ipv4_resulttstarttendR/RWRXt ipv6_result((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyR>s ++ %++ %cCsg}t|j\}}t|j\}}tg|D]}|j|jf^q:}tg|D]}|j|jf^qe} || A} xOt| jD]>\} } tt| dt| dd} |j | qWtg|D]}|j|jf^q}tg|D]}|j|jf^q}||A}xOt|jD]>\} } tt| dt| dd} |j | qRWt |S(s @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). iii( RRRMRNROR,R]RRR^R(RR?R_RPRQRRRSRTRURVR`RaRbR/RWRXRc((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pytsymmetric_differences ++ %++ %cCsg}t|j\}}t|j\}}tg|D]}|j|jf^q:}tg|D]}|j|jf^qe} || } xOt| jD]>\} } tt| dt| dd} |j | qWtg|D]}|j|jf^q}tg|D]}|j|jf^q}||}xOt|jD]>\} } tt| dt| dd} |j | qRWt |S(s @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.) iii( RRRMRNROR,R]RRR^R(RR?R_RPRQRRRSRTRURVR`RaRbR/RWRXRc((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyt differences ++ %++ %cCs/|j}|tjkr+tdtn|S(s @return: the cardinality of this IP set (i.e. sum of individual IP addresses). Raises C{IndexError} if size > maxint (a Python limitation). Use the .size property for subnets of any size. sUrange contains greater than %d (maxint) IP addresses! Use the .size property instead.(tsizet_systmaxintt IndexErrorR(RRf((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyt__len__s   cCs#tg|jD]}|j^q S(s The cardinality of this IP set (based on the number of individual IP addresses including those implicitly defined in subnets). (tsumRRf(RR((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyRf scCs*dgt|jD]}t|^qS(s8@return: Python statement to create an equivalent objects IPSet(%r)(R6RR$(RRT((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyt__repr__s(s_cidrsN()t__name__t __module__t__doc__t __slots__RRR!R+R0R1R3R R7R8R;R=RARERCRFRIRJRLRKt__le__RZRYt__ge__R\t__or__R>t__and__Rdt__xor__Ret__sub__RjtpropertyRfRlt__str__(((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyR/sJ        1  !     # $ $  (RotsysRgt itertoolsR4tnetaddr.ip.intsetRRMt netaddr.ipRRRRRtnetaddr.compatRRRR RtobjectR(((s3/usr/lib/python2.7/site-packages/netaddr/ip/sets.pyts  ("