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@sdZddlZeZyXddlZejs?ednej ej ddlm Z m Z m Z eZWn#ddlm Z m Z m Z nXddlmZddlmZmZmZmZmZmZmZ m!Z"m#Z$m%Z&dZ'dZ(d Z)e Z*d Z+d Z,dZ-d e'd Z.e'e(Z/d e(d Z0e1ge2de'd D]"Z3e3e.d e'e3d Af^qSZ4e1ge2de'd D]"Z3e.d e'e3d Ae3f^qZ5e1ge2de'd D]Z3e3d e'e3d f^qZ6e1ge2de'd D]Z3d e'e3d e3f^qZ7de8fdYZ9de9fdYZ:de9fdYZ;ddZ<ddZ=ddZ?dZ@dZAdZBdZdddZdZdZdZdd Zd!Z!d"Z#d#Z%dS($s IPv6 address logic. iNs IPv6 disabled(t inet_ptont inet_ntoptAF_INET6(tAddrFormatError( t BYTES_TO_BITSt valid_wordst int_to_wordst words_to_intt valid_bitst bits_to_intt int_to_bitst valid_bint int_to_bint bin_to_intiit:tIPv6iiiit ipv6_compactcBseZdZdZeZRS(s%An IPv6 dialect class - compact form.s%x(t__name__t __module__t__doc__tword_fmttTruetcompact(((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyR\st ipv6_fullcBseZdZeZRS(s*An IPv6 dialect class - 'all zeroes' form.(RRRtFalseR(((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRdst ipv6_verbosecBseZdZdZeZRS(s5An IPv6 dialect class - extra wide 'all zeroes' form.s%.4x(RRRRRR(((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRjscCs;|dkrtdnytt|WntSXtS(s @param addr: An IPv6 address in presentation (string) format. @param flags: decides which rules are applied to the interpretation of the addr value. Future use - currently has no effect. @return: C{True} if IPv6 address is valid, C{False} otherwise. ts Empty strings are not supported!(Rt _inet_ptonRRR(taddrtflags((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyt valid_strts cCsEytt|}t|SWn!tk r@td|nXdS(s @param addr: An IPv6 address in string form. @param flags: decides which rules are applied to the interpretation of the addr value. Future use - currently has no effect. @return: The equivalent unsigned integer for a given IPv6 address. s&%r is not a valid IPv6 address string!N(RRt packed_to_intt ExceptionR(RRt packed_int((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyt str_to_ints  cCs|dkrt}nd}yrt|}|jrEtt|}nGttjd|}g|D]}|j |^qd}t j |}Wn!t k rt d|nX|S(s @param int_val: An unsigned integer. @param dialect: (optional) a Python class defining formatting options. @return: The IPv6 presentation (string) format address equivalent to the unsigned integer provided. s>8Hs+%r is not a valid 128-bit unsigned integer!N(tNoneRt int_to_packedRt _inet_ntopRtlistt_structtunpackRtword_septjoinR t ValueError(tint_valtdialectRR!twordstwordttokens((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyt int_to_strs      cCsQt|t}t|jdd}|j|dddg}dj|S(s @param int_val: An unsigned integer. @return: The reverse DNS lookup for an IPv6 address in network byte order integer form. RRtip6tarpat.(R1RR&treplacetreverseR*(R,RR0((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyt int_to_arpas  cCs"t|dd}tjd|S(s @param int_val: the integer to be packed. @return: a packed string that is equivalent to value represented by an unsigned integer. ii s>4I(RR'tpack(R,R.((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyR$scCscttjd|}d}x>tt|D]*\}}|}|d|>}||B}q1W|S(s @param packed_int: a packed string containing an unsigned integer. It is assumed that string is packed in network byte order. @return: An unsigned integer equivalent to value of network address represented by packed binary string. s>4Iii (R&R'R(t enumeratetreversed(R!R.R,titnumR/((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRscCst|ttS(N(t _valid_wordst word_sizet num_words(R.((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRscCsH|dkrtd}n|dkr8td}nt|||S(NR?R>(R#tglobalst _int_to_words(R,R?R>((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRs   cCst|ttS(N(t _words_to_intR>R?(R.((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRscCst|ttS(N(t _valid_bitstwidthR)(tbits((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRscCst|ttS(N(t _bits_to_intRDR)(RE((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyR scCs/|dkrtd}nt|tt|S(NR)(R#R@t _int_to_bitsR>R?(R,R)((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyR s cCs t|tS(N(t _valid_binRD(tbin_val((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyR scCs t|tS(N(t _int_to_binRD(R,((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyR scCs t|tS(N(t _bin_to_intRD(RI((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyR s(CRtstructR'Rt OPT_IMPORTStsockett_socketthas_ipv6R RRRRR%Rtnetaddr.fbsockett netaddr.coreRtnetaddr.strategyRt_BYTES_TO_BITSRR=RRARRBRRCR RFR RGR RHR RJR RKRDR>R)tfamilyt family_nametversiont word_basetmax_intR?tmax_wordtdicttrangeR;tprefix_to_netmasktnetmask_to_prefixtprefix_to_hostmaskthostmask_to_prefixtobjectRRRRR"R#R1R7R$R(((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pytsd     F  ??;;