|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.antiaction.dns.DNSQuestion
DNS Question, dis/assembles question portions of a DNS packet. As defined in rfc1035.
| Field Summary | |
protected int |
qclass
Question class. |
protected java.lang.String |
qname
Question name. |
protected int |
qtype
Question type. |
| Constructor Summary | |
DNSQuestion()
Instantiate and initialize a default question object. |
|
| Method Summary | |
byte[] |
buildPacket(DNSName dnsname,
int globalIdx)
Build and return the question based on the internal state. |
java.lang.Object |
clone()
Overrides Cloneable. |
void |
disassemblePacket(DNSName dnsname,
byte[] pDat,
int pIdx,
int pLen)
Parses the question part of a packet. |
int |
getDisassembledLen()
Returns the length of the previously disassembled question. |
int |
getQClass()
Get the question class |
java.lang.String |
getQName()
Get the question domain name. |
int |
getQType()
Get the question type. |
void |
setDebug(boolean b)
Toggle debug status. |
void |
setQClass(int qc)
Set the question class. |
void |
setQName(java.lang.String s)
Set the question domain name. |
void |
setQType(int qt)
Set the question type. |
java.lang.String |
toString()
Returns a string representation of the internal state, mostly for debugging purposes. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String qname
protected int qtype
protected int qclass
| Constructor Detail |
public DNSQuestion()
| Method Detail |
public java.lang.Object clone()
clone in class java.lang.ObjectOutOfMemoryError - if there is not enough memory.Cloneablepublic void setDebug(boolean b)
b - boolean.
public byte[] buildPacket(DNSName dnsname,
int globalIdx)
throws DNSNameException
dnsname - used for domain name compression in the same message.globalIdx - current index of the message being assembled. (Domain name compression)DNSNameException - if the domain name is invalid.public int getDisassembledLen()
disassemblePacket(DNSName, byte[], int, int)
public void disassemblePacket(DNSName dnsname,
byte[] pDat,
int pIdx,
int pLen)
throws DNSException,
DNSNameException
dnsname - used for domain name compression in the same message.pDat - array containing the complete packet.pIdx - index to where in the array the question begins.pLen - length of the whole packet.DNSException - if the packet is corrupted.DNSNameException - if the domain name is invalid.getDisassembledLen()public void setQName(java.lang.String s)
s - domain name.public java.lang.String getQName()
public void setQType(int qt)
qt - question type.public int getQType()
public void setQClass(int qc)
qc - question class.public int getQClass()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||