|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.antiaction.dns.DNSName
DNS Name, handles domainname dis/assembling (including de/compression). As defined in rfc1035.
| Constructor Summary | |
DNSName()
Construct a name object and initialize internal compression structures. |
|
| Method Summary | |
byte[] |
buildPacket(int globalIdx,
java.lang.String name,
boolean useComp,
boolean updComp)
Build a sub packet containing the name with no, partial or full compresssion used. |
java.lang.String |
disassemblePacket(byte[] pDat,
int pIdx,
int pLen)
Parses the name part of a packet and returns a string. |
int |
getDisassembledLen()
Returns the length of the previously disassembled name. |
void |
printTree()
Display the hashmap tree structure used for name compression, for debugging purposes only. |
void |
reset()
Reset internal compression structures. |
void |
setDebug(boolean b)
Toggle debug status. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DNSName()
| Method Detail |
public void setDebug(boolean b)
b - boolean.public void reset()
public byte[] buildPacket(int globalIdx,
java.lang.String name,
boolean useComp,
boolean updComp)
throws DNSNameException
globalIdx - used to index labels across names.name - domain name.useComp - use compression to build the name.updComp - update the compression tree structure with new labels.DNSNameException - if the domain name is invalid.public int getDisassembledLen()
disassemblePacket(byte[], int, int)
public java.lang.String disassemblePacket(byte[] pDat,
int pIdx,
int pLen)
throws DNSException,
DNSNameException
pDat - array containing the complete packet.pIdx - index to where in the array the name begins.pLen - length of the whole packet.DNSNameException - if the domain name is invalid.getDisassembledLen()public void printTree()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||