Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`names`.`dns`.`_OPTHeader``

class documentation

`class _OPTHeader(tputil.FancyStrMixin, tputil.FancyEqMixin): (source)`

Implements interfaces: `twisted.names.dns.IEncodable`

View In Hierarchy

An OPT record header.

See Also
`_OPTHeader.__init__` for documentation of other public instance attributes.
https://tools.ietf.org/html/rfc6891#section-6.1.2
Present Since
13.2

Class Method | `fromRRHeader` | A classmethod for constructing a new `_OPTHeader` from the attributes and payload of an existing `RRHeader` instance.
Method | `__init__` | No summary
Method | `decode` | Decode bytes into an `_OPTHeader` instance.
Method | `encode` | Encode this `_OPTHeader` instance to bytes.
Class Variable | `compareAttributes` | Undocumented
Class Variable | `showAttributes` | Undocumented
Instance Variable | `dnssecOK` | Undocumented
Instance Variable | `extendedRCODE` | Undocumented
Instance Variable | `options` | Undocumented
Instance Variable | `udpPayloadSize` | Undocumented
Instance Variable | `version` | Undocumented
Property | `name` | A readonly property for accessing the `name` attribute of this record.
Property | `type` | A readonly property for accessing the `type` attribute of this record.

Inherited from `FancyStrMixin`:

Method | `__str__` | Undocumented

Inherited from `FancyEqMixin` (via `FancyStrMixin`):

Method | `__eq__` | Undocumented
Method | `__ne__` | Undocumented

@classmethod
def fromRRHeader(cls, rrHeader): (source)

A classmethod for constructing a new `_OPTHeader` from the attributes and payload of an existing `RRHeader` instance.

Parameters
rrHeader:`RRHeader` | An `RRHeader` instance containing an `UnknownRecord` payload.
Returns
`_OPTHeader` | An instance of `_OPTHeader`.

def __init__(self, udpPayloadSize=4096, extendedRCODE=0, version=0, dnssecOK=False, options=None): (source)

Parameters
udpPayloadSize:`int` | The number of octets of the largest UDP payload that can be reassembled and delivered in the requestor's network stack.
extendedRCODE:`int` | Forms 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).
version:`int` | Indicates the implementation level of the setter. Full conformance with this specification is indicated by version `0`.
dnssecOK:`bool` | DNSSEC OK bit as defined by [RFC3225].
options:`list` | A `list` of 0 or more `_OPTVariableOption` instances.

def decode(self, strio, length=None): (source)
from `twisted.names.dns.IEncodable`

Decode bytes into an `_OPTHeader` instance.

Parameters
strio:file | Bytes will be read from this file until the full `_OPTHeader` is decoded.
length:`int` or `None` | Not used.

def encode(self, strio, compDict=None): (source)
from `twisted.names.dns.IEncodable`

Encode this `_OPTHeader` instance to bytes.

Parameters
strio:file | the byte representation of this `_OPTHeader` will be written to this file.
compDict:`dict` or `None` | A dictionary of backreference addresses that have already been written to this stream and that may be used for DNS name compression.

compareAttributes: `tuple[str, ...]` = (source)
overrides `twisted.python.util.FancyEqMixin.compareAttributes`

Undocumented

showAttributes = (source)
overrides `twisted.python.util.FancyStrMixin.showAttributes`

Undocumented

dnssecOK = (source)

Undocumented

extendedRCODE = (source)

Undocumented

options = (source)

Undocumented

udpPayloadSize = (source)

Undocumented

version = (source)

Undocumented

@property
name = (source)

A readonly property for accessing the `name` attribute of this record.

@property
type = (source)

A readonly property for accessing the `type` attribute of this record.