|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.antiaction.dns.DNSRecordHeader
DNS Record Header, contains the header portion of a resource record. As defined in rfc1035.
| Field Summary | |
protected int |
rclass
Record class. |
protected java.lang.String |
rname
Domain name associated. |
protected int |
rttl
Record Time To Live. |
protected int |
rtype
Record type. |
| Constructor Summary | |
DNSRecordHeader()
Instantiate and initialize a default question object. |
|
| Method Summary | |
byte[] |
buildPacket(DNSName dnsname,
int globalIdx)
Build and return the record header based on the internal state. |
java.lang.Object |
clone()
Overrides Cloneable. |
void |
disassemblePacket(DNSName dnsname,
byte[] pDat,
int pIdx,
int pLen)
Parses the record header part of a packet. |
int |
getDisassembledLen()
Returns the length of the previously disassembled record header. |
int |
getRClass()
Get the record class. |
java.lang.String |
getRName()
Get the record name. |
int |
getRTTL()
Get the record class. |
int |
getRType()
Get the record type. |
void |
setDebug(boolean b)
Toggle debug status. |
void |
setRClass(int rc)
Set the record class. |
void |
setRName(java.lang.String s)
Set the record name. |
void |
setRTTL(int rt)
Set the record ttl. |
void |
setRType(int rt)
Set the record 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 rname
protected int rtype
protected int rclass
protected int rttl
| Constructor Detail |
public DNSRecordHeader()
| 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 record header begins.pLen - length of the whole packet.DNSException - if the packet is corrupted.DNSNameException - if the domain name is invalid.getDisassembledLen()public void setRName(java.lang.String s)
s - domain name.public java.lang.String getRName()
public void setRType(int rt)
rt - record type.public int getRType()
public void setRClass(int rc)
rc - record class.public int getRClass()
public void setRTTL(int rt)
rt - record ttl.public int getRTTL()
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 | ||||||||