Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
®‹EYc@sdZddlZeZyXddlZejs?edƒ‚nej	ej
ddlm	ZmZ
m
Z
eZWn-ek
rŸddlm	ZmZ
m
Z
nXddlmZddlmZmZmZmZmZmZmZ m!Z"m#Z$dZ%dZ&d	Z'e
Z(d
Z)dZ*dZ+de%d
Z,e%e&Z-de&d
Z.e/ge0de%d
ƒD]"Z1e1e,de%e1d
Af^qWƒZ2e/ge0de%d
ƒD]"Z1e,de%e1d
Ae1f^q™ƒZ3e/ge0de%d
ƒD]Z1e1de%e1d
f^qÛƒZ4e/ge0de%d
ƒD]Z1de%e1d
e1f^qƒZ5de6fd„ƒYZ7de7fd„ƒYZ8de7fd„ƒYZ9dd„Z:dd„Z;dd„Z=d„Z>d„Z?d„Z@d„Zddd„Zd„Zd„Zd„Zdd „Zd!„Zd"„Z!d#„Z#dS($s
IPv6 address logic.
iÿÿÿÿNs
IPv6 disabled(t	inet_ptont	inet_ntoptAF_INET6(tAddrFormatError(	tvalid_wordstint_to_wordstwords_to_intt
valid_bitstbits_to_inttint_to_bitst	valid_bint
int_to_bint
bin_to_inti€it:tIPv6iiiitipv6_compactcBseZdZdZeZRS(s%An IPv6 dialect class - compact form.s%x(t__name__t
__module__t__doc__tword_fmttTruetcompact(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRVst	ipv6_fullcBseZdZeZRS(s*An IPv6 dialect class - 'all zeroes' form.(RRRtFalseR(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyR^stipv6_verbosecBseZdZdZeZRS(s5An IPv6 dialect class - extra wide 'all zeroes' form.s%.4x(RRRRRR(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRdscCs;|dkrtdƒ‚nytt|ƒ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: ``True`` if IPv6 address is valid, ``False`` otherwise.
    ts Empty strings are not supported!(Rt
_inet_ptonRRR(taddrtflags((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyt	valid_strns	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((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyt
str_to_ints
	
cCsµ|dkrt}nd}yrt|ƒ}|jrEtt|ƒ}nGttjd|ƒƒ}g|D]}|j	|^qd}t
j|ƒ}Wn!tk
r°t
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_septjoinRt
ValueError(tint_valtdialectRR twordstwordttokens((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyt
int_to_str‘s			 
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.
    R
Rtip6tarpat.(R0RR%treplacetreverseR)(R+RR/((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pytint_to_arpa¯s

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-((sJ/home/tvault/.virtenv/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.((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRÉscCst|ttƒS(N(t_valid_wordst	word_sizet	num_words(R-((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRÜscCsH|dkrtƒd}n|dkr8tƒd}nt|||ƒS(NR>R=(R"tglobalst
_int_to_words(R+R>R=((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRàs
cCst|ttƒS(N(t
_words_to_intR=R>(R-((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRèscCst|ttƒS(N(t_valid_bitstwidthR((tbits((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRìscCst|ttƒS(N(t_bits_to_intRCR((RD((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRðscCs/|dkrtƒd}nt|tt|ƒS(NR((R"R?t_int_to_bitsR=R>(R+R(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyR	ôscCs
t|tƒS(N(t
_valid_binRC(tbin_val((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyR
úscCs
t|tƒS(N(t_int_to_binRC(R+((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRþscCs
t|tƒS(N(t_bin_to_intRC(RH((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyRs(ARtstructR&RtOPT_IMPORTStsockett_socketthas_ipv6RRRRRR$Rtnetaddr.fbsockettnetaddr.coreRtnetaddr.strategyRR<RR@RRARRBRRER	RFR
RGRRIRRJRCR=R(tfamilytfamily_nametversiont	word_basetmax_intR>tmax_wordtdicttrangeR:tprefix_to_netmasktnetmask_to_prefixtprefix_to_hostmaskthostmask_to_prefixtobjectRRRRR!R"R0R6R#R(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyt<module>sd	

 @
??;;