C# Class NetworkPackets.Dns.Question

Represents a Dns Question

Sadly the size of these can only be determined by parsing the entire packet.

It looks like this:

1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | QName / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | QType | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | QClass | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Inheritance: Brunet.DataPacket
ファイルを表示 Open project: pstjuste/brunet Class Usage Examples

Public Properties

Property Type Description
QClass DnsPacket.Classes
QName String
QNameBlob MemBlock
QType DnsPacket.Types

Public Methods

Method Description
Question ( MemBlock Data, int Start ) : Brunet

Constructor when parsing a Dns Query

Question ( String QName, DnsPacket QType, DnsPacket QClass ) : Brunet

Constructor when creating a Dns Query

Method Details

Question() public method

Constructor when parsing a Dns Query
public Question ( MemBlock Data, int Start ) : Brunet
Data MemBlock must pass in the entire packet from where the question begins, after parsing, can check Data.Length to find where next container begins.
Start int
return Brunet

Question() public method

Constructor when creating a Dns Query
public Question ( String QName, DnsPacket QType, DnsPacket QClass ) : Brunet
QName String the name of resource you are looking up, IP Address when QType = Ptr otherwise hostname
QType DnsPacket the type of look up to perform
QClass DnsPacket should always be IN
return Brunet

Property Details

QClass public_oe property

the network class
public DnsPacket.Classes QClass
return DnsPacket.Classes

QName public_oe property

string representation of the qname
public String QName
return String

QNameBlob public_oe property

the blob format for the qname
public MemBlock QNameBlob
return MemBlock

QType public_oe property

the query type
public DnsPacket.Types QType
return DnsPacket.Types