Domain Detective

API Reference

Class

DnsWire

Namespace DnsClientX

Provides serialization and deserialization helpers for DNS wire format messages.

Inheritance

  • Object
  • DnsWire

Methods

DecodeDNSKEYRecord(System.IO.BinaryReader reader, System.UInt16 rdLength) #

Decodes the dnskey record.

Parameters

reader System.IO.BinaryReader required
The reader.
rdLength System.UInt16 required
Length of the rd.
DecodeNSECRecord(System.IO.BinaryReader reader, System.Byte[] dnsMessage, System.UInt16 rdLength, System.Int64 messageStart) #

NSEC record data is structured as follows: - Next Domain Name: The next domain name in the zone. This is a DNS name which is encoded the same way as in other records. - Type Bit Maps: A variable-length field that contains a list of the types of records that exist for the next domain name. - The type bit maps are encoded as a series of windows, each of which contains a bitmap of the types of records that exist for the next domain name. - Each window contains a bitmap length byte followed by a bitmap of the types of records that exist for the next domain name. - The bitmap length byte is followed by a variable-length bitmap of the types of records that exist for the next domain name. - The bitmap length byte is a value from 0 to 32 that represents the number of bits in the bitmap. - The bitmap is a variable-length field that contains a list of the types of records that exist for the next domain name. - The types of records are encoded as a series of bit fields, each of which represents a type of record that exists for the next domain name. - The bit fields are encoded as a series of bytes, each of which contains a bitmap of the types of records that exist for the next domain name. - The bit fields are encoded from the most significant bit to the least significant bit, and from the most significant byte to the least significant byte. - The bit fields are encoded in network byte order. - The bit fields are encoded in the same way as the type bitmap in the NSEC3PARAM record. - The types of records are encoded as a series of bit fields, each of which represents a type of record that exists for the next domain name.

Parameters

reader System.IO.BinaryReader required
dnsMessage System.Byte[] required
rdLength System.UInt16 required
messageStart System.Int64 required
DecodeSOARecord(System.IO.BinaryReader reader, System.Byte[] dnsMessage, System.UInt16 rdLength, System.Int64 messageStart) #

The SOA record data is structured as follows: • MNAME: The domain name of the primary NS record for the zone.This is a DNS name which is encoded the same way as in other records. • RNAME: A domain name that represents the email address of the administrative contact for the zone. The "@" symbol is replaced with a dot. • SERIAL: A 32-bit integer in network byte order. • REFRESH: A 32-bit integer in network byte order. • RETRY: A 32-bit integer in network byte order. • EXPIRE: A 32-bit integer in network byte order. • MINIMUM: A 32-bit integer in network byte order.

Parameters

reader System.IO.BinaryReader required
dnsMessage System.Byte[] required
rdLength System.UInt16 required
messageStart System.Int64 required
DeserializeDnsWireFormat(System.Net.Http.HttpResponseMessage res, System.Boolean debug, System.Byte[] bytes) #

Deserializes the DNS wire format.

Parameters

res System.Net.Http.HttpResponseMessage required
The resource.
debug System.Boolean required
if set to true [debug].
bytes System.Byte[] required
The bytes.

Exceptions

  • DnsClientException – Response content is empty, can't parse as DNS wire format. or Not enough data in the stream to read the question. or Not enough data in the stream to read the answer. or Not enough data in the stream to read the authority. or Not enough data in the stream to read the additional. or
ProcessRecordData(System.Byte[] dnsMessage, System.Int32 recordStart, DnsClientX.DnsRecordType type, System.Byte[] rdata, System.UInt16 rdLength, System.Int64 messageStart) #

Processes the record data.

Parameters

dnsMessage System.Byte[] required
The DNS message.
recordStart System.Int32 required
The record start.
type DnsClientX.DnsRecordType required
The type.
rdata System.Byte[] required
The rdata.
rdLength System.UInt16 required
Length of the rd.
messageStart System.Int64 required
The message start.

Exceptions

  • DnsClientException – The record data for " + type + " is not long enough? " + ex.Message or Error processing record data for " + type + ": " + ex.Message
ReadExactAsync(System.IO.Stream arg1, System.Byte[] arg2, System.Int32 arg3, System.Int32 arg4, System.Threading.CancellationToken arg5) #

Helper to read exactly the requested number of bytes from a stream.

Parameters

arg1 System.IO.Stream required
arg2 System.Byte[] required
arg3 System.Int32 required
arg4 System.Int32 required
arg5 System.Threading.CancellationToken required
{{ include "footer" }}