
    i<Q                       S r SSKJr  SSKrSSKrSSKJrJrJr  SSK	J
r
  SSKJr  SSKJr  SS	KJrJrJrJrJr  SrS
rSr\\-   \-   \-   r\S
-  rSrSrSr\r\r \(       a  SSK!J"r"  SSK#J$r$  \RJ                   " S S\RL                  5      5       r' " S S5      r( " S S\(5      r) " S S\(5      r* " S S\*5      r+ " S S\*5      r, " S S\*5      r- " S S \*5      r. " S! S"\*5      r/ " S# S$\*5      r0\*r1 " S% S&5      r2g)'a  Multicast DNS Service Discovery for Python, v0.14-wmcbrine
Copyright 2003 Paul Scott-Murphy, 2014 William McBrine

This module provides a framework for the use of DNS Service Discovery
using IP multicast.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
    )annotationsN)TYPE_CHECKINGAnycast   AbstractMethodException)_is_v6_address)current_time_millis)_CLASS_MASK_CLASS_UNIQUE_CLASSES	_TYPE_ANY_TYPES      i  i     )DNSIncoming)DNSOutgoingc                       \ rS rSrSrSrSrSrg)DNSQuestionType5   zAn MDNS question type.

"QU" - questions requesting unicast responses
"QM" - questions requesting multicast responses
https://datatracker.ietf.org/doc/html/rfc6762#section-5.4
r   r    N)__name__
__module____qualname____firstlineno____doc__QUQM__static_attributes__r       D/home/sebas/venvs/catt/lib/python3.13/site-packages/zeroconf/_dns.pyr   r   5   s     
B	
Br"   r   c                  v    \ rS rSrSrSrSS jrSS jrSS jrSS jr	\
SS j5       r\
SS	 j5       rSS
 jrSrg)DNSEntryB   zA DNS entry)class_keynametypeuniquec                (    U R                  XU5        g N)_fast_init_entryselfr)   type_r'   s       r#   __init__DNSEntry.__init__G   s    d62r"   c                    Xl         UR                  5       U l        X l        U[        -  U l        U[        -  S:g  U l        g)Fast init for reuse.r   N)r)   lowerr(   r*   r   r'   r   r+   r/   s       r#   r.   DNSEntry._fast_init_entryJ   s6    	::<	{*-!3r"   c                    U R                   UR                   :H  =(       a9    U R                  UR                  :H  =(       a    U R                  UR                  :H  $ r-   )r(   r*   r'   r0   others     r#   _dns_entry_matchesDNSEntry._dns_entry_matchesR   s<    xx599$`ejj)@`T[[TYT`T`E``r"   c                R    [        U[        5      =(       a    U R                  U5      $ )z6Equality test on key (lowercase name), type, and class)
isinstancer%   r;   r9   s     r#   __eq__DNSEntry.__eq__U   s    %*Mt/F/Fu/MMr"   c                8    [         R                  " U SU  S35      $ )zClass accessor?())r   get)r'   s    r#   
get_class_DNSEntry.get_class_Y   s     ||FbN33r"   c                8    [         R                  " U SU  S35      $ )zType accessorrB   rC   )r   rD   )ts    r#   get_typeDNSEntry.get_type^   s     zz!r!AY''r"   c                    SR                  UU R                  U R                  5      U R                  U R                  5      U R
                  (       a  SOSU R                  Ub  S[        [        U5       35      $ S5      $ )1String representation with additional informationz{}[{},{}{},{}]{}z-unique =)	formatrI   r*   rE   r'   r+   r)   r   r   )r0   hdrr:   s      r#   entry_to_stringDNSEntry.entry_to_stringc   sq    !((MM$))$OODKK(I"II&+&7aS% !"
 	
 >@
 	
r"   Nr)   strr1   intr'   rU   returnNoner)   rT   r1   _intr'   rY   rV   rW   )r:   r%   rV   boolr:   r   rV   rZ   )r'   rU   rV   rT   )rH   rU   rV   rT   )rP   rT   r:   zbytes | str | NonerV   rT   )r   r   r   r   r   	__slots__r2   r.   r;   r?   staticmethodrE   rI   rQ   r!   r   r"   r#   r%   r%   B   sM    ;I34aN 4 4 ( (	
r"   r%   c                      \ rS rSrSrSrSS jrSS jrSS jrSS jr	SS jr
\SS	 j5       r\SS
 j5       r\R                  SS j5       rSS jrSrg)DNSQuestiono   zA DNS question entry_hashc                (    U R                  XU5        g r-   )
_fast_initr/   s       r#   r2   DNSQuestion.__init__t   s    V,r"   c                t    U R                  XU5        [        U R                  X R                  45      U l        gr5   N)r.   hashr(   r'   rb   r/   s       r#   rd   DNSQuestion._fast_initw   s+    d62488UKK89
r"   c                    U R                   UR                   :H  =(       a?    U R                  UR                  [        4;   =(       a    U R                  UR                  :H  $ )z6Returns true if the question is answered by the record)r'   r*   r   r)   )r0   recs     r#   answered_byDNSQuestion.answered_by|   sD    {{cjj(iTYY388Y:O-OiTXT]T]adaiaiTiir"   c                    U R                   $ r-   ra   r0   s    r#   __hash__DNSQuestion.__hash__   s    zzr"   c                R    [        U[        5      =(       a    U R                  U5      $ )zTests equality on dns question.)r>   r_   r;   r9   s     r#   r?   DNSQuestion.__eq__   s    %-P$2I2I%2PPr"   c                t    [        U R                  R                  S5      5      [        -   [        -   [        -   $ )z+Maximum size of the question in the packet.utf-8)lenr)   encode	_LEN_BYTE
_LEN_SHORTro   s    r#   max_sizeDNSQuestion.max_size   s-     499##G,-	9JFSSr"   c                    U R                   $ )zbReturns true if the QU (not QM) is set.

unique shares the same mask as the one
used for unicast.
r+   ro   s    r#   unicastDNSQuestion.unicast   s     {{r"   c                    Xl         g)zSets the QU bit (not QM).Nr}   )r0   values     r#   r~   r      s	     r"   c                    SR                  U R                  U R                  5      U R                  (       a  SOSU R	                  U R
                  5      U R                  5      $ )String representationz{}[question,{},{},{}]r   r    )rO   rI   r*   r~   rE   r'   r)   ro   s    r#   __repr__DNSQuestion.__repr__   sG    &--MM$))$LLDdOODKK(II	
 	
r"   )rb   r+   NrS   rX   )rk   	DNSRecordrV   rZ   rV   rU   r[   )rV   rZ   )r   rZ   rV   rW   rV   rT   )r   r   r   r   r   r\   r2   rd   rl   rp   r?   propertyrz   r~   setterr   r!   r   r"   r#   r_   r_   o   sl    I-:
jQ T T   ^^ 
r"   r_   c                      \ rS rSrSrSr S           SS jjrSS jrSS jrSS jr	SS	 jr
SS
 jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSrg)r      z.A DNS record - like a DNS entry, but has a TTLcreatedttlNc                L    U R                  XX4U=(       d
    [        5       5        g r-   )_fast_init_recordr   r0   r)   r1   r'   r   r   s         r#   r2   DNSRecord.__init__   s     	tF9YDWDYZr"   c                @    U R                  XU5        X@l        XPl        grg   )r.   r   r   r   s         r#   r   DNSRecord._fast_init_record   s    d62r"   c                    [         ezAbstract methodr   r9   s     r#   r?   DNSRecord.__eq__       %%r"   c                4    U R                   UR                   :  $ r-   r   r9   s     r#   __lt__DNSRecord.__lt__   s    xx%))##r"   c                f    UR                  5       nU H  nU R                  U5      (       d  M    g   g)z\Returns true if any answer in a message can suffice for the
information held in this record.TF)answers_suppressed_by_answer)r0   msgr   records       r#   suppressed_byDNSRecord.suppressed_by   s2     ++-F))&11  r"   c                P    X:H  =(       a    UR                   U R                   S-  :  $ )zoReturns true if another record has same name, type and class,
and if its TTL is at least half of this record's.r   r   r9   s     r#   r   DNSRecord._suppressed_by_answer   s"     };dhhl!;;r"   c                >    U R                   XR                  -  S-  -   $ )zPReturns the time at which this record will have expired
by a certain percentage.
   r   )r0   percents     r#   get_expiration_timeDNSRecord.get_expiration_time   s     ||w1B677r"   c                b    U R                   [        U R                  -  -   U-
  S-  nUS:  a  S$ U$ )z%Returns the remaining TTL in seconds.g     @@r   r   _EXPIRE_FULL_TIME_MSr   )r0   nowremains      r#   get_remaining_ttlDNSRecord.get_remaining_ttl   s5    ,,"6"ABSHFRQJq*F*r"   c                H    U R                   [        U R                  -  -   U:*  $ )z(Returns true if this record has expired.r   r0   r   s     r#   
is_expiredDNSRecord.is_expired   s     ||3dhh>?3FFr"   c                H    U R                   [        U R                  -  -   U:*  $ )z9Returns true if this record is at least half way expired.)r   _EXPIRE_STALE_TIME_MSr   r   s     r#   is_staleDNSRecord.is_stale   s     ||4txx?@CGGr"   c                H    U R                   [        U R                  -  -   U:  $ )zFReturns true if the record more than one quarter of its TTL remaining.)r   _RECENT_TIME_MSr   r   s     r#   	is_recentDNSRecord.is_recent   s    ||9:S@@r"   c                    Xl         X l        g)z$Set the created and ttl of a record.Nr   )r0   r   r   s      r#   _set_created_ttlDNSRecord._set_created_ttl   s     r"   c                    [         er   r   r0   outs     r#   writeDNSRecord.write   r   r"   c                    U R                    S[        U R                  [        5       5      5       S[	        [
        U5       3n[        R                  U SU5      $ )rL   /,r   )r   rU   r   r   r   r   r%   rQ   )r0   r:   args      r#   	to_stringDNSRecord.to_string   sQ    
!C 6 67J7L MNOqQUVY[`QaPbc''h<<r"   r-   )r)   rT   r1   rU   r'   rU   r   rY   r   float | NonerV   rW   )r)   rT   r1   rY   r'   rY   r   rY   r   _floatrV   rW   r[   )r:   r   rV   rZ   )r   r   rV   rZ   )r   rY   rV   float)r   r   rV   zint | float)r   r   rV   rZ   )r   r   r   rY   rV   rW   r   r   rV   rW   )r:   zbytes | strrV   rT   )r   r   r   r   r   r\   r2   r   r?   r   r   r   r   r   r   r   r   r   r   r   r!   r   r"   r#   r   r      s    8"I !%[[ [ 	[
 [ [ 
[&$<
8+
GHA&=r"   r   c                      \ rS rSrSrSr  S               SS jjr                SS jrSS jrSS jr	SS	 jr
SS
 jrSS jrSrg)
DNSAddress   zA DNS address record)rb   addressscope_idNc           
     N    U R                  XX4XVU=(       d
    [        5       5        g r-   rd   r   r0   r)   r1   r'   r   r   r   r   s           r#   r2   DNSAddress.__init__   s     	V'WEePcPefr"   c                    U R                  XX4U5        XPl        X`l        [        U R                  X R
                  XV45      U l        grg   )r   r   r   rh   r(   r'   rb   r   s           r#   rd   DNSAddress._fast_init  s;     	tFA 488UKKKL
r"   c                :    UR                  U R                  5        g'Used in constructing an outgoing packetN)write_stringr   r   s     r#   r   DNSAddress.write  s    &r"   c                R    [        U[        5      =(       a    U R                  U5      $ )zTests equality on address)r>   r   _eqr9   s     r#   r?   DNSAddress.__eq__      %,@%@r"   c                    U R                   UR                   :H  =(       a1    U R                  UR                  :H  =(       a    U R                  U5      $ r-   )r   r   r;   r9   s     r#   r   DNSAddress._eq  s?    LLEMM) ///''.	
r"   c                    U R                   $ )z"Hash to compare like DNSAddresses.ra   ro   s    r#   rp   DNSAddress.__hash__&      zzr"   c                H    U R                  [        R                  " [        U R                  5      (       a  [        R
                  O[        R                  U R                  5      5      $ ! [        [        4 a'    U R                  [        U R                  5      5      s $ f = fr   )
r   socket	inet_ntopr
   r   AF_INET6AF_INET
ValueErrorOSErrorrT   ro   s    r#   r   DNSAddress.__repr__*  sv    	5>>  '5dll'C'CFOOLL  G$ 	5>>#dll"344	5s   A'A* *4B! B!)NN)r)   rT   r1   rU   r'   rU   r   rU   r   bytesr   z
int | Noner   r   rV   rW   )r)   rT   r1   rY   r'   rY   r   rY   r   r   r   z_int | Noner   r   rV   rW   r   r[   )r:   r   rV   rZ   r   r   r   r   r   r   r   r\   r2   rd   r   r?   r   rp   r   r!   r   r"   r#   r   r      s    0I  $ $
g
g 
g 	
g
 
g 
g 
g 
g 

gMM M 	M
 M M M M 
M 'A

5r"   r   c                      \ rS rSrSrSr S               SS jjr                SS jrSS jrSS jr	SS	 jr
SS
 jrSS jrSrg)DNSHinfoi7  zA DNS host information record)rb   cpuosNc           
     N    U R                  XX4XVU=(       d
    [        5       5        g r-   r   r0   r)   r1   r'   r   r   r   r   s           r#   r2   DNSHinfo.__init__<  s     	V#7;[FYF[\r"   c                    U R                  XX4U5        XPl        X`l        [        U R                  X R
                  XV45      U l        grg   )r   r   r   rh   r(   r'   rb   r   s           r#   rd   DNSHinfo._fast_initH  s;     	tFA488UKKAB
r"   c                    UR                  U R                  R                  S5      5        UR                  U R                  R                  S5      5        g)r   ru   N)write_character_stringr   rw   r   r   s     r#   r   DNSHinfo.writeQ  s8    ""488??7#;<""477>>'#:;r"   c                R    [        U[        5      =(       a    U R                  U5      $ zTests equality on cpu and os.)r>   r   r   r9   s     r#   r?   DNSHinfo.__eq__V  s    %*>txx>r"   c                    U R                   UR                   :H  =(       a1    U R                  UR                  :H  =(       a    U R                  U5      $ r  )r   r   r;   r9   s     r#   r   DNSHinfo._eqZ  s8    xx599$_EHH)<_AXAXY^A__r"   c                    U R                   $ )zHash to compare like DNSHinfo.ra   ro   s    r#   rp   DNSHinfo.__hash__^  r   r"   c                X    U R                  U R                  S-   U R                  -   5      $ )r    )r   r   r   ro   s    r#   r   DNSHinfo.__repr__b  s"    ~~dhhntww677r"   r-   )r)   rT   r1   rU   r'   rU   r   rU   r   rT   r   rT   r   r   rV   rW   )r)   rT   r1   rY   r'   rY   r   rY   r   rT   r   rT   r   r   rV   rW   r   r[   )r:   r   rV   rZ   r   r   r   r   r"   r#   r   r   7  s    '&I !%
]
] 
] 	
]
 
] 
] 
] 
] 

]CC $C.2C9=CDGCMPC[aC	C<
?`8r"   r   c                      \ rS rSrSrSr S             SS jjr              SS jr\SS j5       r	SS jr
SS	 jrSS
 jrSS jrSS jrSrg)
DNSPointerig  zA DNS pointer record)rb   alias	alias_keyNc           	     L    U R                  XX4XV=(       d
    [        5       5        g r-   r   r0   r)   r1   r'   r   r  r   s          r#   r2   DNSPointer.__init__l  s     	V%9YDWDYZr"   c                    U R                  XX4U5        XPl        UR                  5       U l        [	        U R
                  X R                  U R                  45      U l        g r-   )r   r  r6   r  rh   r(   r'   rb   r  s          r#   rd   DNSPointer._fast_initw  sG     	tFA
488UKKHI
r"   c                    [         [        -   [        U R                  5      [        U R                  5      -
  -   [        -   $ )zOMaximum size of the record in the packet assuming the name has been compressed.)_BASE_MAX_SIZE_NAME_COMPRESSION_MIN_SIZErv   r  r)   ro   s    r#   max_size_compressedDNSPointer.max_size_compressed  s;     ()4::TYY/1 ))	
r"   c                :    UR                  U R                  5        gr   )
write_namer  r   s     r#   r   DNSPointer.write  s    tzz"r"   c                R    [        U[        5      =(       a    U R                  U5      $ zTests equality on alias.)r>   r  r   r9   s     r#   r?   DNSPointer.__eq__  r   r"   c                d    U R                   UR                   :H  =(       a    U R                  U5      $ r  )r  r;   r9   s     r#   r   DNSPointer._eq  s%    ~~0ST5L5LU5SSr"   c                    U R                   $ )z Hash to compare like DNSPointer.ra   ro   s    r#   rp   DNSPointer.__hash__  r   r"   c                8    U R                  U R                  5      $ r   )r   r  ro   s    r#   r   DNSPointer.__repr__  s    ~~djj))r"   r-   )r)   rT   r1   rU   r'   rU   r   rU   r  rT   r   r   rV   rW   )r)   rT   r1   rY   r'   rY   r   rY   r  rT   r   r   rV   rW   r   r   r[   )r:   r  rV   rZ   r   )r   r   r   r   r   r\   r2   rd   r   r  r   r?   r   rp   r   r!   r   r"   r#   r  r  g  s    /I !%	[	[ 	[ 		[
 	[ 	[ 	[ 
	[JJ $J.2J9=JFIJTZJ	J 
 
#AT*r"   r  c                      \ rS rSrSrSr S             SS jjr              SS jrSS jrSS jr	SS	 jr
SS
 jrSS jrSrg)DNSTexti  zA DNS text record)rb   textNc           	     L    U R                  XX4XV=(       d
    [        5       5        g r-   r   r0   r)   r1   r'   r   r'  r   s          r#   r2   DNSText.__init__  s     	V$8XCVCXYr"   c                    U R                  XX4U5        XPl        [        U R                  X R                  U45      U l        g r-   )r   r'  rh   r(   r'   rb   r)  s          r#   rd   DNSText._fast_init  s6     	tFA	488UKK>?
r"   c                :    UR                  U R                  5        gr   )r   r'  r   s     r#   r   DNSText.write  s    #r"   c                    U R                   $ )zHash to compare like DNSText.ra   ro   s    r#   rp   DNSText.__hash__  r   r"   c                R    [        U[        5      =(       a    U R                  U5      $ zTests equality on text.)r>   r&  r   r9   s     r#   r?   DNSText.__eq__      %)=dhhuo=r"   c                d    U R                   UR                   :H  =(       a    U R                  U5      $ r2  )r'  r;   r9   s     r#   r   DNSText._eq  s%    yyEJJ&I4+B+B5+IIr"   c                    [        U R                  5      S:  a!  U R                  U R                  SS 5      S-   $ U R                  U R                  5      $ )r   r   N   z...)rv   r'  r   ro   s    r#   r   DNSText.__repr__  sC    tyy>B>>$))BQ-0588~~dii((r"   r-   )r)   rT   r1   rU   r'   rU   r   rU   r'  r   r   r   rV   rW   )r)   rT   r1   rY   r'   rY   r   rY   r'  r   r   r   rV   rW   r   r   r[   )r:   r&  rV   rZ   r   )r   r   r   r   r   r\   r2   rd   r   rp   r?   r   r   r!   r   r"   r#   r&  r&    s    !I !%	Z	Z 	Z 		Z
 	Z 	Z 	Z 
	Z@@ $@.2@9=@EJ@U[@	@$>J)r"   r&  c                      \ rS rSrSrSr S                   SS jjr                    SS jrSS jrSS jr	SS	 jr
SS
 jrSS jrSrg)
DNSServicei  zA DNS service record)rb   portpriorityserver
server_keyweightNc
                P    U R                  XX4XVXxU	=(       d
    [        5       5	        g r-   r   
r0   r)   r1   r'   r   r=  r@  r<  r>  r   s
             r#   r2   DNSService.__init__  s$     	hgFfQdQf	
r"   c
           	         U R                  XX4U	5        XPl        X`l        Xpl        Xl        UR                  5       U l        [        U R                  X R                  XVXpR                  45      U l
        g r-   )r   r=  r@  r<  r>  r6   r?  rh   r(   r'   rb   rB  s
             r#   rd   DNSService._fast_init  sZ     	tFA 	 ,,.488UKK4Q`Q`ab
r"   c                    UR                  U R                  5        UR                  U R                  5        UR                  U R                  5        UR	                  U R
                  5        gr   )write_shortr=  r@  r<  r  r>  r   s     r#   r   DNSService.write  sB    &$		"t{{#r"   c                R    [        U[        5      =(       a    U R                  U5      $ )z3Tests equality on priority, weight, port and server)r>   r;  r   r9   s     r#   r?   DNSService.__eq__  r   r"   c                $   U R                   UR                   :H  =(       aq    U R                  UR                  :H  =(       aQ    U R                  UR                  :H  =(       a1    U R                  UR                  :H  =(       a    U R	                  U5      $ )z4Tests equality on priority, weight, port and server.)r=  r@  r<  r?  r;   r9   s     r#   r   DNSService._eq   sq     MMU^^+ /u||+/		UZZ'/ 5#3#33/ ''.	
r"   c                    U R                   $ )z Hash to compare like DNSService.ra   ro   s    r#   rp   DNSService.__hash__
  r   r"   c                V    U R                  U R                   SU R                   35      $ )r   :)r   r>  r<  ro   s    r#   r   DNSService.__repr__  s$    ~~Qtyyk:;;r"   r-   )r)   rT   r1   rU   r'   rU   r   rU   r=  rU   r@  rU   r<  rU   r>  rT   r   r   rV   rW   )r)   rT   r1   rY   r'   rY   r   rY   r=  rY   r@  rY   r<  rY   r>  rT   r   r   rV   rW   r   r[   )r:   r;  rV   rZ   r   r   r   r   r"   r#   r;  r;    s   OI !%

 
 	

 
 
 
 
 
 
 

 cc c 	c
 c c c c c c 
c($A
<r"   r;  c                      \ rS rSrSrSr S               SS jjr                SS jrSS jrSS jr	SS	 jr
SS
 jrSS jrSrg)DNSNseci  zA DNS NSEC record)rb   	next_namerdtypesNc           
     N    U R                  XX4XVU=(       d
    [        5       5        g r-   r   r0   r)   r1   r'   r   rT  rU  r   s           r#   r2   DNSNsec.__init__  s     	V)gFfQdQfgr"   c                    U R                  XX4U5        XPl        [        U5      U l        [	        U R
                  X R                  U/U R                  Q75      U l        g r-   )r   rT  sortedrU  rh   r(   r'   rb   rW  s           r#   rd   DNSNsec._fast_init$  sJ     	tFA"g488UKKRT\\RS
r"   c                   [        S5      nSnU R                   H4  nUS:  a  [        SU S35      eUS-  nUS-   nX%==   SUS-  -	  -  ss'   M6     US:X  a  [        S	5      e[        USU 5      nUR	                  U R
                  5        UR                  S5        UR                  [        U5      5        UR                  U5        g
)z(Used in constructing an outgoing packet.s                                    r      zrdtype z is too large for NSEC   r      z"NSEC must have at least one rdtypeN)		bytearrayrU  r   r   r  rT  _write_byterv   r   )r0   r   bitmaptotal_octetsrdtypebyte	out_bytess          r#   r   DNSNsec.write3  s    :&llF| 76(2H!IJJQ;D!8LLDVaZ00L # 1 ABB&<01	t~~&I'#r"   c                R    [        U[        5      =(       a    U R                  U5      $ z(Tests equality on next_name and rdtypes.)r>   rS  r   r9   s     r#   r?   DNSNsec.__eq__G  r4  r"   c                    U R                   UR                   :H  =(       a1    U R                  UR                  :H  =(       a    U R                  U5      $ ri  )rT  rU  r;   r9   s     r#   r   DNSNsec._eqK  sA     NNeoo- /-/''.	
r"   c                    U R                   $ )zHash to compare like DNSNSec.ra   ro   s    r#   rp   DNSNsec.__hash__S  r   r"   c                    U R                  U R                  S-   SR                  U R                   Vs/ s H  oR	                  U5      PM     sn5      -   5      $ s  snf )r   r   |)r   rT  joinrU  rI   )r0   r1   s     r#   r   DNSNsec.__repr__W  sJ    ~~NNS 388t||,\|e]]5-A|,\#]]
 	
,\s   Ar-   )r)   rT   r1   rU   r'   rU   r   rY   rT  rT   rU  z	list[int]r   r   rV   rW   )r)   rT   r1   rY   r'   rY   r   rY   rT  rT   rU  z
list[_int]r   r   rV   rW   r   r[   )r:   rS  rV   rZ   r   r   r   r   r"   r#   rS  rS    s    1I !%
h
h 
h 	
h
 
h 
h 
h 
h 

hTT T 	T
 T T T T 
T$(>

r"   rS  c                  X    \ rS rSrSrSrS
S jr\SS j5       rSS jr	SS jr
SS jrSrg	)DNSRRSetia  z2A set of dns records with a lookup to get the ttl._lookup_recordsc                    Xl         SU l        g)z"Create an RRset from records sets.N)rw  rv  )r0   recordss     r#   r2   DNSRRSet.__init__f  s    :>r"   c                "    U R                  5       $ )zReturn the lookup table.)_get_lookupro   s    r#   lookupDNSRRSet.lookupk  s     !!r"   c                4    [        U R                  5       5      $ )z Return the lookup table as aset.)setr|  ro   s    r#   
lookup_setDNSRRSet.lookup_setp  s    4##%&&r"   c                    U R                   c"  U R                   Vs0 s H  oU_M     snU l         U R                   $ s  snf )z/Return the lookup table, building it if needed.ru  )r0   r   s     r#   r|  DNSRRSet._get_lookupt  s8    <<9=GvFNGDL|| Hs   <c                    U R                  5       nUR                  U5      nUc  gUR                  UR                  S-  :  $ )z\Returns true if any answer in the rrset can suffice for the
information held in this record.Fr   )r|  rD   r   )r0   r   r}  r:   s       r#   
suppressesDNSRRSet.suppresses{  s?     !!#

6"=yyFJJN++r"   N)ry  zlist[DNSRecord]rV   rW   )rV   zdict[DNSRecord, DNSRecord])rV   zset[DNSRecord])r   
_DNSRecordrV   rZ   )r   r   r   r   r   r\   r2   r   r}  r  r|  r  r!   r   r"   r#   rt  rt  a  s2    <'I?
 " "',r"   rt  )3r   
__future__r   enumr   typingr   r   r   _exceptionsr	   
_utils.netr
   _utils.timer   constr   r   r   r   r   rx   ry   _LEN_INTr  r  r   r   r   r   r   rU   rY   _protocol.incomingr   _protocol.outgoingr   r+   Enumr   r%   r_   r   r   r   r  r&  r;  rS  r  rt  r   r"   r#   <module>r     s(  , #   + + 0 & , J J	
j(83j@&]   	
// 	dii 	 	*
 *
Z2
( 2
jO= O=d>5 >5B-8y -8`4* 4*n+)i +)\D< D<NH
i H
V 
!, !,r"   