+
    Dfj                         R R.t ^ RIHt ^ RIHtHt ^ RIHtHtH	t	H
t
 ^ RIHt ^ RIHtHt ^ RIHt  ! R R]P$                  4      t ! R	 R ]4      tR
# )SecondaryAuthoritySecondaryAuthorityService)service)defertask)clientcommondnsresolve)FileAuthority)failurelog)nativeStringc                   T   a  ] tR t^t o RtRt^5tR t]R 4       t	R t
R tR tRtV tR# )	r   a  
A service that keeps one or more authorities up to date by doing hourly
zone transfers from a master.

@ivar primary: IP address of the master.
@type primary: L{str}

@ivar domains: An authority for each domain mirrored from the master.
@type domains: L{list} of L{SecondaryAuthority}
Nc                p    \        V4      V n        V Uu. uF  p\        W4      NK  	  upV n        R# u upi )z
@param primary: The IP address of the server from which to perform
zone transfers.
@type primary: L{str}

@param domains: A sequence of domain names for which to perform
zone transfers.
@type domains: L{list} of L{bytes}
N)r   primaryr   domains)selfr   r   ds   &&& 9/usr/lib/python3/dist-packages/twisted/names/secondary.py__init__"SecondaryAuthorityService.__init__    s/     $G,@GH1*76HHs   3c                    Vw  r4V ! V. 4      pWEn         V Uu. uF  p\        P                  W4      NK  	  upVn        V# u upi )a0  
Construct a new L{SecondaryAuthorityService} from a tuple giving a
server address and a C{str} giving the name of a domain for which this
is an authority.

@param serverAddress: A two-tuple, the first element of which is a
    C{str} giving an IP address and the second element of which is a
    C{int} giving a port number.  Together, these define where zone
    transfers will be attempted from.

@param domains: Domain names for which to perform zone transfers.
@type domains: sequence of L{bytes}

@return: A new instance of L{SecondaryAuthorityService}.
)_portr   fromServerAddressAndDomainr   )clsserverAddressr   r   portr   r   s   &&&    r   fromServerAddressAndDomains5SecondaryAuthorityService.fromServerAddressAndDomains-   sT    " &gr" 
 99-K
 	
s   A c                B    \         P                  ! V P                  4      # )zG
Get a resolver for the transferred domains.

@rtype: L{ResolverChain}
)r
   ResolverChainr   r   s   &r   getAuthority&SecondaryAuthorityService.getAuthorityG   s     $$T\\22    c                L   \         P                  P                  V 4       V P                   Uu. uF#  p\        P
                  ! VP                  4      NK%  	  upV n        ^ p^ RIH	p V P                   F(  pVP                  W$P                  R4       V^,          pK*  	  R# u upi )    reactorNi  )r   ServicestartServicer   r   LoopingCalltransfercallstwisted.internetr)   	callLaterstart)r   r   ir)   cs   &    r   r+   &SecondaryAuthorityService.startServiceO   sv    $$T*<@LLILqd&&qzz2LI
,Aa'2FA 	 Js   )B!c                    \         P                  P                  V 4       V P                   F  pVP	                  4        K  	  R # N)r   r*   stopServicer.   stop)r   r3   s   & r   r7   %SecondaryAuthorityService.stopServiceZ   s+    ##D)AFFH r%   )r.   r   r   )__name__
__module____qualname____firstlineno____doc__r.   r   r   classmethodr   r#   r+   r7   __static_attributes____classdictcell____classdict__s   @r   r   r      sD     	 EEI  23	 r%   c                   |   a  ] tR t^`t o RtRtR;tt^5tRt	R t
]R 4       tR tRR ltR tR	 tR
 tR tR tRtV tR# )r   a  
An Authority that keeps itself updated by performing zone transfers.

@ivar primary: The IP address of the server from which zone transfers will
be attempted.
@type primary: L{str}

@ivar _port: The port number of the server from which zone transfers will
be attempted.
@type _port: L{int}

@ivar domain: The domain for which this is the secondary authority.
@type domain: L{bytes}

@ivar _reactor: The reactor to use to perform the zone transfers, or
L{None} to use the global reactor.
FNc                    \         P                  P                  V 4       \        V4      V n        \
        P                  ! V4      V n        R# )zp
@param domain: The domain for which this will be the secondary
    authority.
@type domain: L{bytes} or L{str}
N)r   ResolverBaser   r   r   r	   domainStringdomain)r   	primaryIPrH   s   &&&r   r   SecondaryAuthority.__init__x   s6     	$$T*#I.&&v.r%   c                *    Vw  r4V ! W24      pWEn         V# )a  
Construct a new L{SecondaryAuthority} from a tuple giving a server
address and a C{bytes} giving the name of a domain for which this is an
authority.

@param serverAddress: A two-tuple, the first element of which is a
    C{str} giving an IP address and the second element of which is a
    C{int} giving a port number.  Together, these define where zone
    transfers will be attempted from.

@param domain: A C{bytes} giving the domain to transfer.
@type domain: L{bytes}

@return: A new instance of L{SecondaryAuthority}.
)r   )r   r   rH   r   r   	secondarys   &&&   r   r   -SecondaryAuthority.fromServerAddressAndDomain   s     " &(	r%   c                \   V P                   '       d   R# RV n        V P                  pVf   ^ RIHp \
        P                  ! V P                  V P                  3.VR7      pVP                  V P                  4      P                  V P                  4      P                  V P                  4      # )z{
Attempt a zone transfer.

@returns: A L{Deferred} that fires with L{None} when attempted zone
    transfer has completed.
NTr(   )serversr)   )transferringtransfering_reactorr/   r)   r   Resolverr   r   
lookupZonerH   addCallback_cbZone
addErrback_ebZone)r   r)   resolvers   &  r   r-   SecondaryAuthority.transfer   s     --?0??llDJJ/0'
 ,[&Z%	
r%   c                    V P                   '       d   V P                  '       g?   \        P                  ! \        P
                  ! \        P                  ! V4      4      4      # \        P                  ! WW#V4      # r6   )
soarecordsr   failr   Failurer	   DomainErrorr   _lookup)r   namer   typetimeouts   &&&&&r   ra   SecondaryAuthority._lookup   sK    xxxt||| ::goocood.CDEE$$TGDDr%   c                   Vw  p p/ ;V n         pV F  pV P                  '       gW   VP                  \        P                  8X  d8   VP
                  P
                  P                  4       VP                  3V n        Kk  VP                  VP
                  P
                  P                  4       . 4      P                  VP                  4       K  	  R # r6   )
r]   r\   rc   r	   SOArb   lowerpayload
setdefaultappend)r   zoneans_rrecs   &&    r   rV   SecondaryAuthority._cbZone   s    	QqC888CGG 3HHMM//13;;?SXX]]002B7>>s{{K	 r%   c                    \         P                  ! R V P                  : RV P                  : R24       \         P                  ! V4       R# )z	Updating  from z failed during zone transferN)r   msgrH   r   errr   r   s   &&r   rX   SecondaryAuthority._ebZone   s.    {{DLL*	
 	r%   c                n    V P                  4       P                  V P                  V P                  4       R # r6   )r-   addCallbacks_cbTransferred_ebTransferredr"   s   &r   updateSecondaryAuthority.update   s$    $$T%8%8$:M:MNr%   c                    R V n         R# )FN)rP   )r   results   &&r   rz   !SecondaryAuthority._cbTransferred   s
    !r%   c                    R V n         \        P                  ! RV P                  : RV P                  : R24       \        P
                  ! V4       R# )FzTransferring rs   z failed after zone transferN)transferredr   rt   rH   r   ru   rv   s   &&r   r{   !SecondaryAuthority._ebTransferred   s6     {{DLL*	
 	r%   )rH   r   r]   r\   rQ   r   rP   r6   )r:   r;   r<   r=   r>   rP   r\   r]   r   rR   r   r?   r   r-   ra   rV   rX   r|   rz   r{   r@   rA   rB   s   @r   r   r   `   si     $ LC'EH/  *
4ELO" r%   N)__all__twisted.applicationr   r/   r   r   twisted.namesr   r   r	   r
   twisted.names.authorityr   twisted.pythonr   r   twisted.python.compatr   r*   r   r    r%   r   <module>r      sH     !<
= ' ( 6 6 1 ' .M M`x xr%   