Property | Type | Description | |
---|---|---|---|
AA | bool | ||
Additional | Response[] | ||
Answers | Response[] | ||
Authority | Response[] | ||
ID | short | ||
Opcode | byte | ||
Query | bool | ||
Questions | NetworkPackets.Dns.Question[] | ||
RA | bool | ||
RD | bool |
Method | Description | |
---|---|---|
BuildFailedReplyPacket ( |
Given a DnsPacket, it will generate a failure message so that the local resolver can move on to the next nameserver without timeouting on the this one.
|
|
DnsPacket ( MemBlock Packet ) : Brunet |
Parses a MemBlock as a DnsPacket.
|
|
DnsPacket ( short ID, bool Query, byte Opcode, bool AA, bool RA, bool RD, |
Creates a Dns packet from the parameters provided.
|
|
HostnameMemBlockToString ( MemBlock name ) : String |
Takes in a memblock containing a dns formatted hostname string and converts it into a String.
|
|
HostnameStringToMemBlock ( String name ) : MemBlock |
Given a Name as a string converts it into bytes given the type of query.
|
|
IPMemBlockToString ( MemBlock ip ) : String |
Takes in an IP Address in dns format and returns a string. The format is abcd (byte[] {a, b, c, d}.
|
|
IPStringToMemBlock ( String ip ) : MemBlock |
Takes in an ip string such as a.b.c.d and returns a MemBlock containing the IP [a, b, c, d].
|
|
PtrMemBlockToString ( MemBlock ptr ) : String |
Takes in a memblock containing dns ptr data ... d.c.b.a.in-addr.arpa ... and returns the IP Address as a string.
|
|
PtrStringToMemBlock ( String ptr ) : MemBlock |
Takes in an IP Address string and returns the dns ptr formatted memblock containing d.c.b.a.in-addr.arpa.
|
|
RetrieveBlob ( MemBlock Data, int Start, int &End ) : MemBlock |
A blob is a fully resolved name. Dns uses pointers to reduce memory consumption in packets, this can traverse all pointers and return a complete name. The blob starts a Start and Ends at End. This is used so that the parsing program knows where to continue reading data from.
|
|
StringIsIP ( String IP ) : bool |
public static BuildFailedReplyPacket ( |
||
Packet | The base packet to translate into a failed response | |
refused_implemented | bool | |
return | MemBlock |
public DnsPacket ( MemBlock Packet ) : Brunet | ||
Packet | MemBlock | The payload containing hte Dns Packet in byte format. |
return | Brunet |
public DnsPacket ( short ID, bool Query, byte Opcode, bool AA, bool RA, bool RD, |
||
ID | short | A unique ID for the packet, responses should be the same as the query |
Query | bool | True if a query, false if a response |
Opcode | byte | 0 = Query, which is the only supported parsing method |
AA | bool | Authoritative Answer, true if there is a resolution for the lookup. |
RA | bool | |
RD | bool | |
Questions | A list of Questions. | |
Answers | Response | A list of Answers. |
Authority | Response | |
Additional | Response | |
return | Brunet |
public static HostnameMemBlockToString ( MemBlock name ) : String | ||
name | MemBlock | The memblock containing the dns formated hostname. |
return | String |
public static HostnameStringToMemBlock ( String name ) : MemBlock | ||
name | String | The name to convert (and resolve). |
return | MemBlock |
public static IPMemBlockToString ( MemBlock ip ) : String | ||
ip | MemBlock | a memblock containing abcd. |
return | String |
public static IPStringToMemBlock ( String ip ) : MemBlock | ||
ip | String | The IP in a string to convert. |
return | MemBlock |
public static PtrMemBlockToString ( MemBlock ptr ) : String | ||
ptr | MemBlock | The block containing the dns ptr data. |
return | String |
public static PtrStringToMemBlock ( String ptr ) : MemBlock | ||
ptr | String | An IP Address in the format a.b.c.d. |
return | MemBlock |
public static RetrieveBlob ( MemBlock Data, int Start, int &End ) : MemBlock | ||
Data | MemBlock | The entire packet to grab the blob from. |
Start | int | The beginning of the blob. |
End | int | Returned to the user and notes where the blob ends. |
return | MemBlock |
public static StringIsIP ( String IP ) : bool | ||
IP | String | |
return | bool |
public Question[],NetworkPackets.Dns Questions | ||
return | NetworkPackets.Dns.Question[] |