Show / Hide Table of Contents

Class OPTRecord

An extension mechanism for DNS (EDNS(0)).

Inheritance
Object
DnsObject
ResourceRecord
OPTRecord
Implements
IWireSerialiser
ICloneable
IPresentationSerialiser
Inherited Members
ResourceRecord.DefaultTTL
ResourceRecord.DefaultHostTTL
ResourceRecord.Name
ResourceRecord.CanonicalName
ResourceRecord.Type
ResourceRecord.Class
ResourceRecord.TTL
ResourceRecord.IsExpired(Nullable<DateTime>)
ResourceRecord.GetDataLength()
ResourceRecord.GetData()
ResourceRecord.Read(WireReader)
ResourceRecord.Write(WireWriter)
ResourceRecord.Equals(Object)
ResourceRecord.GetHashCode()
ResourceRecord.Write(PresentationWriter)
ResourceRecord.WriteData(PresentationWriter)
ResourceRecord.Read(String)
ResourceRecord.Read(PresentationReader)
ResourceRecord.ReadData(PresentationReader)
DnsObject.CreationTime
DnsObject.Length()
DnsObject.Clone()
DnsObject.Clone<T>()
DnsObject.Read(Byte[])
DnsObject.Read(Byte[], Int32, Int32)
DnsObject.Read(Stream)
DnsObject.ToByteArray()
DnsObject.Write(Stream)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Namespace: Makaretu.Dns
Assembly: Makaretu.Dns.dll
Syntax
public class OPTRecord : ResourceRecord, IWireSerialiser, ICloneable, IPresentationSerialiser
Remarks

An OPT record does not carry any DNS data. It is used only to contain control information pertaining to the question-and-answer sequence of a specific transaction. OPT RRs MUST NOT be cached, forwarded, or stored in or loaded from master files.

The OPTRecord can be present in the AdditionalRecords section.

note

The Class property is repurposed to specify the requestor's payload size.

note

The TTL property is repurposed to specify the Opcode8, Version and DO properties.

Constructors

| Improve this Doc View Source

OPTRecord()

Creates a new instance of the OPTRecord class.

Declaration
public OPTRecord()

Properties

| Improve this Doc View Source

DO

The DNSSEC OK bit as defined by RFC3225.

Declaration
public bool DO { get; set; }
Property Value
Type Description
Boolean

Defaults to false.

Remarks

The TTL property is repurposed to specify the version.

See Also
https://tools.ietf.org/html/rfc3225
| Improve this Doc View Source

Opcode8

The most significant 8 bits of the opcode.

Declaration
public byte Opcode8 { get; set; }
Property Value
Type Description
Byte

Defaults to zero.

Remarks

The TTL property is repurposed to specify the opcode's most significant bits.

See Also
Opcode
| Improve this Doc View Source

Options

The extended DNS options.

Declaration
public List<EdnsOption> Options { get; set; }
Property Value
Type Description
List<EdnsOption>

The EDNS option sequence.

| Improve this Doc View Source

RequestorPayloadSize

The maximimum packet size that can be received by the requestor.

Declaration
public ushort RequestorPayloadSize { get; set; }
Property Value
Type Description
UInt16

Specified in number of bytes. Defaults to 1280, which is reasonable over Ethernet.

Remarks

The Class property is repurposed to specify the requestor's payload size.

See Also
https://tools.ietf.org/html/rfc6891#section-6.2.3
| Improve this Doc View Source

Version

The EDNS version.

Declaration
public byte Version { get; set; }
Property Value
Type Description
Byte

Defaults to zero.

Remarks

The TTL property is repurposed to specify the version.

Methods

| Improve this Doc View Source

ReadData(WireReader, Int32)

Read the data that is specific to the resource record Type.

Declaration
public override void ReadData(WireReader reader, int length)
Parameters
Type Name Description
WireReader reader

The source of the resource record's data.

Int32 length

The length, in bytes, of the data.

Overrides
ResourceRecord.ReadData(WireReader, Int32)
Remarks

Derived classes must implement this method.

| Improve this Doc View Source

ToString()

Returns the textual representation.

Declaration
public override string ToString()
Returns
Type Description
String

The presentation format of this resource record.

Overrides
ResourceRecord.ToString()
| Improve this Doc View Source

WriteData(WireWriter)

Write the data that is specific to the resource record Type.

Declaration
public override void WriteData(WireWriter writer)
Parameters
Type Name Description
WireWriter writer

The destination for the DNS object's data.

Overrides
ResourceRecord.WriteData(WireWriter)
Remarks

Derived classes must implement this method.

Implements

IWireSerialiser
System.ICloneable
IPresentationSerialiser

See Also

https://tools.ietf.org/html/rfc6891
  • Improve this Doc
  • View Source
Back to top Generated by DocFX