public final class DnsResponseHeader extends DnsHeader
OPCODE_IQUERY, OPCODE_QUERY, TYPE_QUERY, TYPE_RESPONSE| Constructor and Description | 
|---|
| DnsResponseHeader(DnsMessage parent,
                 int id)Constructor for a DNS packet response header. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | isAuthoritativeAnswer()Returns  trueif responding server is authoritative for the domain
 name in the query message. | 
| boolean | isRecursionAvailable()Returns  trueif DNS server can handle recursive queries. | 
| boolean | isTruncated()Returns  trueif response has been truncated, usually if it is
 over 512 bytes. | 
| DnsResponseCode | responseCode()Returns the 4 bit return code. | 
| DnsResponseHeader | setAuthoritativeAnswer(boolean authoritativeAnswer)Set to  trueif responding server is authoritative for the domain
 name in the query message. | 
| DnsResponseHeader | setId(int id)Sets the id for this  DnsMessage. | 
| DnsResponseHeader | setOpcode(int opcode)Sets the opcode for this  DnsMessage. | 
| DnsResponseHeader | setRecursionAvailable(boolean recursionAvailable)Set to  trueif DNS server can handle recursive queries. | 
| DnsHeader | setRecursionDesired(boolean recursionDesired)Sets whether a name server is directed to pursue a query recursively or
 not. | 
| DnsResponseHeader | setResponseCode(DnsResponseCode responseCode)Sets the response code for this message. | 
| DnsResponseHeader | setTruncated(boolean truncated)Set to  trueif response has been truncated (usually happens for
 responses over 512 bytes). | 
| DnsResponseHeader | setType(int type)Sets the  DnsHeadertype. | 
| DnsResponseHeader | setZ(int z)Sets the field Z. | 
| int | type()Returns the  DnsMessagetype. | 
additionalResourceCount, answerCount, authorityResourceCount, id, isRecursionDesired, opcode, questionCount, zpublic DnsResponseHeader(DnsMessage parent, int id)
DnsQuery and is sent back to the client.parent - the DnsMessage this header belongs toid - a 2 bit unsigned identification number received from clientpublic boolean isAuthoritativeAnswer()
true if responding server is authoritative for the domain
 name in the query message.public boolean isTruncated()
true if response has been truncated, usually if it is
 over 512 bytes.public boolean isRecursionAvailable()
true if DNS server can handle recursive queries.public DnsResponseCode responseCode()
public int type()
DnsMessage type. This will always return
 TYPE_RESPONSE.type in class DnsHeaderDnsHeader.TYPE_QUERYpublic DnsResponseHeader setAuthoritativeAnswer(boolean authoritativeAnswer)
true if responding server is authoritative for the domain
 name in the query message.authoritativeAnswer - flag for authoritative answerpublic DnsResponseHeader setTruncated(boolean truncated)
true if response has been truncated (usually happens for
 responses over 512 bytes).truncated - flag for truncationpublic DnsResponseHeader setRecursionAvailable(boolean recursionAvailable)
true if DNS server can handle recursive queries.recursionAvailable - flag for recursion availabilitypublic DnsResponseHeader setResponseCode(DnsResponseCode responseCode)
responseCode - the response codepublic DnsResponseHeader setType(int type)
DnsHeader type. Must be TYPE_RESPONSE.public DnsResponseHeader setId(int id)
DnsHeaderDnsMessage.public DnsHeader setRecursionDesired(boolean recursionDesired)
DnsHeadersetRecursionDesired in class DnsHeaderrecursionDesired - if set to true, pursues query recursivelypublic DnsResponseHeader setOpcode(int opcode)
DnsHeaderDnsMessage.public DnsResponseHeader setZ(int z)
DnsHeaderCopyright © 2008–2015 The Netty Project. All rights reserved.