C# Class NetworkPackets.Dns.Response

A response type is all the other blocks of data in a Dns packet after the question, they can be RR, AR, and NS types based upon the RData payload.

Represents a Response to a Dns Query.

1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | / Name / | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | Type | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | Class | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | Ttl | | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | RdLength | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| RData / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Inheritance: Brunet.DataPacket
Mostrar archivo Open project: pstjuste/brunet

Public Properties

Property Type Description
CacheFlush bool
Class DnsPacket.Classes
Name String
NameBlob MemBlock
RData String
RDataBlob MemBlock
RdLength short
Ttl int
Type DnsPacket.Types

Public Methods

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

Creates a response given the entire packet.

The entire packet must be given, because some name servers take advantage of pointers to reduce their size.

Response ( String Name, DnsPacket Type, DnsPacket Class, int Ttl, String RData ) : Brunet

Creates a response from the parameter fields with RData being a memory chunk. This is for regular dns which has no notion of caching.

Response ( string name, DnsPacket type, DnsPacket class_type, bool cache_flush, int ttl, String rdata ) : Brunet

Creates a response from the parameter fields with RData being a memory chunk. This is for MDns which supports caching

Method Details

Response() public method

Creates a response given the entire packet.
The entire packet must be given, because some name servers take advantage of pointers to reduce their size.
public Response ( MemBlock Data, int Start ) : Brunet
Data MemBlock The entire Dns packet.
Start int The starting position of the Response.
return Brunet

Response() public method

Creates a response from the parameter fields with RData being a memory chunk. This is for regular dns which has no notion of caching.
public Response ( String Name, DnsPacket Type, DnsPacket Class, int Ttl, String RData ) : Brunet
Name String The name resolved.
Type DnsPacket The query type.
Class DnsPacket The network type.
Ttl int How long to hold the result in the local dns cache.
RData String RData in String format.
return Brunet

Response() public method

Creates a response from the parameter fields with RData being a memory chunk. This is for MDns which supports caching
public Response ( string name, DnsPacket type, DnsPacket class_type, bool cache_flush, int ttl, String rdata ) : Brunet
name string
type DnsPacket
class_type DnsPacket
cache_flush bool
ttl int
rdata String
return Brunet

Property Details

CacheFlush public_oe property

Cache flush, not used for Dns only MDns
public bool CacheFlush
return bool

Class public_oe property

type of network
public DnsPacket.Classes Class
return DnsPacket.Classes

Name public_oe property

the name rdata resolves as a string.
public String Name
return String

NameBlob public_oe property

the name rdata resolves as a memblock.
public MemBlock NameBlob
return MemBlock

RData public_oe property

string representation of the RData
public String RData
return String

RDataBlob public_oe property

MemBlock representation of the RData
public MemBlock RDataBlob
return MemBlock

RdLength public_oe property

the length of the rdata
public short RdLength
return short

Ttl public_oe property

cache time to live for the response
public int Ttl
return int

Type public_oe property

type of response
public DnsPacket.Types Type
return DnsPacket.Types