t.n.d._OPTHeader(tputil.FancyStrMixin, tputil.FancyEqMixin, object) : class documentation

Part of twisted.names.dns View Source View In Hierarchy

An OPT record header.

@ivar name: The DNS name associated with this record. Since this
    is a pseudo record, the name is always an L{Name} instance
    with value b'', which represents the DNS root zone. This
    attribute is a readonly property.

@ivar type: The DNS record type. This is a fixed value of 41
    (C{dns.OPT} for OPT Record. This attribute is a readonly
    property.

@see: L{_OPTHeader.__init__} for documentation of other public
    instance attributes.

@see: L{https://tools.ietf.org/html/rfc6891#section-6.1.2}

@since: 13.2
Method __init__ No summary
Method name A readonly property for accessing the name attribute of this record.
Method type A readonly property for accessing the type attribute of this record.
Method encode Encode this _OPTHeader instance to bytes.
Method decode Decode bytes into an _OPTHeader instance.
Class Method fromRRHeader A classmethod for constructing a new _OPTHeader from the attributes and payload of an existing RRHeader instance.

Inherited from FancyStrMixin:

Method __str__ Undocumented

Inherited from FancyEqMixin:

Method __eq__ Undocumented
Method __ne__ Undocumented
def __init__(self, udpPayloadSize=4096, extendedRCODE=0, version=0, dnssecOK=False, options=None): (source)
ParameterspayloadThe number of octets of the largest UDP payload that can be reassembled and delivered in the requestor's network stack.
extendedRCODEForms the upper 8 bits of extended 12-bit RCODE (together with the 4 bits defined in [RFC1035]. Note that EXTENDED-RCODE value 0 indicates that an unextended RCODE is in use (values 0 through 15). (type: int)
versionIndicates the implementation level of the setter. Full conformance with this specification is indicated by version 0. (type: int)
dnssecOKDNSSEC OK bit as defined by [RFC3225]. (type: bool)
optionsA list of 0 or more _OPTVariableOption instances. (type: list)
@property
def name(self): (source)
A readonly property for accessing the name attribute of this record.
ReturnsThe DNS name associated with this record. Since this is a pseudo record, the name is always an Name instance with value b'', which represents the DNS root zone.
@property
def type(self): (source)
A readonly property for accessing the type attribute of this record.
ReturnsThe DNS record type. This is a fixed value of 41 (dns.OPT for OPT Record.
def encode(self, strio, compDict=None): (source)
Encode this _OPTHeader instance to bytes.
Parametersstriothe byte representation of this _OPTHeader will be written to this file. (type: file)
compDictA dictionary of backreference addresses that have have already been written to this stream and that may be used for DNS name compression. (type: dict or None)
def decode(self, strio, length=None): (source)
Decode bytes into an _OPTHeader instance.
ParametersstrioBytes will be read from this file until the full _OPTHeader is decoded. (type: file)
lengthNot used. (type: int or None)
@classmethod
def fromRRHeader(cls, rrHeader): (source)
A classmethod for constructing a new _OPTHeader from the attributes and payload of an existing RRHeader instance.
ParametersrrHeaderAn RRHeader instance containing an UnknownRecord payload. (type: RRHeader)
ReturnsAn instance of _OPTHeader. (type: _OPTHeader)
API Documentation for Twisted, generated by pydoctor at 2014-05-12 18:27:00.