Table of Contents

Class Request

Namespace
Ubiety.Dns.Core
Assembly
Ubiety.Dns.Core.dll

Represents a DNS request with associated header and questions.

public class Request
Inheritance
Request
Inherited Members

Remarks

The Request class provides functionality to create and manage DNS requests. It contains a header and a collection of questions that make up the DNS query.

Constructors

Request()

Initializes a new instance of the Request class.

public Request()

Remarks

The constructor sets up a default DNS request, initializing the header for a query and preparing the collection of questions.

Properties

Header

Gets the header information of the DNS request.

public Header Header { get; }

Property Value

Header

Remarks

The header contains metadata such as the query ID, flags, and counts for different sections of the DNS request or response. It is used to manage and track the state of the DNS operation.

Methods

AddQuestion(Question)

Adds a new question to the DNS request.

public void AddQuestion(Question question)

Parameters

question Question

The DNS question to be added to the request.

GetBytes()

Converts the DNS request, including its header and questions, into a byte array representation.

public byte[] GetBytes()

Returns

byte[]

A byte array containing the serialized form of the DNS request.