Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
ó Êl�Vc@s dZddlmZddlZddlZdZefZyeefZWne k r`nXy e Z Wne k r„e Z nXdddkr¡d„Z n d„Z y ejZWnek rÓd „ZnXd „Zeed ƒrød „Zn d „Zdd„Zdefd„ƒYZdZdZdefd„ƒYZdefd„ƒYZd„Zed„Zd„Zd„Z d„Z!d„Z"d„Z#d„Z$d „Z%d!„Z&d"„Z'd#„Z(d$efd%„ƒYZ)d&e)fd'„ƒYZ*d(e)fd)„ƒYZ+d*efd+„ƒYZ,d,e,e*fd-„ƒYZ-d.e-fd/„ƒYZ.d0e,e+fd1„ƒYZ/d2efd3„ƒYZ0e0e-_1d4efd5„ƒYZ2d6e2e*fd7„ƒYZ3d8e3fd9„ƒYZ4d:e2e+fd;„ƒYZ5d<efd=„ƒYZ6e6e3_1dS(>u•A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. iÿÿÿÿ(tunicode_literalsNu1.0.16ticCs|S(N((tbyt((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_compat_bytes_to_byte_valsscCs'g|D]}tjd|ƒd^qS(Ns!Bi(tstructtunpack(Rtb((s-/usr/lib/python2.7/site-packages/ipaddress.pyR"scCs)d}x|D]}|d>|}q W|S(Nii((tbytvalst endianesstrestbv((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_compat_int_from_byte_vals's cCs¤|dkrF|dks$|d kr6tjdƒ‚ntjd|ƒS|dkr—|dksj|dkr|tjd ƒ‚ntjd |d ?|d @ƒStƒ‚dS(Niiii u(integer out of range for 'I' format codes!Iii€u)integer out of range for 'QQ' format codes!QQi@lÿÿÿÿIl (RterrortpacktNotImplementedError(tintvaltlengthR((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_compat_to_bytes0s  u bit_lengthcCs |jƒS(N(t bit_length(ti((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_compat_bit_length?scCs/x(tjƒD]}||?dkr |Sq WdS(Ni(t itertoolstcount(RR ((s-/usr/lib/python2.7/site-packages/ipaddress.pyRBsiccs,|}x||kr'|V||7}q WdS(N((tstarttendtstepR((s-/usr/lib/python2.7/site-packages/ipaddress.pyt _compat_rangeHst_TotalOrderingMixincBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs t‚dS(N(R(tselftother((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__eq__WscCs$|j|ƒ}|tkrtS| S(N(RtNotImplemented(RRtequal((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__ne__Zs cCs t‚dS(N(R(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__lt__`scCs3|j|ƒ}|tks"| r/|j|ƒS|S(N(R"RR(RRtless((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__le__cs cCsI|j|ƒ}|tkrtS|j|ƒ}|tkr>tS|pG| S(N(R"RR(RRR#R ((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__gt__is  cCs$|j|ƒ}|tkrtS| S(N(R"R(RRR#((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__ge__rs (( t__name__t __module__t __slots__RR!R"R$R%R&(((s-/usr/lib/python2.7/site-packages/ipaddress.pyRPs     i i€tAddressValueErrorcBseZdZRS(u%A Value Error related to the address.(R'R(t__doc__(((s-/usr/lib/python2.7/site-packages/ipaddress.pyR*}stNetmaskValueErrorcBseZdZRS(u%A Value Error related to the netmask.(R'R(R+(((s-/usr/lib/python2.7/site-packages/ipaddress.pyR,�scCs†yt|ƒSWnttfk r'nXyt|ƒSWnttfk rOnXt|tƒrrtd|ƒ‚ntd|ƒ‚dS(u®Take an IP string/int and return an object of the correct type. Args: address: A string or integer, the IP address. Either IPv4 or IPv6 addresses may be supplied; integers less than 2**32 will be considered to be IPv4 by default. Returns: An IPv4Address or IPv6Address object. Raises: ValueError: if the *address* passed isn't either a v4 or a v6 address ux%r does not appear to be an IPv4 or IPv6 address. Did you pass in a bytes (str in Python 2) instead of a unicode object?u0%r does not appear to be an IPv4 or IPv6 addressN(t IPv4AddressR*R,t IPv6Addresst isinstancetbytest ValueError(taddress((s-/usr/lib/python2.7/site-packages/ipaddress.pyt ip_address…s cCsŒyt||ƒSWnttfk r*nXyt||ƒSWnttfk rUnXt|tƒrxtd|ƒ‚ntd|ƒ‚dS(uÐTake an IP string/int and return an object of the correct type. Args: address: A string or integer, the IP network. Either IPv4 or IPv6 networks may be supplied; integers less than 2**32 will be considered to be IPv4 by default. Returns: An IPv4Network or IPv6Network object. Raises: ValueError: if the string passed isn't either a v4 or a v6 address. Or if the network has host bits set. ux%r does not appear to be an IPv4 or IPv6 network. Did you pass in a bytes (str in Python 2) instead of a unicode object?u0%r does not appear to be an IPv4 or IPv6 networkN(t IPv4NetworkR*R,t IPv6NetworkR/R0R1(R2tstrict((s-/usr/lib/python2.7/site-packages/ipaddress.pyt ip_network©s cCsdyt|ƒSWnttfk r'nXyt|ƒSWnttfk rOnXtd|ƒ‚dS(ugTake an IP string/int and return an object of the correct type. Args: address: A string or integer, the IP address. Either IPv4 or IPv6 addresses may be supplied; integers less than 2**32 will be considered to be IPv4 by default. Returns: An IPv4Interface or IPv6Interface object. Raises: ValueError: if the string passed isn't either a v4 or a v6 address. Notes: The IPv?Interface classes describe an Address on a particular Network, so they're basically a combination of both the Address and Network classes. u2%r does not appear to be an IPv4 or IPv6 interfaceN(t IPv4InterfaceR*R,t IPv6InterfaceR1(R2((s-/usr/lib/python2.7/site-packages/ipaddress.pyt ip_interfaceÍscCsAyt|ddƒSWn&tjtfk r<tdƒ‚nXdS(u`Represent an address as 4 packed bytes in network (big-endian) order. Args: address: An integer representation of an IPv4 IP address. Returns: The integer address packed as 4 bytes in network (big-endian) order. Raises: ValueError: If the integer is negative or too large to be an IPv4 IP address. iubigu&Address negative or too large for IPv4N(RRR t OverflowErrorR1(R2((s-/usr/lib/python2.7/site-packages/ipaddress.pytv4_int_to_packedðscCsAyt|ddƒSWn&tjtfk r<tdƒ‚nXdS(uõRepresent an address as 16 packed bytes in network (big-endian) order. Args: address: An integer representation of an IPv6 IP address. Returns: The integer address packed as 16 bytes in network (big-endian) order. iubigu&Address negative or too large for IPv6N(RRR R;R1(R2((s-/usr/lib/python2.7/site-packages/ipaddress.pytv6_int_to_packeds cCs>t|ƒjdƒ}t|ƒdkr:td|ƒ‚n|S(uAHelper to split the netmask and raise AddressValueError if neededu/iuOnly one '/' permitted in %r(t _compat_strtsplittlenR*(R2taddr((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_split_optional_netmasksccslt|ƒ}t|ƒ}}x>|D]6}|j|jdkrS||fV|}n|}q#W||fVdS(uÏFind a sequence of sorted deduplicated IPv#Address. Args: addresses: a list of IPv#Address objects. Yields: A tuple containing the first and last IP addresses in the sequence. iN(titertnextt_ip(t addressestittfirsttlasttip((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_find_address_ranges     cCs,|dkr|St|t||d@ƒƒS(uåCount the number of zero bits on the right hand side. Args: number: an integer. bits: maximum number of bits to count. Returns: The number of zero bits on the right hand side of the number. ii(tminR(tnumbertbits((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_count_righthand_zero_bits0s ccsKt|tƒot|tƒs-tdƒ‚n|j|jkrXtd||fƒ‚n||krstdƒ‚n|jdkr‹t}n$|jdkr£t}n tdƒ‚|j}|j}|j}xz||krFt t ||ƒt ||dƒdƒ}||||fƒ}|V|d|>7}|d|j krÍPqÍqÍWdS( u¤Summarize a network range given the first and last IP addresses. Example: >>> list(summarize_address_range(IPv4Address('192.0.2.0'), ... IPv4Address('192.0.2.130'))) ... #doctest: +NORMALIZE_WHITESPACE [IPv4Network('192.0.2.0/25'), IPv4Network('192.0.2.128/31'), IPv4Network('192.0.2.130/32')] Args: first: the first IPv4Address or IPv6Address in the range. last: the last IPv4Address or IPv6Address in the range. Returns: An iterator of the summarized IPv(4|6) network objects. Raise: TypeError: If the first and last objects are not IP addresses. If the first and last objects are not the same version. ValueError: If the last object is not greater than the first. If the version of the first address is not 4 or 6. u1first and last must be IP addresses, not networksu%%s and %s are not of the same versionu*last IP address must be greater than firstiiuunknown IP versioniN( R/t _BaseAddresst TypeErrortversionR1R4R5t_max_prefixlenRERLRORt _ALL_ONES(RHRIRJtip_bitst first_inttlast_inttnbitstnet((s-/usr/lib/python2.7/site-packages/ipaddress.pytsummarize_address_range@s0       ccsÛt|ƒ}i}xm|r�|jƒ}|jƒ}|j|ƒ}|dkr[||| [IPv4Network('192.0.2.0/24')] This shouldn't be called directly; it is called via collapse_addresses([]). Args: addresses: A list of IPv4Network's or IPv6Network's Returns: A list of IPv4Network's or IPv6Network's depending on what we were passed. N( tlisttpoptsupernettgettNonetappendtsortedtvaluestbroadcast_address(RFtto_mergetsubnetsRYR]texistingRI((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_collapse_addresses_internalws$         cCs£g}g}g}x2|D]*}t|tƒrw|rg|dj|jkrgtd||dfƒ‚n|j|ƒq|j|jkrý|rÂ|dj|jkrÂtd||dfƒ‚ny|j|jƒWqCtk rù|j|j ƒqCXq|r6|dj|jkr6td||dfƒ‚n|j|ƒqWt t |ƒƒ}|r•x3t |ƒD]"\}}|j t||ƒƒqlWnt||ƒS(uËCollapse a list of IP objects. Example: collapse_addresses([IPv4Network('192.0.2.0/25'), IPv4Network('192.0.2.128/25')]) -> [IPv4Network('192.0.2.0/24')] Args: addresses: An iterator of IPv4Network or IPv6Network objects. Returns: An iterator of the collapsed IPv(4|6)Network objects. Raises: TypeError: If passed a list of mixed version objects. iÿÿÿÿu%%s and %s are not of the same version(R/RPt_versionRQR`t _prefixlenRSRJtAttributeErrortnetwork_addressRatsetRKtextendRZRg(RFtaddrstipstnetsRJRHRI((s-/usr/lib/python2.7/site-packages/ipaddress.pytcollapse_addresses¨s4  cCs6t|tƒr|jƒSt|tƒr2|jƒStS(u2Return a key suitable for sorting between networks and addresses. Address and Network objects are not sortable by default; they're fundamentally different so the expression IPv4Address('192.0.2.0') <= IPv4Network('192.0.2.0/24') doesn't make any sense. There are some times however, where you may wish to have ipaddress sort these for you anyway. If you need to do this, you can use this function as the key= argument to sorted(). Args: obj: either a Network or Address object. Returns: appropriate key. (R/t _BaseNetworkt_get_networks_keyRPt_get_address_keyR(tobj((s-/usr/lib/python2.7/site-packages/ipaddress.pytget_mixed_type_keyÞs   t_IPAddressBasecBs¶eZdZd Zed„ƒZed„ƒZed„ƒZed„ƒZd„Z d„Z e d„ƒZ e d„ƒZ e d „ƒZe d „ƒZe d „ƒZd „ZRS(uThe mother class.cCs |jƒS(u:Return the longhand version of the IP address as a string.(t_explode_shorthand_ip_string(R((s-/usr/lib/python2.7/site-packages/ipaddress.pytexplodedýscCs t|ƒS(u;Return the shorthand version of the IP address as a string.(R>(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyt compressedscCs |jƒS(uIThe name of the reverse DNS pointer for the IP address, e.g.: >>> ipaddress.ip_address("127.0.0.1").reverse_pointer '1.0.0.127.in-addr.arpa' >>> ipaddress.ip_address("2001:db8::1").reverse_pointer '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa' (t_reverse_pointer(R((s-/usr/lib/python2.7/site-packages/ipaddress.pytreverse_pointers cCs#dt|ƒf}t|ƒ‚dS(Nu%200s has no version specified(ttypeR(Rtmsg((s-/usr/lib/python2.7/site-packages/ipaddress.pyRRscCsi|dkr.d}t|||jfƒ‚n||jkred}t|||j|jfƒ‚ndS(Niu-%d (< 0) is not permitted as an IPv%d addressu2%d (>= 2**%d) is not permitted as an IPv%d address(R*RhRTRS(RR2R~((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_check_int_addresss cCsDt|ƒ}||kr@d}t|||||jfƒ‚ndS(Nu~%r (len %d != %d) is not permitted as an IPv%d address. Did you pass in a bytes (str in Python 2) instead of a unicode object?(R@R*Rh(RR2t expected_lent address_lenR~((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_check_packed_address s    cCs|j|j|?AS(u¦Turn the prefix length into a bitwise netmask Args: prefixlen: An integer, the prefix length. Returns: An integer. (RT(tclst prefixlen((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_ip_int_from_prefix+s c Cst||jƒ}|j|}||?}d|>d}||kr{|jd}t||dƒ}d}t||ƒ‚n|S(uReturn prefix length from the bitwise netmask. Args: ip_int: An integer, the netmask in expanded bitwise format Returns: An integer, the prefix length. Raises: ValueError: If the input intermingles zeroes & ones iiubigu&Netmask pattern %r mixes zeroes & ones(RORSRR1( Rƒtip_intttrailing_zeroesR„t leading_onestall_onestbyteslentdetailsR~((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_prefix_from_ip_int8s      cCsd|}t|ƒ‚dS(Nu%r is not a valid netmask(R,(Rƒt netmask_strR~((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_report_invalid_netmaskQs cCs†tjj|ƒs"|j|ƒnyt|ƒ}Wntk rR|j|ƒnXd|kom|jkns‚|j|ƒn|S(u Return prefix length from a numeric string Args: prefixlen_str: The string to be converted Returns: An integer, the prefix length. Raises: NetmaskValueError: If the input is not a valid netmask i(t_BaseV4t_DECIMAL_DIGITSt issupersetRŽtintR1RS(Rƒt prefixlen_strR„((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_prefix_from_prefix_stringVs cCsœy|j|ƒ}Wntk r3|j|ƒnXy|j|ƒSWntk rXnX||jN}y|j|ƒSWntk r—|j|ƒnXdS(uTurn a netmask/hostmask string into a prefix length Args: ip_str: The netmask/hostmask to be converted Returns: An integer, the prefix length. Raises: NetmaskValueError: If the input is not a valid netmask/hostmask N(t_ip_int_from_stringR*RŽRŒR1RT(Rƒtip_strR†((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_prefix_from_ip_stringos    cCs|jt|ƒffS(N(t __class__R>(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyt __reduce__‘s((R'R(R+R)tpropertyRyRzR|RRRR‚t classmethodR…RŒRŽR”R—R™(((s-/usr/lib/python2.7/site-packages/ipaddress.pyRw÷s   "RPcBsneZdZd Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z RS( u€A generic IP object. This IP class contains the version independent methods which are used by single IP addresses. cCs|jS(N(RE(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__int__ŸscCs?y&|j|jko$|j|jkSWntk r:tSXdS(N(RERhRjR(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¢s  cCsŒt|tƒstSt|tƒs;td||fƒ‚n|j|jkrftd||fƒ‚n|j|jkrˆ|j|jkStS(Nu"%s and %s are not of the same typeu%%s and %s are not of the same version(R/RwRRPRQRhREtFalse(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pyR"©scCs*t|tƒstS|jt|ƒ|ƒS(N(R/t_compat_int_typesRR˜R’(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__add__¸scCs*t|tƒstS|jt|ƒ|ƒS(N(R/RžRR˜R’(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__sub__½scCsd|jjt|ƒfS(Nu%s(%r)(R˜R'R>(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__repr__ÂscCst|j|jƒƒS(N(R>t_string_from_ip_intRE(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__str__ÅscCsttt|jƒƒƒS(N(thashthexR’RE(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__hash__ÈscCs |j|fS(N(Rh(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRtËscCs|j|jffS(N(R˜RE(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR™Îs((R'R(R+R)RœRR"RŸR R¡R£R¦RtR™(((s-/usr/lib/python2.7/site-packages/ipaddress.pyRP•s         RrcBs�eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z ed „ƒZed „ƒZed„ƒZed„ƒZed„ƒZed„ƒZed„ƒZed„ƒZd„Zd„Zd„Zdd#d„Zdd#d„Zed„ƒZd„Zd„Zed„ƒZ ed„ƒZ!ed„ƒZ"ed „ƒZ#ed!„ƒZ$ed"„ƒZ%RS($u~A generic IP network object. This IP class contains the version independent methods which are used by networks. cCs i|_dS(N(t_cache(RR2((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__init__ÚscCsd|jjt|ƒfS(Nu%s(%r)(R˜R'R>(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¡ÝscCsd|j|jfS(Nu%s/%d(RkR„(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR£àsccsNt|jƒ}t|jƒ}x)t|d|ƒD]}|j|ƒVq2WdS(uŸGenerate Iterator over usable hosts in a network. This is like __iter__ except it doesn't return the network or broadcast addresses. iN(R’RkRcRt_address_class(Rtnetworkt broadcasttx((s-/usr/lib/python2.7/site-packages/ipaddress.pythostsãsccsNt|jƒ}t|jƒ}x)t||dƒD]}|j|ƒVq2WdS(Ni(R’RkRcRR©(RRªR«R¬((s-/usr/lib/python2.7/site-packages/ipaddress.pyt__iter__ïscCsŒt|jƒ}t|jƒ}|dkrT|||krCt‚n|j||ƒS|d7}|||krwt‚n|j||ƒSdS(Nii(R’RkRct IndexErrorR©(RtnRªR«((s-/usr/lib/python2.7/site-packages/ipaddress.pyt __getitem__õs    cCs®t|tƒstSt|tƒs;td||fƒ‚n|j|jkrftd||fƒ‚n|j|jkrˆ|j|jkS|j|jkrª|j|jkStS(Nu"%s and %s are not of the same typeu%%s and %s are not of the same version( R/RwRRrRQRhRktnetmaskR�(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pyR"scCs]yD|j|jkoB|j|jkoBt|jƒt|jƒkSWntk rXtSXdS(N(RhRkR’R²RjR(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pyRs   cCs tt|jƒt|jƒAƒS(N(R¤R’RkR²(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¦scCs`|j|jkrtSt|tƒr)tSt|jƒt|jƒkoYt|jƒkSSdS(N(RhR�R/RrR’RkRERc(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pyt __contains__s  cCs:|j|kp9|j|kp9|j|kp9|j|kS(u*Tell if self is partly contained in other.(RkRc(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pytoverlaps)scCsW|jjdƒ}|dkrS|jt|jƒt|jƒBƒ}||jd other eg: IPv4Network('192.0.2.128/25') > IPv4Network('192.0.2.0/25') IPv6Network('2001:db8::2000/124') > IPv6Network('2001:db8::1000/124') Raises: TypeError if the IP versions are different. u"%s and %s are not of the same typeiÿÿÿÿii(RhRQRkR²(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pytcompare_networks©s!cCs|j|j|jfS(uËNetwork-only key function. Returns an object that identifies this address' network and netmask. This function is a suitable "key" argument for sorted() and list.sort(). (RhRkR²(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRsÙsic cs0|j|jkr|VdS|dk rp||jkrEtdƒ‚n|dkr`tdƒ‚n||j}n|dkr‹tdƒ‚n|j|}||jkrÀtd||fƒ‚nt|jƒ}t|jƒ}t|jƒd|?}x4t|||ƒD] }|j ||fƒ}|VqWdS(uÓThe subnets which join to make the current subnet. In the case that self contains only one IP (self._prefixlen == 32 for IPv4 or self._prefixlen == 128 for IPv6), yield an iterator with just ourself. Args: prefixlen_diff: An integer, the amount the prefix length should be increased by. This should not be set if new_prefix is also set. new_prefix: The desired new prefix length. This must be a larger number (smaller prefix) than the existing prefix. This should not be set if prefixlen_diff is also set. Returns: An iterator of IPv(4|6) objects. Raises: ValueError: The prefixlen_diff is too small or too large. OR prefixlen_diff and new_prefix are both set or new_prefix is a smaller number than the current prefix (smaller number means a larger network) Nunew prefix must be longeriu(cannot set prefixlen_diff and new_prefixiuprefix length diff must be > 0u0prefix length diff %d is invalid for netblock %s( RiRSR_R1R’RkRcRµRR˜( Rtprefixlen_difft new_prefixt new_prefixlenRRRtnew_addrtcurrent((s-/usr/lib/python2.7/site-packages/ipaddress.pyReãs,    cCsÊ|jdkr|S|dk rh||jkr=tdƒ‚n|dkrXtdƒ‚n|j|}n|j|}|dkr�td|j|fƒ‚n|jt|jƒt|jƒ|>@|fƒS(uËThe supernet containing the current network. Args: prefixlen_diff: An integer, the amount the prefix length of the network should be decreased by. For example, given a /24 network and a prefixlen_diff of 3, a supernet with a /21 netmask is returned. Returns: An IPv4 network object. Raises: ValueError: If self.prefixlen - prefixlen_diff < 0. I.e., you have a negative prefix length. OR If prefixlen_diff and new_prefix are both set or new_prefix is a larger number than the current prefix (larger number means a smaller network) iunew prefix must be shorteriu(cannot set prefixlen_diff and new_prefixu;current prefixlen is %d, cannot have a prefixlen_diff of %dN(RiR_R1R„R˜R’RkR²(RRÀRÁRÂ((s-/usr/lib/python2.7/site-packages/ipaddress.pyR]s     cCs|jjo|jjS(u»Test if the address is reserved for multicast use. Returns: A boolean, True if the address is a multicast address. See RFC 2373 2.7 for details. (Rkt is_multicastRc(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÅAs cCsp|j|jkrtSt|dƒrVt|dƒrV|j|jkoU|j|jkStdt|ƒƒ‚dS(Nunetwork_addressubroadcast_addressu9Unable to test subnet containment with element of type %s(RhR�thasattrRkRcRQR}(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pyRºMscCsp|j|jkrtSt|dƒrVt|dƒrV|j|jkoU|j|jkStdt|ƒƒ‚dS(Nunetwork_addressubroadcast_addressu9Unable to test subnet containment with element of type %s(RhR�RÆRkRcRQR}(RR((s-/usr/lib/python2.7/site-packages/ipaddress.pyt supernet_of[scCs|jjo|jjS(uµTest if the address is otherwise IETF reserved. Returns: A boolean, True if the address is within one of the reserved IPv6 Network ranges. (Rkt is_reservedRc(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÈis cCs|jjo|jjS(u�Test if the address is reserved for link-local. Returns: A boolean, True if the address is reserved per RFC 4291. (Rkt is_link_localRc(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÉus cCs|jjo|jjS(uÔTest if this address is allocated for private networks. Returns: A boolean, True if the address is reserved per iana-ipv4-special-registry or iana-ipv6-special-registry. (Rkt is_privateRc(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÊ€s cCs|j S(u×Test if this address is allocated for public networks. Returns: A boolean, True if the address is not reserved per iana-ipv4-special-registry or iana-ipv6-special-registry. (RÊ(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyt is_globalŒs cCs|jjo|jjS(u¨Test if the address is unspecified. Returns: A boolean, True if this is the unspecified address as defined in RFC 2373 2.5.2. (Rktis_unspecifiedRc(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÌ—s cCs|jjo|jjS(u±Test if the address is a loopback address. Returns: A boolean, True if the address is a loopback address as defined in RFC 2373 2.5.3. (Rkt is_loopbackRc(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÍ£s N(&R'R(R+R¨R¡R£R­R®R±R"RR¦R³R´RšRcRµR¶R·R¸R¹R©R„R¾R¿RsR_ReR]RÅRºRÇRÈRÉRÊRËRÌRÍ(((s-/usr/lib/python2.7/site-packages/ipaddress.pyRrÒsD          K 0 5)       R�c BsÜeZdZdZdZdedZedƒZeddddd d d d d g ƒZ eZ iZ d„Z e d„ƒZe d„ƒZe d„ƒZe d„ƒZd„Zd„Zed„ƒZed„ƒZRS(uyBase IPv4 object. The following methods are used by IPv4 objects in both single IP addresses and networks. iiiu 0123456789iÿiþiüiøiðiàiÀi€icCs t|ƒS(N(R>(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRxÇscCs“||jkrˆt|tƒr'|}n6y|j|ƒ}Wn tk r\|j|ƒ}nXt|j|ƒƒ}||f|j| 255) not permitted(R1R�R‘R@R’(Rƒt octet_strR~t octet_int((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÒýs cCs#djd„t|ddƒDƒƒS(uÒTurns a 32-bit integer into dotted decimal notation. Args: ip_int: An integer, the IP address. Returns: The IP address as a string in dotted decimal notation. u.css@|]6}tt|tƒr1tjd|ƒdn|ƒVqdS(s!BiN(R>R/R0RR(t.0R((s-/usr/lib/python2.7/site-packages/ipaddress.pys -siubig(tjoinR(RƒR†((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¢"s cCs‘|jdƒ}y5gtt|ƒD]}||jkr"|^q"}Wntk rXtSXt|ƒt|ƒkrutS|d|dkr�tStS(uÙTest if the IP string is a hostmask (rather than a netmask). Args: ip_str: A string, the potential hostmask. Returns: A boolean, True if the IP string is a hostmask. u.iiÿÿÿÿ(R?RÑR’t_valid_mask_octetsR1R�R@tTrue(RR–RNR¬tparts((s-/usr/lib/python2.7/site-packages/ipaddress.pyt _is_hostmask2s 5 cCs3t|ƒjdƒddd…}dj|ƒdS(u�Return the reverse DNS pointer name for the IPv4 address. This implements the method described in RFC1035 3.5. u.Niÿÿÿÿu .in-addr.arpa(R>R?RØ(Rtreverse_octets((s-/usr/lib/python2.7/site-packages/ipaddress.pyR{Gs"cCs|jS(N(RS(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyt max_prefixlenPscCs|jS(N(Rh(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRRTs((R'R(R+R)Rht IPV4LENGTHRTt frozensetR�RÙRSRÎRxR›RÐR•RÒR¢RÜR{RšRÞRR(((s-/usr/lib/python2.7/site-packages/ipaddress.pyR�°s" ' %  R-cBs†eZdZd Zd„Zed„ƒZed„ƒZed„ƒZed„ƒZ ed„ƒZ ed „ƒZ ed „ƒZ RS( u/Represent and manipulate single IPv4 Addresses.u_ipu __weakref__cCs«t|tƒr)|j|ƒ||_dSt|tƒrj|j|dƒt|ƒ}t|dƒ|_dSt|ƒ}d|kr•t d|ƒ‚n|j |ƒ|_dS(u± Args: address: A string or integer representing the IP Additionally, an integer can be passed, so IPv4Address('192.0.2.1') == IPv4Address(3221225985). or, more generally IPv4Address(int(IPv4Address('192.0.2.1'))) == IPv4Address('192.0.2.1') Raises: AddressValueError: If ipaddress isn't a valid IPv4 address. Niubigu/uUnexpected '/' in %r( R/RžRRER0R‚RR R>R*R•(RR2tbvstaddr_str((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¨_s     cCs t|jƒS(u*The binary representation of this address.(R<RE(R((s-/usr/lib/python2.7/site-packages/ipaddress.pytpackedƒscCs||jjkS(u°Test if the address is otherwise IETF reserved. Returns: A boolean, True if the address is within the reserved IPv4 Network range. (t _constantst_reserved_network(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRȈs cs t‡fd†ˆjjDƒƒS(u¶Test if this address is allocated for private networks. Returns: A boolean, True if the address is reserved per iana-ipv4-special-registry. c3s|]}ˆ|kVqdS(N((R×RY(R(s-/usr/lib/python2.7/site-packages/ipaddress.pys œs(tanyRät_private_networks(R((Rs-/usr/lib/python2.7/site-packages/ipaddress.pyRÊ“s cCs||jjkS(u­Test if the address is reserved for multicast use. Returns: A boolean, True if the address is multicast. See RFC 3171 for details. (Rät_multicast_network(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÅžs cCs||jjkS(u¤Test if the address is unspecified. Returns: A boolean, True if this is the unspecified address as defined in RFC 5735 3. (Rät_unspecified_address(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÌ©s cCs||jjkS(u�Test if the address is a loopback address. Returns: A boolean, True if the address is a loopback per RFC 3330. (Rät_loopback_network(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÍ´scCs||jjkS(u’Test if the address is reserved for link-local. Returns: A boolean, True if the address is link-local per RFC 3927. (Rät_linklocal_network(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRɾs(u_ipu __weakref__( R'R(R+R)R¨RšRãRÈRÊRÅRÌRÍRÉ(((s-/usr/lib/python2.7/site-packages/ipaddress.pyR-Ys $     R8cBszeZd„Zd„Zd„Zd„Zd„ZejZe d„ƒZ e d„ƒZ e d„ƒZ e d„ƒZ RS( cCs;t|ttfƒrGtj||ƒt|jƒ|_|j|_ dSt|t ƒrÕtj||dƒt |ƒdkr’t |dƒ|_ n |j|_ t|dt ƒ|_|jj|_|jj|_dSt|ƒ}tj||dƒt|dt ƒ|_|jj |_ |jj|_|jj|_dS(NiiR6(R/R0RžR-R¨R4RERªRSRittupleR@R’R�R²RµRB(RR2RA((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¨Ës(   cCs d|j|jƒ|jjfS(Nu%s/%d(R¢RERªR„(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR£çscCsVtj||ƒ}| s%|tkr)|Sy|j|jkSWntk rQtSXdS(N(R-RRRªRjR�(RRt address_equal((s-/usr/lib/python2.7/site-packages/ipaddress.pyRës cCsOtj||ƒ}|tkr"tSy|j|jkSWntk rJtSXdS(N(R-R"RRªRjR�(RRt address_less((s-/usr/lib/python2.7/site-packages/ipaddress.pyR"÷s  cCs|j|jAt|jjƒAS(N(RERiR’RªRk(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¦scCs t|jƒS(N(R-RE(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRJscCsd|j|jƒ|jfS(Nu%s/%s(R¢RERi(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¶ scCsd|j|jƒ|jfS(Nu%s/%s(R¢RER²(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR·scCsd|j|jƒ|jfS(Nu%s/%s(R¢RERµ(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¸s(R'R(R¨R£RR"R¦RwR™RšRJR¶R·R¸(((s-/usr/lib/python2.7/site-packages/ipaddress.pyR8És    R4cBs/eZdZeZed„Zed„ƒZRS(ueThis class represents and manipulates 32-bit IPv4 network + addresses.. Attributes: [examples for IPv4Network('192.0.2.0/27')] .network_address: IPv4Address('192.0.2.0') .hostmask: IPv4Address('0.0.0.31') .broadcast_address: IPv4Address('192.0.2.32') .netmask: IPv4Address('255.255.255.224') .prefixlen: 27 cCstj||ƒt|ttfƒrVt|ƒ|_|j|jƒ\|_ |_ dSt|t ƒrt |ƒdkr„|d}n |j}t|dƒ|_|j|ƒ\|_ |_ t |jƒ}|t |j ƒ@|kr|rütd|ƒ‚qt|t |j ƒ@ƒ|_ndSt|ƒ}t|j|dƒƒ|_t |ƒdkrf|d}n |j}|j|ƒ\|_ |_ |rÑtt |jƒt |j ƒ@ƒ|jkrÑtd|ƒ‚qÑntt |jƒt |j ƒ@ƒ|_|j |jdkr|j|_ndS(uInstantiate a new IPv4 network object. Args: address: A string or integer representing the IP [& network]. '192.0.2.0/24' '192.0.2.0/255.255.255.0' '192.0.0.2/0.0.0.255' are all functionally the same in IPv4. Similarly, '192.0.2.1' '192.0.2.1/255.255.255.255' '192.0.2.1/32' are also functionally equivalent. That is to say, failing to provide a subnetmask will create an object with a mask of /32. If the mask (portion after the / in the argument) is given in dotted quad form, it is treated as a netmask if it starts with a non-zero field (e.g. /255.0.0.0 == /8) and as a hostmask if it starts with a zero field (e.g. 0.255.255.255 == /8), with the single exception of an all-zero mask which is treated as a netmask == /0. If no mask is given, a default of /32 is used. Additionally, an integer can be passed, so IPv4Network('192.0.2.1') == IPv4Network(3221225985) or, more generally IPv4Interface(int(IPv4Interface('192.0.2.1'))) == IPv4Interface('192.0.2.1') Raises: AddressValueError: If ipaddress isn't a valid IPv4 address. NetmaskValueError: If the netmask isn't valid for an IPv4 address. ValueError: If strict is True and a network address is not supplied. Niiu%s has host bits seti(RrR¨R/RžR0R-RkRÐRSR²RiRìR@R’R1RBR•R®R­(RR2R6RÏRãRA((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¨*sB%      cCs3|jtdƒko'|jtdƒk o2|j S(u¹Test if this address is allocated for public networks. Returns: A boolean, True if the address is not reserved per iana-ipv4-special-registry. u 100.64.0.0/10(RkR4RcRÊ(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRËs ( R'R(R+R-R©RÚR¨RšRË(((s-/usr/lib/python2.7/site-packages/ipaddress.pyR4s  Ut_IPv4ConstantscBsÈeZedƒZedƒZedƒZedƒedƒedƒedƒedƒedƒedƒedƒed ƒed ƒed ƒed ƒed ƒedƒgZed ƒZedƒZ RS(u169.254.0.0/16u 127.0.0.0/8u 224.0.0.0/4u 0.0.0.0/8u 10.0.0.0/8u 172.16.0.0/12u 192.0.0.0/29u192.0.0.170/31u 192.0.2.0/24u192.168.0.0/16u 198.18.0.0/15u198.51.100.0/24u203.0.113.0/24u 240.0.0.0/4u255.255.255.255/32u0.0.0.0( R'R(R4RëRêRèRçRåR-Ré(((s-/usr/lib/python2.7/site-packages/ipaddress.pyRï�s&                 t_BaseV6cBsÄeZdZdZdZdedZdZedƒZ eZ iZ e d„ƒZ e d„ƒZe d„ƒZe d „ƒZe dd „ƒZd „Zd „Zed „ƒZed„ƒZRS(uyBase IPv6 object. The following methods are used by IPv6 objects in both single IP addresses and networks. iiiiu0123456789ABCDEFabcdefcCsl||jkrat|tƒr'|}n|j|ƒ}t|j|ƒƒ}||f|j|} || sC|dk rxd |}t|ƒ‚n| }qCqCW|dk r]|} t|ƒ|d } |dsá| d 8} | rád}t||ƒ‚qán|ds| d 8} | rd}t||ƒ‚qn|j| | } | d kròd}t||jd |fƒ‚qòn•t|ƒ|jkr”d}t||j|fƒ‚n|ds·d}t||ƒ‚n|dsÚd}t||ƒ‚nt|ƒ} d} d} y�d} x5t | ƒD]'} | d K} | |j || ƒO} qW| d | K} x9t | dƒD]'} | d K} | |j || ƒO} qRW| SWn)t k r­}td||fƒ‚nXdS(uùTurn an IPv6 ip_str into an integer. Args: ip_str: A string, the IPv6 ip_str. Returns: An int, the IPv6 address Raises: AddressValueError: if ip_str isn't a valid IPv6 Address. uAddress cannot be emptyu:iu At least %d parts expected in %ru.iÿÿÿÿu%s in %ru%xiiÿÿiu!At most %d colons permitted in %ru At most one '::' permitted in %riu0Leading ':' only permitted as part of '::' in %ru1Trailing ':' only permitted as part of '::' in %ru/Expected at most %d other parts with '::' in %ru,Exactly %d parts expected without '::' in %rN( R*R?R@R-R\RER`t _HEXTET_COUNTR_Rtranget _parse_hextetR1(RƒR–RÛt _min_partsR~tipv4_intRÔt _max_partst skip_indexRtparts_hitparts_lot parts_skippedR†((s-/usr/lib/python2.7/site-packages/ipaddress.pyR•Ôs†            #     cCs]|jj|ƒs%td|ƒ‚nt|ƒdkrPd}t||ƒ‚nt|dƒS(u&Convert an IPv6 hextet string into an integer. Args: hextet_str: A string, the number to parse. Returns: The hextet as an integer. Raises: ValueError: if the input isn't strictly a hex number from [0..FFFF]. uOnly hex digits permitted in %riu$At most 4 characters permitted in %ri(t _HEX_DIGITSR‘R1R@R’(Rƒt hextet_strR~((s-/usr/lib/python2.7/site-packages/ipaddress.pyRó=s c Csõd}d}d}d}xot|ƒD]a\}}|dkrz|d7}|dkr\|}n||kr†|}|}q†q%d}d}q%W|dkrñ||}|t|ƒkrÂ|dg7}ndg|||+|dkrñdg|}qñn|S(uäCompresses a list of hextets. Compresses a list of strings, replacing the longest continuous sequence of "0" in the list with "" and adding empty strings at the beginning or at the end of the string such that subsequently calling ":".join(hextets) will produce the compressed version of the IPv6 address. Args: hextets: A list of strings, the hextets to compress. Returns: A list of strings. iÿÿÿÿiu0iu(t enumerateR@( Rƒthextetstbest_doublecolon_starttbest_doublecolon_lentdoublecolon_starttdoublecolon_lentindexthextettbest_doublecolon_end((s-/usr/lib/python2.7/site-packages/ipaddress.pyt_compress_hextetsWs.         cCsŸ|d krt|jƒ}n||jkr<tdƒ‚nd|}gtdddƒD]$}dt|||d!dƒ^qY}|j|ƒ}dj|ƒS( u,Turns a 128-bit integer into hexadecimal notation. Args: ip_int: An integer, the IP address. Returns: A string, the hexadecimal representation of the address. Raises: ValueError: The address is bigger than 128 bits of all ones. uIPv6 address is too largeu%032xii iu%xiu:N(R_R’RERTR1RòRRØ(RƒR†thex_strR¬Rþ((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¢‡s  =cCsÓt|tƒr!t|jƒ}n-t|tƒrBt|jƒ}n t|ƒ}|j|ƒ}d|}gtdddƒD]}|||d!^qz}t|ttfƒrÆddj |ƒ|j fSdj |ƒS(u¬Expand a shortened IPv6 address. Args: ip_str: A string, the IPv6 address. Returns: A string, the expanded IPv6 address. u%032xii iu%s/%du:( R/R5R>RkR9RJR•RòRrRØRi(RR–R†RR¬RÛ((s-/usr/lib/python2.7/site-packages/ipaddress.pyRx¡s   0cCs3|jddd…jddƒ}dj|ƒdS(u�Return the reverse DNS pointer name for the IPv6 address. This implements the method described in RFC3596 2.5. Niÿÿÿÿu:uu.u .ip6.arpa(RytreplaceRØ(Rt reverse_chars((s-/usr/lib/python2.7/site-packages/ipaddress.pyR{¹s"cCs|jS(N(RS(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÞÂscCs|jS(N(Rh(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRRÆs(N(R'R(R+R)Rht IPV6LENGTHRTRñRàRûRSRÎR›RÐR•RóRR_R¢RxR{RšRÞRR(((s-/usr/lib/python2.7/site-packages/ipaddress.pyRð®s$ i0  R.cBsÑeZdZdZd„Zed„ƒZed„ƒZed„ƒZed„ƒZ ed„ƒZ ed „ƒZ ed „ƒZ ed „ƒZ ed „ƒZed „ƒZed„ƒZed„ƒZRS(u/Represent and manipulate single IPv6 Addresses.u_ipu __weakref__cCs«t|tƒr)|j|ƒ||_dSt|tƒrj|j|dƒt|ƒ}t|dƒ|_dSt|ƒ}d|kr•t d|ƒ‚n|j |ƒ|_dS(uInstantiate a new IPv6 address object. Args: address: A string or integer representing the IP Additionally, an integer can be passed, so IPv6Address('2001:db8::') == IPv6Address(42540766411282592856903984951653826560) or, more generally IPv6Address(int(IPv6Address('2001:db8::'))) == IPv6Address('2001:db8::') Raises: AddressValueError: If address isn't a valid IPv6 address. Niubigu/uUnexpected '/' in %r( R/RžRRER0R‚RR R>R*R•(RR2RáRâ((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¨Ñs     cCs t|jƒS(u*The binary representation of this address.(R=RE(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRãöscCs||jjkS(u»Test if the address is reserved for multicast use. Returns: A boolean, True if the address is a multicast address. See RFC 2373 2.7 for details. (RäRè(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÅûs cs t‡fd†ˆjjDƒƒS(uµTest if the address is otherwise IETF reserved. Returns: A boolean, True if the address is within one of the reserved IPv6 Network ranges. c3s|]}ˆ|kVqdS(N((R×R¬(R(s-/usr/lib/python2.7/site-packages/ipaddress.pys s(RæRät_reserved_networks(R((Rs-/usr/lib/python2.7/site-packages/ipaddress.pyRÈs cCs||jjkS(u�Test if the address is reserved for link-local. Returns: A boolean, True if the address is reserved per RFC 4291. (RäRë(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÉscCs||jjkS(u`Test if the address is reserved for site-local. Note that the site-local address space has been deprecated by RFC 3879. Use is_private to test if this address is in the space of unique local addresses as defined by RFC 4193. Returns: A boolean, True if the address is reserved per RFC 3513 2.5.6. (Rät_sitelocal_network(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyt is_site_locals cs t‡fd†ˆjjDƒƒS(u¶Test if this address is allocated for private networks. Returns: A boolean, True if the address is reserved per iana-ipv6-special-registry. c3s|]}ˆ|kVqdS(N((R×RY(R(s-/usr/lib/python2.7/site-packages/ipaddress.pys 2s(RæRäRç(R((Rs-/usr/lib/python2.7/site-packages/ipaddress.pyRÊ)s cCs|j S(u¹Test if this address is allocated for public networks. Returns: A boolean, true if the address is not reserved per iana-ipv6-special-registry. (RÊ(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRË4s cCs |jdkS(u¨Test if the address is unspecified. Returns: A boolean, True if this is the unspecified address as defined in RFC 2373 2.5.2. i(RE(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÌ?s cCs |jdkS(u±Test if the address is a loopback address. Returns: A boolean, True if the address is a loopback address as defined in RFC 2373 2.5.3. i(RE(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÍJs cCs(|jd?dkrdSt|jd@ƒS(u¶Return the IPv4 mapped address. Returns: If the IPv6 address is a v4 mapped address, return the IPv4 mapped address. Return None otherwise. i iÿÿIÿÿÿÿN(RER_R-(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyt ipv4_mappedUs cCs@|jd?dkrdSt|jd?d@ƒt|jd@ƒfS(uÛTuple of embedded teredo IPs. Returns: Tuple of the (server, client) IPs or None if the address doesn't appear to be a teredo address (doesn't start with 2001::/32) i`i i@IÿÿÿÿN(RER_R-(R((s-/usr/lib/python2.7/site-packages/ipaddress.pytteredobs cCs,|jd?dkrdSt|jd?d@ƒS(uÎReturn the IPv4 6to4 embedded address. Returns: The IPv4 6to4-embedded address if present or None if the address doesn't appear to contain a 6to4 embedded address. ipi iPIÿÿÿÿN(RER_R-(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyt sixtofourqs (u_ipu __weakref__(R'R(R+R)R¨RšRãRÅRÈRÉR RÊRËRÌRÍRRR(((s-/usr/lib/python2.7/site-packages/ipaddress.pyR.Ës %        R9cBs˜eZd„Zd„Zd„Zd„Zd„ZejZe d„ƒZ e d„ƒZ e d„ƒZ e d„ƒZ e d „ƒZe d „ƒZRS( cCs;t|ttfƒrGtj||ƒt|jƒ|_|j|_ dSt|t ƒrÕtj||dƒt |ƒdkr’t |dƒ|_ n |j|_ t|dt ƒ|_|jj|_|jj|_dSt|ƒ}tj||dƒt|dt ƒ|_|jj|_|jj |_ |jj|_dS(NiiR6(R/R0RžR.R¨R5RERªRSRiRìR@R’R�R²RµRB(RR2RA((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¨�s(   cCs d|j|jƒ|jjfS(Nu%s/%d(R¢RERªR„(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR£™scCsVtj||ƒ}| s%|tkr)|Sy|j|jkSWntk rQtSXdS(N(R.RRRªRjR�(RRRí((s-/usr/lib/python2.7/site-packages/ipaddress.pyR�s cCsOtj||ƒ}|tkr"tSy|j|jkSWntk rJtSXdS(N(R.R"RRªRjR�(RRRî((s-/usr/lib/python2.7/site-packages/ipaddress.pyR"©s  cCs|j|jAt|jjƒAS(N(RERiR’RªRk(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¦´scCs t|jƒS(N(R.RE(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRJ¹scCsd|j|jƒ|jfS(Nu%s/%s(R¢RERi(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¶½scCsd|j|jƒ|jfS(Nu%s/%s(R¢RER²(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR·ÂscCsd|j|jƒ|jfS(Nu%s/%s(R¢RERµ(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¸ÇscCs|jdko|jjS(Ni(RERªRÌ(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÌÌscCs|jdko|jjS(Ni(RERªRÍ(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyRÍÐs(R'R(R¨R£RR"R¦RwR™RšRJR¶R·R¸RÌRÍ(((s-/usr/lib/python2.7/site-packages/ipaddress.pyR9s    R5cBs8eZdZeZed„Zd„Zed„ƒZ RS(uvThis class represents and manipulates 128-bit IPv6 networks. Attributes: [examples for IPv6('2001:db8::1000/124')] .network_address: IPv6Address('2001:db8::1000') .hostmask: IPv6Address('::f') .broadcast_address: IPv6Address('2001:db8::100f') .netmask: IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff:ffff:fff0') .prefixlen: 124 cCstj||ƒt|ttfƒrVt|ƒ|_|j|jƒ\|_ |_ dSt|t ƒrt |ƒdkr„|d}n |j}|j|ƒ\|_ |_ t|dƒ|_t |jƒ}|t |j ƒ@|kr|rütd|ƒ‚qt|t |j ƒ@ƒ|_ndSt|ƒ}t|j|dƒƒ|_t |ƒdkrf|d}n |j}|j|ƒ\|_ |_ |rÑtt |jƒt |j ƒ@ƒ|jkrÑtd|ƒ‚qÑntt |jƒt |j ƒ@ƒ|_|j |jdkr|j|_ndS(uçInstantiate a new IPv6 Network object. Args: address: A string or integer representing the IPv6 network or the IP and prefix/netmask. '2001:db8::/128' '2001:db8:0000:0000:0000:0000:0000:0000/128' '2001:db8::' are all functionally the same in IPv6. That is to say, failing to provide a subnetmask will create an object with a mask of /128. Additionally, an integer can be passed, so IPv6Network('2001:db8::') == IPv6Network(42540766411282592856903984951653826560) or, more generally IPv6Network(int(IPv6Network('2001:db8::'))) == IPv6Network('2001:db8::') strict: A boolean. If true, ensure that we have been passed A true network address, eg, 2001:db8::1000/124 and not an IP address on a network, eg, 2001:db8::1/124. Raises: AddressValueError: If address isn't a valid IPv6 address. NetmaskValueError: If the netmask isn't valid for an IPv6 address. ValueError: If strict was True and a network address was not supplied. Niiu%s has host bits seti(RrR¨R/R0RžR.RkRÐRSR²RiRìR@R’R1RBR•R®R­(RR2R6RÏRãRA((s-/usr/lib/python2.7/site-packages/ipaddress.pyR¨åsB       ccsRt|jƒ}t|jƒ}x-t|d|dƒD]}|j|ƒVq6WdS(u¢Generate Iterator over usable hosts in a network. This is like __iter__ except it doesn't return the Subnet-Router anycast address. iN(R’RkRcRR©(RRªR«R¬((s-/usr/lib/python2.7/site-packages/ipaddress.pyR­4 scCs|jjo|jjS(u`Test if the address is reserved for site-local. Note that the site-local address space has been deprecated by RFC 3879. Use is_private to test if this address is in the space of unique local addresses as defined by RFC 4193. Returns: A boolean, True if the address is reserved per RFC 3513 2.5.6. (RkR Rc(R((s-/usr/lib/python2.7/site-packages/ipaddress.pyR @ s ( R'R(R+R.R©RÚR¨R­RšR (((s-/usr/lib/python2.7/site-packages/ipaddress.pyR5Õs   O t_IPv6ConstantscBseZedƒZedƒZedƒedƒedƒedƒedƒedƒedƒed ƒed ƒedƒg Zed ƒed ƒed ƒedƒedƒedƒedƒedƒedƒedƒedƒedƒedƒedƒedƒgZedƒZRS(u fe80::/10uff00::/8u::1/128u::/128u ::ffff:0:0/96u100::/64u 2001::/23u 2001:2::/48u 2001:db8::/32u 2001:10::/28ufc00::/7u::/8u100::/8u200::/7u400::/6u800::/5u1000::/4u4000::/3u6000::/3u8000::/3uA000::/3uC000::/3uE000::/4uF000::/5uF800::/6uFE00::/9u fec0::/10(R'R(R5RëRèRçR R (((s-/usr/lib/python2.7/site-packages/ipaddress.pyRP s*           (7R+t __future__RRRt __version__R’Ržtlongt NameErrortunicodeR>tstrRt from_bytesR RjRRÆRRtobjectRRßR R1R*R,R3RÚR7R:R<R=RBRKRORZRgRqRvRwRPRrR�R-R8R4RïRäRðR.R9R5R(((s-/usr/lib/python2.7/site-packages/ipaddress.pyt sx              ) $ $ #      7 1 6 ž=ÿß©pRr ÿ´V{!