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@sdZddlZddlZddlZejd&krhddlmZ m Z ddl m ZmZn_y3ejdddlmZ m Z m ZmZWn)ddl mZ m Z m ZmZnXdd lmZmZmZdd lmZmZmZmZmZmZ m!Z"dd l#m$Z$d Z%d Z&dZ'dZ(eZ)dZ*dZ+dZ,de%dZ-e%e&Z.de&dZ/e0ge1de%dD]"Z2e2e-de%e2dAf^qZ3e0ge1de%dD]"Z2e-de%e2dAe2f^qZ4e0ge1de%dD]Z2e2de%e2df^qZ5e0ge1de%dD]Z2de%e2de2f^qVZ6ddZ7ddZ8ddZ:dZ;dZ<dZ=dZdZ>dZ?dZd Zdd!Zd"Zd#Zd$Z!d%Z@dS('sIPv4 address logic.iNtwin32tcygwin(t inet_atont inet_ntoa(t inet_ptontAF_INETs255.255.255.255(RRRR(tAddrFormatErrortZEROFILLt INET_PTON(t valid_wordst valid_bitst bits_to_intt int_to_bitst valid_bint int_to_bint bin_to_int(t _str_typei is%dt.tIPv4ii iiicCs|dkrtdnt}|t@rcdjg|jdD]}dt|^qA}ny(|t@rtt|n t |Wn t }nX|S(sN @param addr: An IPv4 address in presentation (string) format. @param flags: decides which rules are applied to the interpretation of the addr value. Supported constants are INET_PTON and ZEROFILL. See the netaddr.core docs for details. @return: C{True} if IPv4 address is valid, C{False} otherwise. ts Empty strings are not supported!Rs%d( RtTrueRtjointsplittintRt _inet_ptonRt _inet_atontFalse(taddrtflagstvalidityti((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyt valid_str^s  8  cCs|t@rBdjg|jdD]}dt|^q }nyE|t@rltjdtt|dStjdt |dSWnt d|nXdS(sP @param addr: An IPv4 dotted decimal address in string form. @param flags: decides which rules are applied to the interpretation of the addr value. Supported constants are INET_PTON and ZEROFILL. See the netaddr.core docs for details. @return: The equivalent unsigned integer for a given IPv4 address. Rs%ds>Iis&%r is not a valid IPv4 address string!N( RRRRRt_structtunpackRRRR(RRR((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyt str_to_int{s 8 cCs\d|kotknrHd|d?|d?d@|d?d@|d@fStd|dS( s @param int_val: An unsigned integer. @param dialect: (unused) Any value passed in is ignored. @return: The IPv4 presentation (string) format address equivalent to the unsigned integer provided. is %d.%d.%d.%diiiis*%r is not a valid 32-bit unsigned integer!N(tmax_intt ValueError(tint_valtdialect((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyt int_to_strs    cCsPgt|D]}d|^q }|j|jdddgdj|S(s @param int_val: An unsigned integer. @return: The reverse DNS lookup for an IPv4 address in network byte order integer form. s%dsin-addrtarpaRR(t int_to_wordstreversetextendR(R%Rtwords((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyt int_to_arpas# cCstjd|S(s @param int_val: the integer to be packed. @return: a packed string that is equivalent to value represented by an unsigned integer. s>I(R tpack(R%((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyt int_to_packedscCstjd|dS(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>Ii(R R!(t packed_int((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyt packed_to_intscCst|ttS(N(t _valid_wordst word_sizet num_words(R,((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyR scCsWd|kotkns/td|n|d?|d?d@|d?d@|d@fS(s @param int_val: An unsigned integer. @return: An integer word (octet) sequence that is equivalent to value represented by an unsigned integer. is?%r is not a valid integer value supported by this address type!iiii(R#R$(R%((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyR)s   cCs?t|std|ntjdtjd|dS(s @param words: A list or tuple containing integer octets. @return: An unsigned integer that is equivalent to value represented by word (octet) sequence. s1%r is not a valid octet list for an IPv4 address!s>It4Bi(R R$R R!R.(R,((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyt words_to_ints  cCst|ttS(N(t _valid_bitstwidthtword_sep(tbits((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyR scCst|ttS(N(t _bits_to_intR8R9(R:((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyR scCs/|dkrtd}nt|tt|S(NR9(tNonetglobalst _int_to_bitsR3R4(R%R9((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyR s cCs t|tS(N(t _valid_binR8(tbin_val((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyR scCs t|tS(N(t _int_to_binR8(R%((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyRscCs t|tS(N(t _bin_to_intR8(R@((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pyRscCsg}td|}t|trd|kr:|nd|krug|jdD]}dt|^qV}n1ydt|g}Wntk r|nXdt|kodknrx4tdt|D]}|jdqWq|n|s|ndt |S( s Expands a partial IPv4 address into a full 4-octet version. @param addr: an partial or abbreviated IPv4 address @return: an expanded IP address in presentation format (x.x.x.x) s!invalid partial IPv4 address: %r!t:Rs%diit0s %s.%s.%s.%s( Rt isinstanceRRRR$tlentrangetappendttuple(RttokensterrortoR((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pytexpand_partial_addresss$    /  "  (swin32scygwin(At__doc__tsyst_syststructR tsockett_sockettplatformRRRt _inet_ntoatnetaddr.fbsocketRRRt netaddr.coreRRRtnetaddr.strategyR R2R R7R R;R R>R R?RRARRBtnetaddr.compatRR8R3tword_fmtR9tfamilyt family_nametversiont word_baseR#R4tmax_wordtdictRGRtprefix_to_netmasktnetmask_to_prefixtprefix_to_hostmaskthostmask_to_prefixRR"R<R'R-R/R1R)R6RM(((s9/usr/lib/python2.7/site-packages/netaddr/strategy/ipv4.pytsb    &&4 ??;;