Package net.handle.dnslib
Class Message
java.lang.Object
net.handle.dnslib.Message
- All Implemented Interfaces:
Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionExtra information set by a nameserver to indicate which additional records should be kept even if we try leaving authoritative authority information outint
static final ResourceRecord
static final ResourceRecord
static final int
static final int
static final int
static final int
static final int
static final int
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
boolean
static final ResourceRecord
static final ResourceRecord
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
appendToWire
(OutputStream wire) static Message
void
static void
debugPrint
(byte b) static void
debugPrint
(byte[] bytes) byte[]
getDatagram
(int udpPayloadSize) Returns a byte array representing the on-wire message.int
int
byte
boolean
int
getTTL()
Returns the minimum ttl of all records in the Message.int
static Message
initialResponse
(Message query, boolean recursionAvailable, boolean largeEDNS) Initial filter for both resolvers and nameservers.int
parseWire
(byte[] wire) void
setResponseCode
(byte responseCode) can only set unextended code
-
Field Details
-
RC_OK
public static final byte RC_OK- See Also:
-
RC_FORMAT_ERROR
public static final byte RC_FORMAT_ERROR- See Also:
-
RC_SERVER_ERROR
public static final byte RC_SERVER_ERROR- See Also:
-
RC_NAME_ERROR
public static final byte RC_NAME_ERROR- See Also:
-
RC_NOT_IMPLEMENTED
public static final byte RC_NOT_IMPLEMENTED- See Also:
-
RC_REFUSED
public static final byte RC_REFUSED- See Also:
-
META_TYPE_OPT
public static final int META_TYPE_OPT- See Also:
-
QTYPE_IXFR
public static final int QTYPE_IXFR- See Also:
-
QTYPE_AXFR
public static final int QTYPE_AXFR- See Also:
-
QTYPE_MAILB
public static final int QTYPE_MAILB- See Also:
-
QTYPE_MAILA
public static final int QTYPE_MAILA- See Also:
-
QTYPE_ANY
public static final int QTYPE_ANY- See Also:
-
id
public int id -
recursionDesired
public boolean recursionDesired -
additionalFromAnswerOrReferral
Extra information set by a nameserver to indicate which additional records should be kept even if we try leaving authoritative authority information out -
SMALL_EDNS
-
LARGE_EDNS
-
SMALL_EDNS_BADVERS
-
LARGE_EDNS_BADVERS
-
-
Constructor Details
-
Message
public Message() -
Message
-
-
Method Details
-
copy
-
getOpcode
public byte getOpcode() -
getQuestion
-
getQuestionNameAsString
-
getQuestionAfterCNAME
-
getRecursionDesired
public boolean getRecursionDesired() -
getTTL
public int getTTL()Returns the minimum ttl of all records in the Message. The Message must be frozen once this is called, except that the id and recursionDesired fields can be changed to facilitate caching. -
parseWire
- Throws:
ParseException
-
getUDPPayloadSize
public int getUDPPayloadSize() -
getEDNSVersion
public int getEDNSVersion() -
getExtendedResponseCode
public int getExtendedResponseCode() -
setResponseCode
public void setResponseCode(byte responseCode) can only set unextended code -
initialResponse
Initial filter for both resolvers and nameservers. If this returns null, it means to ignore the query. If it returns a message with an rcode other than OK, it means return that message. Otherwise the returned message can be modified in its AA bit, its RCODE, and have resource records added. -
appendToWire
- Throws:
IOException
-
getDatagram
Returns a byte array representing the on-wire message. The Message must be frozen once this is called, except that the id and recursionDesired fields can be changed to facilitate caching.- Throws:
IOException
-
debugPrint
public static void debugPrint(byte b) -
debugPrint
public static void debugPrint(byte[] bytes) -
debugPrint
public void debugPrint()
-