/usr/lib/python3.9/site-packages/dns/__pycache__
NameSizeModeActions
asyncbackend.cpython-39.opt-1.pyc26160644editdlrm
asyncbackend.cpython-39.pyc26160644editdlrm
asyncquery.cpython-39.opt-1.pyc178050644editdlrm
asyncquery.cpython-39.pyc178170644editdlrm
asyncresolver.cpython-39.opt-1.pyc129580644editdlrm
asyncresolver.cpython-39.pyc130020644editdlrm
dnssec.cpython-39.opt-1.pyc321600644editdlrm
dnssec.cpython-39.pyc321880644editdlrm
dnssectypes.cpython-39.opt-1.pyc16160644editdlrm
dnssectypes.cpython-39.pyc16160644editdlrm
e164.cpython-39.opt-1.pyc34520644editdlrm
e164.cpython-39.pyc34520644editdlrm
edns.cpython-39.opt-1.pyc147200644editdlrm
edns.cpython-39.pyc147340644editdlrm
entropy.cpython-39.opt-1.pyc33480644editdlrm
entropy.cpython-39.pyc33480644editdlrm
enum.cpython-39.opt-1.pyc32490644editdlrm
enum.cpython-39.pyc32490644editdlrm
exception.cpython-39.opt-1.pyc55180644editdlrm
exception.cpython-39.pyc57140644editdlrm
flags.cpython-39.opt-1.pyc22080644editdlrm
flags.cpython-39.pyc22080644editdlrm
grange.cpython-39.opt-1.pyc10890644editdlrm
grange.cpython-39.pyc11330644editdlrm
immutable.cpython-39.opt-1.pyc24280644editdlrm
immutable.cpython-39.pyc24280644editdlrm
inet.cpython-39.opt-1.pyc46030644editdlrm
inet.cpython-39.pyc46030644editdlrm
ipv4.cpython-39.opt-1.pyc18440644editdlrm
ipv4.cpython-39.pyc18440644editdlrm
ipv6.cpython-39.opt-1.pyc39380644editdlrm
ipv6.cpython-39.pyc39380644editdlrm
message.cpython-39.opt-1.pyc506310644editdlrm
message.cpython-39.pyc506720644editdlrm
name.cpython-39.opt-1.pyc350740644editdlrm
name.cpython-39.pyc350890644editdlrm
namedict.cpython-39.opt-1.pyc29860644editdlrm
namedict.cpython-39.pyc29860644editdlrm
nameserver.cpython-39.opt-1.pyc89080644editdlrm
nameserver.cpython-39.pyc89080644editdlrm
node.cpython-39.opt-1.pyc116050644editdlrm
node.cpython-39.pyc116050644editdlrm
opcode.cpython-39.opt-1.pyc24750644editdlrm
opcode.cpython-39.pyc24750644editdlrm
query.cpython-39.opt-1.pyc402980644editdlrm
query.cpython-39.pyc403430644editdlrm
rcode.cpython-39.opt-1.pyc32530644editdlrm
rcode.cpython-39.pyc32530644editdlrm
rdata.cpython-39.opt-1.pyc236090644editdlrm
rdata.cpython-39.pyc236090644editdlrm
rdataclass.cpython-39.opt-1.pyc27920644editdlrm
rdataclass.cpython-39.pyc27920644editdlrm
rdataset.cpython-39.opt-1.pyc154370644editdlrm
rdataset.cpython-39.pyc154510644editdlrm
rdatatype.cpython-39.opt-1.pyc66730644editdlrm
rdatatype.cpython-39.pyc66730644editdlrm
renderer.cpython-39.opt-1.pyc98220644editdlrm
renderer.cpython-39.pyc98410644editdlrm
resolver.cpython-39.opt-1.pyc524720644editdlrm
resolver.cpython-39.pyc526250644editdlrm
reversename.cpython-39.opt-1.pyc30550644editdlrm
reversename.cpython-39.pyc30550644editdlrm
rrset.cpython-39.opt-1.pyc78850644editdlrm
rrset.cpython-39.pyc78990644editdlrm
serial.cpython-39.opt-1.pyc29330644editdlrm
serial.cpython-39.pyc29330644editdlrm
set.cpython-39.opt-1.pyc87990644editdlrm
set.cpython-39.pyc87990644editdlrm
tokenizer.cpython-39.opt-1.pyc172420644editdlrm
tokenizer.cpython-39.pyc172560644editdlrm
transaction.cpython-39.opt-1.pyc202610644editdlrm
transaction.cpython-39.pyc202610644editdlrm
tsig.cpython-39.opt-1.pyc103810644editdlrm
tsig.cpython-39.pyc103810644editdlrm
tsigkeyring.cpython-39.opt-1.pyc18350644editdlrm
tsigkeyring.cpython-39.pyc18350644editdlrm
ttl.cpython-39.opt-1.pyc16800644editdlrm
ttl.cpython-39.pyc16800644editdlrm
update.cpython-39.opt-1.pyc88860644editdlrm
update.cpython-39.pyc88860644editdlrm
version.cpython-39.opt-1.pyc5630644editdlrm
version.cpython-39.pyc5630644editdlrm
versioned.cpython-39.opt-1.pyc87230644editdlrm
versioned.cpython-39.pyc87750644editdlrm
win32util.cpython-39.opt-1.pyc56530644editdlrm
win32util.cpython-39.pyc56530644editdlrm
wire.cpython-39.opt-1.pyc33270644editdlrm
wire.cpython-39.pyc33550644editdlrm
xfr.cpython-39.opt-1.pyc77710644editdlrm
xfr.cpython-39.pyc77890644editdlrm
zone.cpython-39.opt-1.pyc452680644editdlrm
zone.cpython-39.pyc454120644editdlrm
zonefile.cpython-39.opt-1.pyc176630644editdlrm
zonefile.cpython-39.pyc176870644editdlrm
zonetypes.cpython-39.opt-1.pyc10230644editdlrm
zonetypes.cpython-39.pyc10230644editdlrm
_asyncbackend.cpython-39.opt-1.pyc42080644editdlrm
_asyncbackend.cpython-39.pyc42080644editdlrm
_asyncio_backend.cpython-39.opt-1.pyc89840644editdlrm
_asyncio_backend.cpython-39.pyc90020644editdlrm
_ddr.cpython-39.opt-1.pyc40710644editdlrm
_ddr.cpython-39.pyc40710644editdlrm
_features.cpython-39.opt-1.pyc23670644editdlrm
_features.cpython-39.pyc23670644editdlrm
_immutable_ctx.cpython-39.opt-1.pyc21590644editdlrm
_immutable_ctx.cpython-39.pyc21590644editdlrm
__init__.cpython-39.opt-1.pyc6670644editdlrm
__init__.cpython-39.pyc6670644editdlrm
Edit: /usr/lib/python3.9/site-packages/dns/__pycache__/message.cpython-39.pyc (50672B)
a àMÒeÉã@södZddlZddlZddlZddlmZmZmZmZm Z m Z ddl Z ddl Z ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ Gdd„de jjƒZ Gdd„de jjƒZ!Gdd „d e jj"ƒZ#Gd d „d e jjƒZ$Gd d „d e jjƒZ%Gdd„de jj"ƒZ&Gdd„de jj"ƒZ'Gdd„de jj"ƒZ(Gdd„de jj"ƒZ)Gdd„de jj"ƒZ*Gdd„de jj+ƒZ,Gdd„de j-j.ƒZ/Gdd„dƒZ0dZ1dZ2e e3e j4j5e j6j7e j8j9ee j8j9ee j6j7fZ:ee:e j;jee j;j<fZ?Gd d!„d!ƒZ@Gd"d#„d#ƒZAGd$d%„d%e@ƒZBd&d'„ZCd(d)„ZDGd*d+„d+ƒZEdBeFeeeeFeGee j4j5ee e jHjIe jHjJfeGeGeGeGeGeGe@d.œ d/d0„ZKGd1d2„d2ƒZLdCe>ee j4jMeGee j4j5eGee j4j5e@d4œd5d6„ZNdDeee j4jMeGe@d7œd8d9„ZOe j6jPdd-dddddde jQjRdf e e j4j5e>fe e j8j9e>fe e j6j7e>fee e3eGfeGee3ee3ee3eee jSjTee j4jMee3e3e3eBd:œd;d<„ZUdEe@eGe3e3e3ee3e@d?œd@dA„ZVe/jWZWe/jXZXe/jYZYe/jZZZdS)Fz DNS MessageséN)ÚAnyÚDictÚListÚOptionalÚTupleÚUnionc@seZdZdZdS)Ú ShortHeaderz2The DNS packet passed to from_wire() is too short.N©Ú__name__Ú __module__Ú __qualname__Ú__doc__©rrú//usr/lib/python3.9/site-packages/dns/message.pyr-src@seZdZdZdS)Ú TrailingJunkzEThe DNS packet passed to from_wire() has extra junk at the end of it.Nr rrrrr1src@seZdZdZdS)ÚUnknownHeaderFieldzVThe header field name was not recognized when converting from text into a message.Nr rrrrr5src@seZdZdZdS)ÚBadEDNSzLAn OPT record occurred somewhere other than the additional data section.Nr rrrrr:src@seZdZdZdS)ÚBadTSIGzWA TSIG record occurred somewhere other than the end of the additional data section.Nr rrrrr?src@seZdZdZdS)ÚUnknownTSIGKeyz(A TSIG with an unknown key was received.Nr rrrrrDsrcs.eZdZdZdhZ‡fdd„Zdd„Z‡ZS)Ú TruncatedzThe truncated flag is set.Úmessagecstƒj|i|¤ŽdS©N)ÚsuperÚ__init__)ÚselfÚargsÚkwargs©Ú __class__rrrOszTruncated.__init__cCs |jdS)zbAs much of the message as could be processed. Returns a ``dns.message.Message``. r)r©rrrrrRszTruncated.message)r r r r Z supp_kwargsrrÚ __classcell__rrrrrHs rc@seZdZdZdS)ÚNotQueryResponsez%Message is not a response to a query.Nr rrrrr!Zsr!c@seZdZdZdS)Ú ChainTooLongzThe CNAME chain is too long.Nr rrrrr"^sr"c@seZdZdZdS)ÚAnswerForNXDOMAINz.The rcode is NXDOMAIN but an answer was found.Nr rrrrr#bsr#c@seZdZdZdS)ÚNoPreviousNamezNo previous name was known.Nr rrrrr$fsr$c@s,eZdZdZdZdZdZdZedd„ƒZ dS) ÚMessageSectionzMessage sectionsrééécCsdS©Nr(r)ÚclsrrrÚ_maximumrszMessageSection._maximumN) r r r r ÚQUESTIONÚANSWERÚ AUTHORITYÚ ADDITIONALÚ classmethodr+rrrrr%jsr%c@seZdZeedœdd„ZdS)Ú MessageError©Ú exceptionÚoffsetcCs||_||_dSrr2)rr3r4rrrrxszMessageError.__init__N)r r r Ú ExceptionÚintrrrrrr1wsr1iÐéc @sHeZdZdZeZdjeedœdd„Ze e e j j dœdd„ƒZejd d„ƒZe e e j j dœd d „ƒZejd d „ƒZe e e j j dœd d„ƒZejdd„ƒZe e e j j dœdd„ƒZejdd„ƒZdd„Zdd„Zdkee jjeeeefedœdd„Zdd„Zdd„Zdedœd d!„Ze e j j ed"œd#d$„Zee e j j d%œd&d'„Z e j!j"dd(d(dfe#e jje j$j%e j!j&e j!j&ee j$j%eeee jj'e j j d)œ d*d+„Z(e j!j"dd(d(dfe#e jje j$j%e j!j&e j!j&ee j$j%eeee jj'ee j j d)œ d,d-„Z)e#ed"œd.d/„Z*edœd0d1„Z+edœd2d3„Z,dlee jjeeeeeeeeefe-d5œd6d7„Z.e/d8d9„ƒZ0dd:dd4d;e j1j2feee3e jjefeeeee-e3e jjefdd<œd=d>„Z4e ee jjdœd?d@„ƒZ5e ee jjdœdAdB„ƒZ6e ee-dœdCdD„ƒZ7e eedœdEdF„ƒZ8e edœdGdH„ƒZ9e/d4e:dfdIdJ„ƒZ;d4d4e:ddd4fee3eefeeeeee e je edœdNdO„ƒZrrrrÚquestion¥szMessage.questioncCs||jd<dS©NrrM©rÚvrrrrNªscCs |jdS)zThe answer section.r&rMrrrrÚanswer®szMessage.answercCs||jd<dS)Nr&rMrPrrrrR³scCs |jdS)zThe authority section.r'rMrrrrÚ authority·szMessage.authoritycCs||jd<dS)Nr'rMrPrrrrS¼scCs |jdS)zThe additional data section.r(rMrrrrÚ additionalÀszMessage.additionalcCs||jd<dSr)rMrPrrrrTÅscCsdt|jƒdS)Nz)Úreprr:rrrrÚ__repr__ÉszMessage.__repr__cCs| ¡Sr)Úto_textrrrrÚ__str__ÌszMessage.__str__T)rFÚ relativizeÚkwrLc Ks:t ¡}| d|j¡| dtj | ¡¡¡| dtj | ¡¡¡| dtj |j¡¡|j dkr°| d|j ¡|j dkr | dtj  |j ¡¡| d|j ¡|j D]}| d | ¡¡q¶|jj ¡D]N\}}| d |›d �¡| |¡D](}| |j||fi|¤Ž¡| d ¡qþqÚ| ¡d d …S)z¼Convert the message to text. The *origin*, *relativize*, and any other keyword arguments are passed to the RRset ``to_wire()`` method. Returns a ``str``. zid %d z opcode %s z rcode %s z flags %s rzedns %s z eflags %s z payload %d z option %s ú;Ú Néÿÿÿÿ)ÚioÚStringIOÚwriter:r<ÚopcoderXÚrcoder=ÚednsÚ ednsflagsZ edns_to_textÚpayloadÚoptionsÚ _section_enumÚ __members__ÚitemsÚsection_from_numberÚgetvalue) rrFrZr[Úsr?ÚnameÚwhichÚrrsetrrrrXÏs$   zMessage.to_textcCs„t|tƒsdS|j|jkrdS|j|jkr.dSt|jƒD]F\}}|j|}|D]}||vrNdSqN|D]}||vrhdSqhq8dS)z›Two messages are equal if they have the same content in the header, question, answer, and authority sections. Returns a ``bool``. FT)Ú isinstancer8r:r=Ú enumerater>)rÚotherÚiÚsectionZ other_sectionÚnrrrÚ__eq__õs      zMessage.__eq__cCs | |¡ Sr)rw)rrsrrrÚ__ne__ szMessage.__ne__)rsrLcCsÂ|jtjj@dks:|j|jks:tj |j¡tj |j¡kr>dS| ¡tjjtjjtjj tjj hvrtt |j ƒdkrtdStj  |j¡r†dS|j D]}||j vrŒdSqŒ|j D]}||j vr¨dSq¨dS)zuIs *other*, also a ``dns.message.Message``, a response to this message? Returns a ``bool``. rFT)r=r<ÚQRr:rbÚ from_flagsrcZFORMERRZSERVFAILZNOTIMPZREFUSEDÚlenrNZ is_update)rrsrvrrrÚ is_responses0ÿ þýü     zMessage.is_response)rurLcCs6t|jƒD]\}}||ur | |¡Sq tdƒ‚dS)z÷Return the "section number" of the specified section for use in indexing. *section* is one of the section attributes of this message. Raises ``ValueError`` if the section isn't known. Returns an ``int``. zunknown sectionN)rrr>rhÚ ValueError)rrurtZ our_sectionrrrÚsection_number5s zMessage.section_number)ÚnumberrLcCs|j |¡}|j|S)aReturn the section list associated with the specified section number. *number* is a section number `int` or the text form of a section name. Raises ``ValueError`` if the section isn't known. Returns a ``list``. )rhÚmaker>)rrrurrrrkEs zMessage.section_from_numberF) rurnÚrdclassÚrdtypeÚcoversÚdeletingÚcreateÚ force_uniqueÚ idna_codecrLc Cs>t|tƒr|} | | ¡}n,t|tƒr<|j |¡} | | ¡}n | |¡} t|tƒr`tjj|| d�}tj j   |¡}tj j   |¡}tj j   |¡}|dur tj j   |¡}| |||||f} |sü|jdurØ|j | ¡} | durü| Sn$|D]} |  |||||¡rÜ| SqÜ|�st‚tj |||||¡} | | ¡|jdu�r:| |j| <| S)a†Find the RRset with the given attributes in the specified section. *section*, an ``int`` section number, a ``str`` section name, or one of the section attributes of this message. This specifies the the section of the message to search. For example:: my_message.find_rrset(my_message.answer, name, rdclass, rdtype) my_message.find_rrset(dns.message.ANSWER, name, rdclass, rdtype) my_message.find_rrset("ANSWER", name, rdclass, rdtype) *name*, a ``dns.name.Name`` or ``str``, the name of the RRset. *rdclass*, an ``int`` or ``str``, the class of the RRset. *rdtype*, an ``int`` or ``str``, the type of the RRset. *covers*, an ``int`` or ``str``, the covers value of the RRset. The default is ``dns.rdatatype.NONE``. *deleting*, an ``int``, ``str``, or ``None``, the deleting value of the RRset. The default is ``None``. *create*, a ``bool``. If ``True``, create the RRset if it is not found. The created RRset is appended to *section*. *force_unique*, a ``bool``. If ``True`` and *create* is also ``True``, create a new RRset regardless of whether a matching RRset exists already. The default is ``False``. This is useful when creating DDNS Update messages, as order matters for them. *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA encoder/decoder. If ``None``, the default IDNA 2003 encoder/decoder is used. Raises ``KeyError`` if the RRset was not found and create was ``False``. Returns a ``dns.rrset.RRset object``. ©r‡N)rqr6rkÚstrrhÚ from_textr~r<rnÚ rdatatypeÚ RdataTyper€Ú rdataclassÚ RdataClassrHÚgetZ full_matchÚKeyErrorrpÚRRsetÚappend) rrurnr�r‚rƒr„r…r†r‡r~ÚkeyrprrrÚ find_rrsetTs<4             zMessage.find_rrsetc Cs:z| ||||||||| ¡ } Wnty4d} Yn0| S)ajGet the RRset with the given attributes in the specified section. If the RRset is not found, None is returned. *section*, an ``int`` section number, a ``str`` section name, or one of the section attributes of this message. This specifies the the section of the message to search. For example:: my_message.get_rrset(my_message.answer, name, rdclass, rdtype) my_message.get_rrset(dns.message.ANSWER, name, rdclass, rdtype) my_message.get_rrset("ANSWER", name, rdclass, rdtype) *name*, a ``dns.name.Name`` or ``str``, the name of the RRset. *rdclass*, an ``int`` or ``str``, the class of the RRset. *rdtype*, an ``int`` or ``str``, the type of the RRset. *covers*, an ``int`` or ``str``, the covers value of the RRset. The default is ``dns.rdatatype.NONE``. *deleting*, an ``int``, ``str``, or ``None``, the deleting value of the RRset. The default is ``None``. *create*, a ``bool``. If ``True``, create the RRset if it is not found. The created RRset is appended to *section*. *force_unique*, a ``bool``. If ``True`` and *create* is also ``True``, create a new RRset regardless of whether a matching RRset exists already. The default is ``False``. This is useful when creating DDNS Update messages, as order matters for them. *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA encoder/decoder. If ``None``, the default IDNA 2003 encoder/decoder is used. Returns a ``dns.rrset.RRset object`` or ``None``. N)r”r�) rrurnr�r‚rƒr„r…r†r‡rprrrÚ get_rrset©s3÷  zMessage.get_rrsetcCsŠt|tƒr|}| |¡}n,t|tƒr<|j |¡}| |¡}n | |¡}tdd„|Dƒƒ}|tj kr†|j durt|d7}|j dur†|d7}|S)a²Returns the number of records in the specified section. *section*, an ``int`` section number, a ``str`` section name, or one of the section attributes of this message. This specifies the the section of the message to count. For example:: my_message.section_count(my_message.answer) my_message.section_count(dns.message.ANSWER) my_message.section_count("ANSWER") css|]}tdt|ƒƒVqdS)r&N)Úmaxr{)Ú.0ZrrsrrrÚ r;z(Message.section_count..Nr&) rqr6rkr‰rhrŠr~Úsumr%r/r?rC)rrur~ÚcountrrrÚ section_countìs         zMessage.section_countcCsJ|js dSd}|jdjD]}| ¡}|t|ƒd7}q|jrF|d7}|S)z:Compute the size required for the OPT RR, padding excludedré é)r?rgÚto_wirer{rA)rÚsizeÚoptionÚwirerrrÚ_compute_opt_reserveszMessage._compute_opt_reservecCs*|js dSt ¡}|j |¡t| ¡ƒS)z)Compute the size required for the TSIG RRr)rCr_ÚBytesIOržr{rl)rÚfrrrÚ_compute_tsig_reserves  zMessage._compute_tsig_reserver)rFÚmax_sizeÚmultirGÚprepend_lengthÚprefer_truncationr[rLc Ks0|dur|jdur|j}|dkr6|jdkr2|j}nd}|dkrDd}n |dkrPd}tj |j|j||¡}| ¡} | | ¡|  ¡} | | ¡z�|j D]} |  | j | j | j¡q’|jD]} |jtjj| fi|¤Žq²|jD]} |jtjj| fi|¤ŽqÖ|jD]} |jtjj| fi|¤ŽqúWnDtjj�y^|�rX|jtjjk�rZ|jtjjO_n‚Yn0| ¡|jdu�rˆ| |j|j| | ¡| ¡|jdu�r tj  | !¡|j"|jdt#t$ $¡ƒ|j%||¡\} } |j &¡|j '| ¡| tjj|j¡| ¡|�r | |_(| !¡}|�r,t)|ƒ *dd¡|}|S)a�Return a string containing the message in DNS compressed wire format. Additional keyword arguments are passed to the RRset ``to_wire()`` method. *origin*, a ``dns.name.Name`` or ``None``, the origin to be appended to any relative names. If ``None``, and the message has an origin attribute that is not ``None``, then it will be used. *max_size*, an ``int``, the maximum size of the wire format output; default is 0, which means "the message's request payload, if nonzero, or 65535". *multi*, a ``bool``, should be set to ``True`` if this message is part of a multiple message sequence. *tsig_ctx*, a ``dns.tsig.HMACTSig`` or ``dns.tsig.GSSTSig`` object, the ongoing TSIG context, used when signing zone transfers. *prepend_length*, a ``bool``, should be set to ``True`` if the caller wants the message length prepended to the message itself. This is useful for messages sent over TCP, TLS (DoT), or QUIC (DoQ). *prefer_truncation*, a ``bool``, should be set to ``True`` if the caller wants the message to be truncated if it would otherwise exceed the maximum length. If the truncation occurs before the additional section, the TC bit will be set. Raises ``dns.exception.TooBig`` if *max_size* was exceeded. Returns a ``bytes``. Nriÿÿir'Zbig)+rFr@r<ZrendererZRendererr:r=r¢Zreserver¥rNZ add_questionrnr‚r�rRZ add_rrsetr-rSr.rTr/r3ZTooBigruÚTCZrelease_reservedr?Zadd_optrAZ write_headerrCÚsignZget_wirerBr6rJrDÚclearÚaddrGr{Úto_bytes)rrFr¦r§rGr¨r©r[ÚrZ opt_reserveZ tsig_reserverpZnew_tsigÚctxr¡rrrrž(sj,          ù  zMessage.to_wirec Cs8tjjj tjjtjj|||||||¡ }tj |d|¡SrO)r<ÚrdtypesÚANYÚTSIGr�r‹rpÚ from_rdata) ÚkeynameÚ algorithmZ time_signedÚfudgeÚmacÚ original_idÚerrorrsrCrrrÚ _make_tsigŒs ÷ zMessage._make_tsigé,r;)rBrµr·r¹Ú tsig_errorÚ other_datar¶rLc CsÀt|tjjƒr|}|j}n`t|ƒr.|||ƒ}nLt|tƒrDtj |¡}|durXtt |ƒƒ}||}t|t ƒrztj |||¡}||_ |durŽ|j }|  ||j jd|dtjj|j j|||¡|_dS)a�When sending, a TSIG signature using the specified key should be added. *key*, a ``dns.tsig.Key`` is the key to use. If a key is specified, the *keyring* and *algorithm* fields are not used. *keyring*, a ``dict``, ``callable`` or ``dns.tsig.Key``, is either the TSIG keyring or key to use. The format of a keyring dict is a mapping from TSIG key name, as ``dns.name.Name`` to ``dns.tsig.Key`` or a TSIG secret, a ``bytes``. If a ``dict`` *keyring* is specified but a *keyname* is not, the key used will be the first key in the *keyring*. Note that the order of keys in a dictionary is not defined, so applications should supply a keyname when a ``dict`` keyring is used, unless they know the keyring contains only one key. If a ``callable`` keyring is specified, the callable will be called with the message and the keyname, and is expected to return a key. *keyname*, a ``dns.name.Name``, ``str`` or ``None``, the name of this TSIG key to use; defaults to ``None``. If *keyring* is a ``dict``, the key must be defined in it. If *keyring* is a ``dns.tsig.Key``, this is ignored. *fudge*, an ``int``, the TSIG time fudge. *original_id*, an ``int``, the TSIG original id. If ``None``, the message's id is used. *tsig_error*, an ``int``, the TSIG error code. *other_data*, a ``bytes``, the TSIG other data. *algorithm*, a ``dns.name.Name`` or ``str``, the TSIG algorithm to use. This is only used if *keyring* is a ``dict``, and the key entry is a ``bytes``. Nró)rqr<rCÚKeyrnÚcallabler‰rŠÚnextÚiterÚbytesrBr:r»r¶Z mac_sizes) rrBrµr·r¹r½r¾r¶r“rrrÚuse_tsig�s2/     øzMessage.use_tsigcCs|jr|jjSdSdSr)rCrnrrrrrµçszMessage.keynamecCs|jr|jdjSdSdSrO)rCr¶rrrrÚ keyalgorithmîs zMessage.keyalgorithmcCs|jr|jdjSdSdSrO)rCr¸rrrrr¸õs z Message.maccCs|jr|jdjSdSdSrO)rCrºrrrrr½üs zMessage.tsig_errorcCs t|jƒSr)ÚboolrCrrrrÚhad_tsigszMessage.had_tsigcCs4tjjj |tjj|pd¡}tj tjjt |ƒ|¡S)Nr) r<r±r²ÚOPTr‹rpr´rnÚrootr6)r=rfrgr?rrrÚ _make_optszMessage._make_opt)rdrerfr@rgrArLcCs”|dus|durd}n |dur"d}|dkr8d|_d|_nX|dM}||d>O}|durXg}| |||¡|_|durt|}||_|dkrŠtdƒ‚||_dS) a'Configure EDNS behavior. *edns*, an ``int``, is the EDNS level to use. Specifying ``None``, ``False``, or ``-1`` means "do not use EDNS", and in this case the other parameters are ignored. Specifying ``True`` is equivalent to specifying 0, i.e. "use EDNS0". *ednsflags*, an ``int``, the EDNS flag values. *payload*, an ``int``, is the EDNS sender's payload field, which is the maximum size of UDP datagram the sender can handle. I.e. how big a response to this message can be. *request_payload*, an ``int``, is the EDNS payload size to use when sending this message. If not specified, defaults to the value of *payload*. *options*, a list of ``dns.edns.Option`` objects or ``None``, the EDNS options. *pad*, a non-negative ``int``. If 0, the default, do not pad; otherwise add padding bytes to make the message size a multiple of *pad*. Note that if padding is non-zero, an EDNS PADDING option will always be added to the message. NFr^Trlÿ~r7zpad must be non-negative)r?r@rËr}rA)rrdrerfr@rgrArrrÚuse_edns s$  zMessage.use_ednscCs|jr|jd@d?SdSdS)Niÿr7r^)r?rerrrrrdAsz Message.ednscCs|jr|jjSdSdSrO)r?ÚttlrrrrreHszMessage.ednsflagscCs$|jr||j_n|r | |¡|_dSr)r?rÍrËrPrrrreOs cCs|jr|jdjSdSdSrO)r?rfrrrrrfVs zMessage.payloadcCs|jr|jdjSdSdS)Nrr)r?rgrrrrrg]s zMessage.options)ÚwantedrLcCs:|r|jtjjO_n|jr6|jttjjƒM_dS)a!Enable or disable 'DNSSEC desired' flag in requests. *wanted*, a ``bool``. If ``True``, then DNSSEC data is desired in the response, EDNS is enabled if required, and then the DO bit is set. If ``False``, the DO bit is cleared if EDNS is enabled. N)rer<r=ZDOr?r6)rrÎrrrÚ want_dnssecds zMessage.want_dnsseccCstj t|jƒt|jƒ¡S)zBReturn the rcode. Returns a ``dns.rcode.Rcode``. )r<rcrzr6r=rerrrrrcrsz Message.rcode)rcrLcCsLtj |¡\}}|jdM_|j|O_|jdM_|j|O_dS)zUSet the rcode. *rcode*, a ``dns.rcode.Rcode``, is the rcode to set. iðÿiÿÿÿN)r<rcÚto_flagsr=re)rrcÚvalueZevaluerrrÚ set_rcodeys zMessage.set_rcodecCstj t|jƒ¡S)zEReturn the opcode. Returns a ``dns.opcode.Opcode``. )r<rbrzr6r=rrrrrb„szMessage.opcode)rbrLcCs(|jdM_|jtj |¡O_dS)zZSet the opcode. *opcode*, a ``dns.opcode.Opcode``, is the opcode to set. iÿ‡N)r=r<rbrÐ)rrbrrrÚ set_opcode‹szMessage.set_opcodecCs|Srr)rrÑrrrÚ_get_one_rr_per_rrset“szMessage._get_one_rr_per_rrsetcCs ||ddfS)NFr)rrurnr�r‚rrrÚ_parse_rr_header™szMessage._parse_rr_headercCsl|tjjkr.|tjks(|js(|tjjkr`t‚n2|tjj kr`|tjks\|tjj ks\||dkr`t ‚||ddfS)Nr&F) r<r‹rÉr%r/r?rnrÊrr³r²r)rruršZpositionrnr�r‚rrrÚ_parse_special_rr_headeržs" ÿþ ý ÿ þ ýz Message._parse_special_rr_header)N)NT)NrFNFF)T)Mr r r r r%rhrr6rÚpropertyrr<rpr‘rNÚsetterrRrSrTrWrYrnÚNamerÇrr‰rrXrwrxr|r~rkr‹ÚNONEÚ SectionTyper�rŽrŒÚ IDNACodecr”r•r›r¢r¥rÄržÚ staticmethodr»rCZdefault_algorithmrrÅrµrÆr¸r½rÈÚDEFAULT_EDNS_PAYLOADrËrdÚOptionrÌrerfrrgrÏrcZRcoderÒrbZOpcoderÓrÔrÕrÖrrrrr8Œs,    ý  û &&ö  õ [ö   õ Cù  ÷ d ø÷ Jùø 5  r8c@s8eZdZdZejjeejj e e ejj dœdd„Z dS)ÚChainingResulta½The result of a call to dns.message.QueryMessage.resolve_chaining(). The ``answer`` attribute is the answer RRSet, or ``None`` if it doesn't exist. The ``canonical_name`` attribute is the canonical name after all chaining has been applied (this is the same name as ``rrset.name`` in cases where rrset is not ``None``). The ``minimum_ttl`` attribute is the minimum TTL, i.e. the TTL to use if caching the data. It is the smallest of all the CNAME TTLs and either the answer TTL if it exists or the SOA TTL and SOA minimum values for negative answers. The ``cnames`` attribute is a list of all the CNAME RRSets followed to get to the canonical name. ©Úcanonical_namerRÚ minimum_ttlÚcnamescCs||_||_||_||_dSrrá)rrârRrãrärrrrÃszChainingResult.__init__N) r r r r r<rnrÙrrpr‘r6rrrrrrrà°s   ûràc@s,eZdZedœdd„Zejjdœdd„ZdS)Ú QueryMessagerKc Csð|jtjj@dkrt‚t|jƒdkr,tjj‚|jd}|j}tj j }d}d}g}|t k�r(z,|  |j ||j|j¡}t||j ƒ}W�q(WqPt�y$|jtjjk�rzT|  |j ||jtjj¡}| |¡t||j ƒ}|D]}|j}qêqÚ|d7}WYqPWnt�yYY�q(Yn0nY�q(YqP0qP|t k�r6t‚| ¡tjjk�rV|du�rVt‚|du�râ|} z6|  |j| |jtjj¡} t|| j | djƒ}W�qâWnBt�yÜz |  ¡} Wn tjj�yÖYY�qâYn0Yn0�qdt||||ƒS)aàFollow the CNAME chain in the response to determine the answer RRset. Raises ``dns.message.NotQueryResponse`` if the message is not a response. Raises ``dns.message.ChainTooLong`` if the CNAME chain is too long. Raises ``dns.message.AnswerForNXDOMAIN`` if the rcode is NXDOMAIN but an answer was found. Raises ``dns.exception.FormError`` if the question count is not 1. Returns a ChainingResult object. rr&N) r=r<ryr!r{rNr3Ú FormErrorrnrÍZMAX_TTLÚ MAX_CHAINr”rRr�r‚Úminr�r‹ZCNAMEr’Útargetr"rcZNXDOMAINr#rSÚSOAZminimumÚparentZNoParentrà) rrNÚqnameZmin_ttlrRršräZcrrsetÚrdZaunameZsrrsetrrrÚresolve_chainingÑsf  ÿ  ÿ     ÿ  zQueryMessage.resolve_chainingcCs | ¡jS)aµReturn the canonical name of the first name in the question section. Raises ``dns.message.NotQueryResponse`` if the message is not a response. Raises ``dns.message.ChainTooLong`` if the CNAME chain is too long. Raises ``dns.message.AnswerForNXDOMAIN`` if the rcode is NXDOMAIN but an answer was found. Raises ``dns.exception.FormError`` if the question count is not 1. )rîrârrrrrâszQueryMessage.canonical_nameN) r r r ràrîr<rnrÙrârrrrråÐsKråcCs ddl}dSrO)Z dns.update)r<rrrÚ_maybe_import_update-srïcCs2|tjjkrtS|tjjkr*tƒtjjStSdSr) r<rbÚQUERYråZUPDATErïÚupdateZ UpdateMessager8)rbrrrÚ_message_factory_from_opcode6s   ròc@s:eZdZdZddd„Zdd„Zdd „Zd d „Zd d „ZdS)Ú _WireReaderaiWire format reader. parser: the binary parser message: The message object being built initialize_message: Callback to set message parsing options question_only: Are we only reading the question? one_rr_per_rrset: Put each RR into its own RRset? keyring: TSIG keyring ignore_trailing: Ignore trailing junk at end of request? multi: Is this message part of a multi-message sequence? DNS dynamic updates. continue_on_error: try to extract as much information as possible from the message, accumulating MessageErrors in the *errors* attribute instead of raising them. FNc CsHtj |¡|_d|_||_||_||_||_||_ ||_ ||_ g|_ dSr) r<r¡ZParserÚparserrÚinitialize_messageÚ question_onlyÚone_rr_per_rrsetÚignore_trailingrBr§Úcontinue_on_errorrI) rr¡rõrör÷rørBr§rùrrrrQs z_WireReader.__init__c Cs~|jdusJ‚|jj|}t|ƒD]V}|j |jj¡}|j d¡\}}|j ||||¡\}}}}|jj||||ddd�q"dS)zhRead the next *qcount* records from the wire data and add them to the question section. Nz!HHT©r…r†) rr>ÚrangerôÚget_namerFÚ get_structrÕr”)rr~ÚqcountruÚ_rìr‚r�rrrÚ _get_questiongs  ÿ  ÿz_WireReader._get_questioncCs|j t||jjƒ¡dSr)rIr’r1rôÚcurrent)rÚerrrÚ _add_errorwsz_WireReader._add_errorc Csü|jdusJ‚|jj|}|j}t|ƒD�]Ì}|jj}|j ¡}|jjdur\| |jj¡}n|}|j  d¡\} } } } | t j j t j j fvr¨|j ||||| | ¡\} } } }n|j ||| | ¡\} } } }|jj}�zÜ|rð| dkrât jj‚d}t j j}nN|j | ¡�(t j | | |j|jj¡}Wdƒn1�s,0Y| ¡}|jj�rZ| t j jk�rZd}| t j j k�r€t j || |¡|j_�n&| t j j k�rh|jdu�r¢tdƒ‚t|jtƒ�rÜ|j  |¡}t|t!ƒ�rþt j" #|||j$¡}n"t%|jƒ�rø| |j|¡}n|j}|du�rtd|ƒ‚||j_t j" &|jj'|||t(t) )¡ƒ|jj*||jj+|j,¡ |j_+t j |d|¡|j_"n>|j -||| | || d|¡}|du�r¦| dk�ršd} | .|| ¡Wq(t/�yô}z2|j0�rÞ| 1|¡|j 2|| ¡n‚WYd}~q(d}~00q(dS)zâRead the next I{count} records from the wire data and add them to the specified section. section_number: the section of the message to which to add records count: the number of records to read Nz!HHIHrTz"got signed message without keyringzkey '%s' unknowniÿÿÿ)3rr>r÷rûrôrrürFrZrýr<r‹rÉr³rÖrÕr3rærÚZ restrict_toÚrdataZfrom_wire_parserrƒrErêrpr´r?rBrrqÚdictr�rÄrCrÀr¶rÁZvalidater¡r6rJrDrGr§r”r­r5rùrÚseek)rr~ršrur†rtZrr_startZ absolute_namernr‚r�rÍZrdlenr„ÚemptyZ rdata_startrírƒr“rprrrrÚ _get_sectionzs¦    ÿûü ÿ  ÿ$       ÷ ø   z_WireReader._get_sectionc Cs@|j ¡dkrt‚|j d¡\}}}}}}ttj |¡ƒ}||d�|_tj   |¡|j_ |  |j¡|j  |j ¡|_ zŠ| tj|¡|jr�|jWS| tj|¡| tj|¡| tj|¡|jsÒ|j ¡dkrÒt‚|jrú|jjrú|jjsú|jj |jj¡Wn<t�y8}z"|j�r"| |¡n‚WYd}~n d}~00|jS)zNRead a wire format DNS message and build a dns.message.Message object.é z!HHHHHHr9rN) rôZ remainingrrýròr<rbrzrr=ÚFlagrõrÔr÷rr%r,rörr-r.r/rørr§rGrÈrñr¡r5rùr) rr:r=rþZancountZaucountZadcountÚfactoryrrrrÚreadÚs8ÿ  ÿ z_WireReader.read)FFFNFF) r r r r rrrrr rrrrró@s÷ `rór;F) r¡rBrDrErFrGr§rör÷røÚraise_on_truncationrùrLc  s®ˆdur d‰‡‡‡‡fdd„} t|| ||| ||| ƒ} z |  ¡}Wn@tjjy€| jrz| jjtjj@rz| rzt| jd�‚n‚Yn0|jtjj@rž| ržt|d�‚| rª| j |_ |S)a×Convert a DNS wire format message into a message object. *keyring*, a ``dns.tsig.Key`` or ``dict``, the key or keyring to use if the message is signed. *request_mac*, a ``bytes`` or ``None``. If the message is a response to a TSIG-signed request, *request_mac* should be set to the MAC of that request. *xfr*, a ``bool``, should be set to ``True`` if this message is part of a zone transfer. *origin*, a ``dns.name.Name`` or ``None``. If the message is part of a zone transfer, *origin* should be the origin name of the zone. If not ``None``, names will be relativized to the origin. *tsig_ctx*, a ``dns.tsig.HMACTSig`` or ``dns.tsig.GSSTSig`` object, the ongoing TSIG context, used when validating zone transfers. *multi*, a ``bool``, should be set to ``True`` if this message is part of a multiple message sequence. *question_only*, a ``bool``. If ``True``, read only up to the end of the question section. *one_rr_per_rrset*, a ``bool``. If ``True``, put each RR into its own RRset. *ignore_trailing*, a ``bool``. If ``True``, ignore trailing junk at end of the message. *raise_on_truncation*, a ``bool``. If ``True``, raise an exception if the TC bit is set. *continue_on_error*, a ``bool``. If ``True``, try to continue parsing even if errors occur. Erroneous rdata will be ignored. Errors will be accumulated as a list of MessageError objects in the message's ``errors`` attribute. This option is recommended only for DNS analysis tools, or for use in a server as part of an error handling path. The default is ``False``. Raises ``dns.message.ShortHeader`` if the message is less than 12 octets long. Raises ``dns.message.TrailingJunk`` if there were octets in the message past the end of the proper DNS message, and *ignore_trailing* is ``False``. Raises ``dns.message.BadEDNS`` if an OPT record was in the wrong section, or occurred more than once. Raises ``dns.message.BadTSIG`` if a TSIG record was not the last record of the additional data section. Raises ``dns.message.Truncated`` if the TC flag is set and *raise_on_truncation* is ``True``. Returns a ``dns.message.Message``. Nr;csˆ|_ˆ|_ˆ|_ˆ|_dSr)rDrErFrG©r©rFrDrGrErrrõFsz%from_wire..initialize_messager) rór r<r3rærr=rªrrI)r¡rBrDrErFrGr§rör÷rør rùrõÚreaderÚmrrrÚ from_wireýs:Fø  ÿþý rc@sBeZdZdZddd„Zdd„Zd d „Zd d „Zd d„Zdd„Z dS)Ú _TextReaderatText format reader. tok: the tokenizer. message: The message object being built. DNS dynamic updates. last_name: The most recently read name when building a message object. one_rr_per_rrset: Put each RR into its own RRset? origin: The origin for relative names relativize: relativize names? relativize_to: the origin to relativize to. FNTcCshd|_tjj||d�|_d|_||_||_||_||_ d|_ d|_ d|_ t |_d|_tjj|_d|_dS)Nrˆr^r)rr<Z tokenizerÚ TokenizerÚtokÚ last_namer÷rFrZÚ relativize_tor:rdrerÞrfrcrbrðr=)rÚtextr‡r÷rFrZrrrrrxs  z_TextReader.__init__cCs€|j ¡}|j}|dkr(|j ¡|_�nJ|dkrl|j ¡}| ¡sP|j |¡qh|jtj  |j¡B|_q0�n|dkr”|j ¡|_ |j |j d>B|_ nÞ|dkræ|j dkr¬d|_ |j ¡}| ¡sÌ|j |¡qä|j tj  |j¡B|_ q¬nŒ|dk�r|j ¡|_ |j dk�rrd|_ nb|dk�rJ|j ¡}tj  |¡|_|jtj |j¡B|_n(|d k�rn|j ¡}tj  |¡|_nt‚|j ¡d S) z5Process one line from the text format header section.r:r=rdr7ZeflagsrrfrbrcN)rr�rÑZget_intr:Ú is_identifierÚungetr=r<rŠrdreZedns_from_textrfZ get_stringrbrÐrcrÚget_eol)rrÿÚtokenZwhatrrrrÚ _header_line�sD              z_TextReader._header_linecCs|jj|}|jjdd�}| ¡s>|j ||jj|j|j¡|_ |j }|durPt ‚|j ¡}|  ¡sjt j j‚z,t j |j¡}|j ¡}|  ¡s”t j j‚Wn6t j jy´t j j‚YntyÌt jj}Yn0t j |j¡}|j ||||¡\}}}}|jj||||ddd�|j ¡dS)z7Process one line from the text format question section.T©Z want_leadingNrú)rr>rr�Ú is_whitespaceÚas_namerFrZrrr$rr<r3Ú SyntaxErrorr�rŠrÑr5ÚINr‹rÕr”r)rr~rurrnr�r‚rÿrrrÚ_question_line¹s: ÿ     ÿ  ÿz_TextReader._question_linec Cs|jj|}|jjdd�}| ¡s>|j ||jj|j|j¡|_ |j }|durPt ‚|j ¡}|  ¡sjt j j‚z*t|jdƒ}|j ¡}|  ¡s’t j j‚Wn2t j jy²t j j‚YntyÆd}Yn0z,t j |j¡}|j ¡}|  ¡sòt j j‚Wn:t j j�yt j j‚Ynt�y.t jj}Yn0t j |j¡}|j ||||¡\}}}} |j ¡}| �rz| ¡�szt j j‚| �s’| ¡�r’t j j‚| ¡�sÒ|j |¡t j |||j|jj|j|j¡} |  ¡} n d} t jj} |j ||||| |d|j¡} | du�r|  | |¡dS)zfProcess one line from the text format answer, authority, or additional data sections. TrNr) rr>rr�rr rFrZrrr$rr<r3r!r6rÑr5r�rŠr"r‹rÕÚ is_eol_or_eofZ UnexpectedEndrrrƒrÚr”r÷r­) rr~rurrnrÍr�r‚r„rrírƒrprrrÚ_rr_lineÜs€ ÿ          ÿ    ú ø z_TextReader._rr_linecCs`t|jƒ}||jd�}|j|_|jdkr<| |j|j|j¡|jrN|  |j¡|j r\|j |_ |S)Nr9r) ròrbr:r=rdrÌrerfrcrÒrF)rr rrrrÚ _make_message's    z_TextReader._make_messagecCsæ|j}d}|j dd¡}| ¡r"qÐ| ¡rº|j ¡}|dkrB|j}|jrP|j}n| ¡}zB|j   |¡}|js€||_|  |j ¡|_ |t jkr’|j}n|j}Wnty¬Yn0|j ¡q |j |¡||ƒq |jsà| ¡|_|jS)zNRead a text format DNS message and build a dns.message.Message object.NTZHEADER)rrr�r$Z is_commentrÑÚupperrr&rhrŠrÔr÷r%r,r#r%r5rr)rZ line_methodr~rÚurrrrr 3s>  ÿ       z_TextReader.read)FNTN) r r r r rrr#r%r&r rrrrrksù )#K rT)rr‡r÷rFrZrrLcCst||||||ƒ}| ¡S)aConvert the text format message into a message object. The reader stops after reading the first blank line in the input to facilitate reading multiple messages from a single file with ``dns.message.from_file()``. *text*, a ``str``, the text format message. *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA encoder/decoder. If ``None``, the default IDNA 2003 encoder/decoder is used. *one_rr_per_rrset*, a ``bool``. If ``True``, then each RR is put into its own rrset. The default is ``False``. *origin*, a ``dns.name.Name`` (or ``None``), the origin to use for relative names. *relativize*, a ``bool``. If true, name will be relativized. *relativize_to*, a ``dns.name.Name`` (or ``None``), the origin to use when relativizing names. If not set, the *origin* value will be used. Raises ``dns.message.UnknownHeaderField`` if a header is unknown. Raises ``dns.exception.SyntaxError`` if the text is badly formed. Returns a ``dns.message.Message object`` )rr )rr‡r÷rFrZrrrrrrŠas* ÿrŠ)r¤r‡r÷rLcCsZt|tƒrt|ƒ}n t |¡}|�}t|||ƒWdƒS1sD0YdsVJ‚dS)a¬Read the next text format message from the specified file. Message blocks are separated by a single blank line. *f*, a ``file`` or ``str``. If *f* is text, it is treated as the pathname of a file to open. *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA encoder/decoder. If ``None``, the default IDNA 2003 encoder/decoder is used. *one_rr_per_rrset*, a ``bool``. If ``True``, then each RR is put into its own rrset. The default is ``False``. Raises ``dns.message.UnknownHeaderField`` if a header is unknown. Raises ``dns.exception.SyntaxError`` if the text is badly formed. Returns a ``dns.message.Message object`` NF)rqr‰ÚopenÚ contextlibÚ nullcontextrŠ)r¤r‡r÷ÚcmrrrÚ from_file‘s    *r-)rìr‚r�rÌrÏrerfr@rgr‡r:r=rArLc Csèt|tƒrtjj|| d�}tjj |¡}tjj  |¡}t | d�} tj   | ¡| _ | j | j|||ddd�i}|durz||d<|durŠ||d<|durš||d<|durª||d <|rº|durºd }||d <| |d <| jfi|¤Ž|  |¡| S) añMake a query message. The query name, type, and class may all be specified either as objects of the appropriate type, or as strings. The query will have a randomly chosen query id, and its DNS flags will be set to dns.flags.RD. qname, a ``dns.name.Name`` or ``str``, the query name. *rdtype*, an ``int`` or ``str``, the desired rdata type. *rdclass*, an ``int`` or ``str``, the desired rdata class; the default is class IN. *use_edns*, an ``int``, ``bool`` or ``None``. The EDNS level to use; the default is ``None``. If ``None``, EDNS will be enabled only if other parameters (*ednsflags*, *payload*, *request_payload*, or *options*) are set. See the description of dns.message.Message.use_edns() for the possible values for use_edns and their meanings. *want_dnssec*, a ``bool``. If ``True``, DNSSEC data is desired. *ednsflags*, an ``int``, the EDNS flag values. *payload*, an ``int``, is the EDNS sender's payload field, which is the maximum size of UDP datagram the sender can handle. I.e. how big a response to this message can be. *request_payload*, an ``int``, is the EDNS payload size to use when sending this message. If not specified, defaults to the value of *payload*. *options*, a list of ``dns.edns.Option`` objects or ``None``, the EDNS options. *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA encoder/decoder. If ``None``, the default IDNA 2003 encoder/decoder is used. *id*, an ``int`` or ``None``, the desired query id. The default is ``None``, which generates a random query id. *flags*, an ``int``, the desired query flags. The default is ``dns.flags.RD``. *pad*, a non-negative ``int``. If 0, the default, do not pad; otherwise add padding bytes to make the message size a multiple of *pad*. Note that if padding is non-zero, an EDNS PADDING option will always be added to the message. Returns a ``dns.message.QueryMessage`` rˆr9TrúNrerfr@rgrrdrA)rqr‰r<rnrŠr‹rŒr€r�rŽrår=r r”rNrÌrÏ)rìr‚r�rÌrÏrerfr@rgr‡r:r=rArrrrrÚ make_query´s.F    r.é r¼)ÚqueryÚrecursion_availableÚ our_payloadr·r½rArLc Csô|jtjj@rtj d¡‚t| ¡ƒ}||jd�}tjj|jtjj@B|_|r`|jtjj O_|  | ¡¡t |j ƒ|_ |j dkrÆ|dur°d}|jD]}|jtj jjkr–d}q–|jdd||j|d�|jrð| |j|j|d|d|j¡|j|_|S)aéMake a message which is a response for the specified query. The message returned is really a response skeleton; it has all of the infrastructure required of a response, but none of the content. The response's question section is a shallow copy of the query's question section, so the query's question RRsets should not be changed. *query*, a ``dns.message.Message``, the query to respond to. *recursion_available*, a ``bool``, should RA be set in the response? *our_payload*, an ``int``, the payload size to advertise in EDNS responses. *fudge*, an ``int``, the TSIG time fudge. *tsig_error*, an ``int``, the TSIG error. *pad*, a non-negative ``int`` or ``None``. If 0, the default, do not pad; otherwise if not ``None`` add padding bytes to make the message size a multiple of *pad*. Note that if padding is non-zero, an EDNS PADDING option will always be added to the message. If ``None``, add padding following RFC 8467, namely if the request is padded, pad the response to 468 otherwise do not pad. Returns a ``dns.message.Message`` object whose specific class is appropriate for the query. For example, if query is a ``dns.update.UpdateMessage``, response will be too. z&specified query message is not a queryr9rNiÔ)rAr;)r=r<ryr3ræròrbr:ÚRDZRArÓÚlistrNrdrgZotypeZ OptionTypeZPADDINGrÌrfrÈrÅrBrµrÆr¸rD) r0r1r2r·r½rAr Zresponser rrrÚ make_responses8$      ù r5) Nr;FNNFFFFFF)NFNTN)NF)Fr/r¼rN)[r r*r_rJÚtypingrrrrrrZdns.ednsr<Z dns.entropyZdns.enumZ dns.exceptionZ dns.flagsZdns.nameZ dns.opcodeZ dns.rcodeZ dns.rdataZdns.rdataclassZ dns.rdatatypeZdns.rdtypes.ANY.OPTZdns.rdtypes.ANY.TSIGZ dns.rendererZ dns.rrsetZdns.tsigZdns.ttlZdns.wirer3rærrZ DNSExceptionrrrrrr!r"r#r!r$ÚenumÚIntEnumr%r1rÞrçr6rnrÙr�rŽr‹rŒZ IndexKeyTyperpr‘Z IndexTyper‰rÛr8ràrårïròrórÄrÇrCZHMACTSigZGSSTSigrrrÜrŠr-r"r=r3rdrßr.r5r,r-r.r/rrrrÚs8    ûÿ* ]  @ô ó nyú   ù 2ý ü &ó ò dúù E