DnsMessage Class

Represents a unified DNS message used for both incoming queries and outgoing responses.

public sealed class DnsMessage

Constructors

NameDescription
DnsMessage()

DnsMessage()

DnsMessage.cs
public DnsMessage()

No documentation is available.

Properties

NameDescription
AdditionalRecordsGets the additional records section.
AnswersGets the answer section.
AuthenticatedDataGets or sets a value indicating whether the data has been authenticated (DNSSEC).
AuthoritiesGets the authority section.
CheckingDisabledGets or sets a value indicating whether checking is disabled (DNSSEC).
EdnsOptionsGets or sets the EDNS options. Null if EDNS is not used.
IdGets or sets the message identifier.
IsAuthoritativeGets or sets a value indicating whether this is an authoritative answer.
IsResponseGets or sets a value indicating whether this message is a response.
IsTruncatedGets or sets a value indicating whether the message was truncated.
OpCodeGets or sets the operation code.
QuestionsGets the question section.
RecursionAvailableGets or sets a value indicating whether recursion is available.
RecursionDesiredGets or sets a value indicating whether recursion is desired.
ResponseCodeGets or sets the response code.

AdditionalRecords

DnsMessage.cs

Gets the additional records section.

public IList<DnsResourceRecord> AdditionalRecords { get; }

Gets the answer section.

public IList<DnsResourceRecord> Answers { get; }

AuthenticatedData

DnsMessage.cs

Gets or sets a value indicating whether the data has been authenticated (DNSSEC).

public bool AuthenticatedData { get; set; }

Property value

bool

Authorities

DnsMessage.cs

Gets the authority section.

public IList<DnsResourceRecord> Authorities { get; }

CheckingDisabled

DnsMessage.cs

Gets or sets a value indicating whether checking is disabled (DNSSEC).

public bool CheckingDisabled { get; set; }

Property value

bool

EdnsOptions

DnsMessage.cs

Gets or sets the EDNS options. Null if EDNS is not used.

public DnsEdnsOptions? EdnsOptions { get; set; }

Property value

DnsEdnsOptions?

Gets or sets the message identifier.

public ushort Id { get; set; }

Property value

ushort

IsAuthoritative

DnsMessage.cs

Gets or sets a value indicating whether this is an authoritative answer.

public bool IsAuthoritative { get; set; }

Property value

bool

IsResponse

DnsMessage.cs

Gets or sets a value indicating whether this message is a response.

public bool IsResponse { get; set; }

Property value

bool

IsTruncated

DnsMessage.cs

Gets or sets a value indicating whether the message was truncated.

public bool IsTruncated { get; set; }

Property value

bool

Gets or sets the operation code.

public DnsOpCode OpCode { get; set; }

Property value

DnsOpCode

Questions

DnsMessage.cs

Gets the question section.

public IList<DnsQuestion> Questions { get; }

Property value

IList<DnsQuestion>

RecursionAvailable

DnsMessage.cs

Gets or sets a value indicating whether recursion is available.

public bool RecursionAvailable { get; set; }

Property value

bool

RecursionDesired

DnsMessage.cs

Gets or sets a value indicating whether recursion is desired.

public bool RecursionDesired { get; set; }

Property value

bool

ResponseCode

DnsMessage.cs

Gets or sets the response code.

public DnsResponseCode ResponseCode { get; set; }

Property value

DnsResponseCode