Show / Hide Table of Contents

Class DnsQueryFactory

Provides extension methods around DnsMessage.

Inheritance
Object
DnsQueryFactory
Namespace: Ae.Dns.Protocol
Assembly: Ae.Dns.Protocol.dll
Syntax
public static class DnsQueryFactory : object

Methods

| Improve this Doc View Source

Clone(DnsHeader)

Declaration
public static DnsHeader Clone(DnsHeader header)
Parameters
Type Name Description
DnsHeader header
Returns
Type Description
DnsHeader
| Improve this Doc View Source

CreateQuery(String, DnsQueryType)

Create a DNS query using the specified host name and DNS query type.

Declaration
public static DnsMessage CreateQuery(string host, DnsQueryType type = default(DnsQueryType))
Parameters
Type Name Description
String host

The DNS host to request in the query.

DnsQueryType type

The type of DNS query to request.

Returns
Type Description
DnsMessage

The complete DNS query.

| Improve this Doc View Source

CreateReverseQuery(IPAddress)

Create a reverse DNS query which resolves an IP address to a host name.

Declaration
public static DnsMessage CreateReverseQuery(IPAddress ipAddress)
Parameters
Type Name Description
IPAddress ipAddress

The IPv4 or IPv6 address to resolve.

Returns
Type Description
DnsMessage

The correctly formatted PTR DNS query.

| Improve this Doc View Source

GenerateId()

Generate a unique ID to identify this DNS message.

Declaration
public static ushort GenerateId()
Returns
Type Description
UInt16

A random value.

| Improve this Doc View Source

TruncateAnswer(DnsMessage)

Declaration
public static DnsMessage TruncateAnswer(DnsMessage query)
Parameters
Type Name Description
DnsMessage query
Returns
Type Description
DnsMessage
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX