+
    üÐ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   ÚfromServerAddressAndDomainsÚ5SecondaryAuthorityService.fromServerAddressAndDomains-   sT   € ð" &‰ˆÙ�g˜rÓ"ˆØŒñ ó
á�ô ×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Ô*Ø<@¿LºLÓI¹L°q”d×&Ò& q§z¡zÖ2¹LÑIˆŒ
ØˆÝ,à—”ˆAà×Ñ˜a§¡¨'Ô2Ø��FŠAó ùò	 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Ø�F‰FŽHó 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ä—?’?Ø—l‘l D§J¡JÐ/Ð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   € Ø�x�xˆx˜tŸ|Ÿ|˜|ô —:’:œgŸošo¬c¯oªo¸dÓ.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Ø—8—8�8 §¡¬C¯G©GÔ 3ØŸH™HŸM™M×/Ñ/Ó1°3·;±;Ð?�–à—‘˜SŸX™XŸ]™]×0Ñ0Ó2°BÓ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.   € Ü�‹à�{Œ{˜DŸLœLð*ô	
ô 	�Š�Ö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   € Ø ˆÔÜ�‹à�{Œ{˜DŸLœLð*ô	
ô 	�Š�Ö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%   