Table of Contents

Class DnsResource

Namespace
AppleTvControlLibrary.Discovery.Dns
Assembly
AppleTvControlLibrary.Discovery.dll

Represents a DNS resource record.

public sealed class DnsResource
Inheritance
DnsResource
Inherited Members

Remarks

Initializes a new instance of the DnsResource class.

Constructors

DnsResource(string, QueryType, ushort, uint, ushort, object)

Represents a DNS resource record.

public DnsResource(string qname, QueryType qtype, ushort qclass, uint ttl, ushort rdLength, object rd)

Parameters

qname string
qtype QueryType
qclass ushort
ttl uint
rdLength ushort
rd object

Remarks

Initializes a new instance of the DnsResource class.

Properties

QClass

Gets the record class.

public ushort QClass { get; }

Property Value

ushort

QName

Gets the record name.

public string QName { get; }

Property Value

string

QType

Gets the record type.

public QueryType QType { get; }

Property Value

QueryType

Rd

Gets the parsed RDATA. The runtime type depends on QType: a string for A/PTR, a Dictionary<TKey, TValue> of string to byte[] for TXT, a SrvRecord for SRV, or raw byte[] otherwise.

public object Rd { get; }

Property Value

object

RdLength

Gets the RDATA byte length as read from the wire.

public ushort RdLength { get; }

Property Value

ushort

Ttl

Gets the record time-to-live.

public uint Ttl { get; }

Property Value

uint

Methods

UnpackRead(DnsBufferReader)

Creates a DnsResource from data in a data stream.

public static DnsResource UnpackRead(DnsBufferReader buffer)

Parameters

buffer DnsBufferReader

The buffer to read from.

Returns

DnsResource

The parsed resource record.