a Me @sHddlZddlZddlZddlZddlZejjGdddejjZ dS)NcsTeZdZdZdgZfddZdddZdd d Zedd d Z e ddZ Z S)OPTz OPT recordoptionscs(t||dd}||||_dS)zInitialize an OPT rdata. *rdclass*, an ``int`` is the rdataclass of the Rdata, which is also the payload size. *rdtype*, an ``int`` is the rdatatype of the Rdata. *options*, a tuple of ``bytes`` cSst|tjjstd|S)Nzoption is not a dns.edns.option) isinstancednsednsZOption ValueError)optionr 7/usr/lib/python3.9/site-packages/dns/rdtypes/ANY/OPT.py as_option0szOPT.__init__..as_optionN)super__init__Z _as_tupler)selfrdclassrdtyperr  __class__r r r #s z OPT.__init__NFc Cs<|jD]0}|}|td|jt|||qdS)N!HH)rZto_wirewritestructpackotypelen)rfilecompressoriginZ canonicalizeoptZowirer r r _to_wire7s z OPT._to_wireTcKsddd|jDS)N css|]}|VqdS)N)to_text).0rr r r >zOPT.to_text..)joinr)rrZ relativizekwr r r r=sz OPT.to_textc Csng}|dkrb|d\}}||tj||}Wdn1sL0Y||q||||S)Nrr)Z remainingZ get_structZ restrict_torrZoption_from_wire_parserappend) clsrrparserrrrZolenrr r r from_wire_parser@s  , zOPT.from_wire_parsercCs|jS)z payload size)r)rr r r payloadJsz OPT.payload)NNF)NT)N) __name__ __module__ __qualname____doc__ __slots__r rr classmethodr(propertyr) __classcell__r r rr rs    r) rZdns.ednsrZ dns.exceptionZ dns.immutableZ dns.rdataZ immutableZrdataZRdatarr r r r s