%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/plesk/python/2.7/lib/python2.7/site-packages/dns/
Upload File :
Create Path :
Current File : //opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyc

�
�ac@@s�dZddlmZddlZddlZddlZdZdZdZ	dZ
dZd	Zd
Z
dZdZd
Zdefd��YZdefd��YZdefd��YZiee6Zd�Zd�ZdS(sEDNS Optionsi(tabsolute_importNiiiiii	i
iii
tOptioncB@sneZdZd�Zd�Zed��Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
RS(s%Base class for all EDNS option types.cC@s
||_dS(sPInitialize an option.

        *otype*, an ``int``, is the option type.
        N(totype(tselfR((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyt__init__4scC@s
t�dS(s*Convert an option to wire format.
        N(tNotImplementedError(Rtfile((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pytto_wire;scC@s
t�dS(stBuild an EDNS option object from wire format.

        *otype*, an ``int``, is the option type.

        *wire*, a ``binary``, is the wire-format message.

        *current*, an ``int``, is the offset in *wire* of the beginning
        of the rdata.

        *olen*, an ``int``, is the length of the wire-format option data

        Returns a ``dns.edns.Option``.
        N(R(tclsRtwiretcurrenttolen((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyt	from_wire@scC@s
t�dS(s�Compare an EDNS option with another option of the same type.

        Returns < 0 if < *other*, 0 if == *other*, and > 0 if > *other*.
        N(R(Rtother((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyt_cmpRscC@s<t|t�stS|j|jkr)tS|j|�dkS(Ni(t
isinstanceRtFalseRR(RR
((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyt__eq__Ys
cC@s<t|t�stS|j|jkr)tS|j|�dkS(Ni(RRRRR(RR
((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyt__ne__`s
cC@s9t|t�s"|j|jkr&tS|j|�dkS(Ni(RRRtNotImplementedR(RR
((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyt__lt__gscC@s9t|t�s"|j|jkr&tS|j|�dkS(Ni(RRRRR(RR
((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyt__le__mscC@s9t|t�s"|j|jkr&tS|j|�dkS(Ni(RRRRR(RR
((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyt__ge__sscC@s9t|t�s"|j|jkr&tS|j|�dkS(Ni(RRRRR(RR
((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyt__gt__ys(t__name__t
__module__t__doc__RRtclassmethodRRRRRRRR(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR0s								t
GenericOptioncB@sAeZdZd�Zd�Zd�Zed��Zd�ZRS(swGeneric Option Class

    This class is used for EDNS option types for which we have no better
    implementation.
    cC@s#tt|�j|�||_dS(N(tsuperRRtdata(RRR((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR�scC@s|j|j�dS(N(twriteR(RR((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR�scC@sd|jS(Ns
Generic %d(R(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pytto_text�scC@s||||||!�S(N((RRR	R
R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR�scC@s0|j|jkrdS|j|jkr,dSdS(Niii����(R(RR
((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR�s
(	RRRRRR RRR(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR�s			t	ECSOptioncB@sGeZdZddd�Zd�Zd�Zed��Zd�Z	RS(s!EDNS Client Subnet (ECS, RFC7871)ic	C@sHtt|�jt�tjj|�}|tjjkr[d|_|dkr�d}q�n?|tjj
kr�d|_|dkr�d}q�ntd��||_||_
||_tjj||�}ttj|d��}|| |_|d}|dkrDtjd	t|jd
�d|>@�}|jd
 ||_ndS(
s�*address*, a ``text``, is the client address information.

        *srclen*, an ``int``, the source prefix length, which is the
        leftmost number of bits of the address to be used for the
        lookup.  The default is 24 for IPv4 and 56 for IPv6.

        *scopelen*, an ``int``, the scope prefix length.  This value
        must be 0 in queries, and should be set in responses.
        ii8iis
Bad ip familyg @iitBi����i�N(RR!RtECStdnstinettaf_for_addresstAF_INET6tfamilytNonetAF_INETt
ValueErrortaddresstsrclentscopelent	inet_ptontinttmathtceiltaddrdatatstructtpacktord(	RR,R-R.tafR3tnbytestnbitstlast((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR�s*					

'cC@sdj|j|j|j�S(NsECS {}/{} scope/{}(tformatR,R-R.(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR �scC@sR|jtjd|j��|jtjd|j|j��|j|j�dS(Ns!Hs!BB(RR4R5R(R-R.R3(RR((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR�s"cC@s�tjd|||d!�\}}}|d7}ttj|d��}|dkrntjj}	d|}
n1|dkr�tjj}	d|}
nt	d��tjj
|	||||!d|
�}||||�S(	Ns!HBBig @iiisunsupported familys(R4tunpackR0R1R2R$R%R*R'R+t	inet_ntop(RRR	tcurRR(tsrctscopetaddrlenR7tpadtaddr((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR�s&


(cC@s0|j|jkrdS|j|jkr,dSdS(Niii����(R3(RR
((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR�s
N(
RRRR)RR RRRR(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyR!�s(		cC@s(tj|�}|dkr$t}n|S(s�Return the class for the specified option type.

    The GenericOption class is used if a more specific class is not
    known.
    N(t_type_to_classtgetR)R(RR((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pytget_option_class�s	cC@s"t|�}|j||||�S(ssBuild an EDNS option object from wire format.

    *otype*, an ``int``, is the option type.

    *wire*, a ``binary``, is the wire-format message.

    *current*, an ``int``, is the offset in *wire* of the beginning
    of the rdata.

    *olen*, an ``int``, is the length of the wire-format option data

    Returns an instance of a subclass of ``dns.edns.Option``.
    (RFR(RR	R
RR((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pytoption_from_wire�s(Rt
__future__RR1R4tdns.inetR$tNSIDtDAUtDHUtN3UR#tEXPIREtCOOKIEt	KEEPALIVEtPADDINGtCHAINtobjectRRR!RDRFRG(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/edns.pyt<module>s*PN
	

Zerion Mini Shell 1.0