Interface DnsOptCookieRecord
- All Superinterfaces:
DnsOptPseudoRecord, DnsRecord
- All Known Implementing Classes:
DefaultDnsOptCookieRecord
An
DnsOptPseudoRecord that carries a client cookie as defined in
RFC 7873, Domain Name System (DNS) Cookies.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe length of a client cookie in bytes.static final intTheOPTION-CODEthat is assigned toCOOKIE.Fields inherited from interface DnsRecord
CLASS_ANY, CLASS_CHAOS, CLASS_CSNET, CLASS_HESIOD, CLASS_IN, CLASS_NONEModifier and TypeFieldDescriptionstatic final intDNS resource record class:ANYstatic final intDNS resource record class:CHAOSstatic final intDNS resource record class:CSNETstatic final intDNS resource record class:HESIODstatic final intDNS resource record class:INstatic final intDNS resource record class:NONE -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the client cookie, which is alwaysCLIENT_COOKIE_LENGTHbytes long.Methods inherited from interface DnsOptPseudoRecord
extendedRcode, flags, versionModifier and TypeMethodDescriptionintReturns theEXTENDED-RCODEwhich is encoded intoDnsRecord.timeToLive().intflags()Returns the 16-bitflagsfield which is encoded into the lower 16 bits ofDnsRecord.timeToLive(), as laid out by RFC 6891.intversion()Returns theVERSIONwhich is encoded intoDnsRecord.timeToLive().Methods inherited from interface DnsRecord
dnsClass, name, timeToLive, type
-
Field Details
-
CLIENT_COOKIE_LENGTH
static final int CLIENT_COOKIE_LENGTHThe length of a client cookie in bytes.- See Also:
-
OPTION_CODE
static final int OPTION_CODETheOPTION-CODEthat is assigned toCOOKIE.- See Also:
-
-
Method Details
-
clientCookie
byte[] clientCookie()Returns the client cookie, which is alwaysCLIENT_COOKIE_LENGTHbytes long. The returned array is a copy.
-