DnsRequestContext Class

Provides context for a DNS request being handled.

public sealed class DnsRequestContext

Properties

NameDescription
ProtocolGets the transport protocol used for this request.
QueryGets the incoming DNS query message.
RemoteEndPointGets the remote endpoint of the client.

Gets the transport protocol used for this request.

public DnsServerProtocol Protocol { get; }

Property value

DnsServerProtocol

Gets the incoming DNS query message.

public DnsMessage Query { get; }

Property value

DnsMessage

RemoteEndPoint

DnsRequestContext.cs

Gets the remote endpoint of the client.

public EndPoint RemoteEndPoint { get; }

Property value

EndPoint

Methods

NameDescription
CreateResponse()Creates a response message pre-populated with the query's ID, questions, and standard response flags.

CreateResponse()

DnsRequestContext.cs

Creates a response message pre-populated with the query's ID, questions, and standard response flags.

public DnsMessage CreateResponse()

Returns

DnsMessage