1111public final class Rcode {
1212 private static final Mnemonic rcodes = new Mnemonic ("DNS Rcode" , Mnemonic .CASE_UPPER );
1313
14- /** No error */
14+ /** No Error. */
1515 public static final int NOERROR = 0 ;
1616
17- /** Format error */
17+ /** Format Error. */
1818 public static final int FORMERR = 1 ;
1919
20- /** Server failure */
20+ /** Server Failure. */
2121 public static final int SERVFAIL = 2 ;
2222
23- /** The name does not exist */
23+ /** Non-Existent Domain. */
2424 public static final int NXDOMAIN = 3 ;
2525
26- /** The operation requested is not implemented */
26+ /** Not Implemented. */
2727 public static final int NOTIMP = 4 ;
2828
2929 /**
@@ -33,51 +33,130 @@ public final class Rcode {
3333 */
3434 @ Deprecated public static final int NOTIMPL = 4 ;
3535
36- /** The operation was refused by the server */
36+ /** Query Refused. */
3737 public static final int REFUSED = 5 ;
3838
39- /** The name exists */
39+ /**
40+ * Name Exists when it should not.
41+ *
42+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc2136">RFC 2136: Dynamic Updates in the
43+ * Domain Name System (DNS UPDATE)</a>
44+ */
4045 public static final int YXDOMAIN = 6 ;
4146
42- /** The RRset (name, type) exists */
47+ /**
48+ * RR Set Exists when it should not.
49+ *
50+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc2136">RFC 2136: Dynamic Updates in the
51+ * Domain Name System (DNS UPDATE)</a>
52+ */
4353 public static final int YXRRSET = 7 ;
4454
45- /** The RRset (name, type) does not exist */
55+ /**
56+ * The RR Set that should exist does not.
57+ *
58+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc2136">RFC 2136: Dynamic Updates in the
59+ * Domain Name System (DNS UPDATE)</a>
60+ */
4661 public static final int NXRRSET = 8 ;
4762
48- /** The requestor is not authorized to perform this operation */
63+ /**
64+ * Server Not Authoritative for zone (RFC 2136); Not Authorized (RFC 8945).
65+ *
66+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc2136">RFC 2136: Dynamic Updates in the
67+ * Domain Name System (DNS UPDATE)</a>
68+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc8945">RFC 8945: Secret Key Transaction
69+ * Authentication for DNS (TSIG)</a>
70+ */
4971 public static final int NOTAUTH = 9 ;
5072
51- /** The zone specified is not a zone */
73+ /**
74+ * Name not contained in zone.
75+ *
76+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc2136">RFC 2136: Dynamic Updates in the
77+ * Domain Name System (DNS UPDATE)</a>
78+ */
5279 public static final int NOTZONE = 10 ;
5380
54- /* EDNS extended rcodes */
55- /** Unsupported EDNS level */
81+ /**
82+ * DSO-TYPE Not Implemented.
83+ *
84+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc8490">RFC 8490: DNS Stateful
85+ * Operations</a>
86+ * @since 3.6.6
87+ */
88+ public static final int DSOTYPENI = 11 ;
89+
90+ /**
91+ * Bad OPT Version.
92+ *
93+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc6891">RFC 6891: Extension Mechanisms for
94+ * DNS (EDNS(0))</a>
95+ */
5696 public static final int BADVERS = 16 ;
5797
58- /* TSIG/TKEY only rcodes */
59- /** The signature is invalid (TSIG/TKEY extended error) */
98+ /**
99+ * TSIG Signature Failure.
100+ *
101+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc8945">RFC 8945: Secret Key Transaction
102+ * Authentication for DNS (TSIG)</a>
103+ */
60104 public static final int BADSIG = 16 ;
61105
62- /** The key is invalid (TSIG/TKEY extended error) */
106+ /**
107+ * Key not recognized.
108+ *
109+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc8945">RFC 8945: Secret Key Transaction
110+ * Authentication for DNS (TSIG)</a>
111+ */
63112 public static final int BADKEY = 17 ;
64113
65- /** The time is out of range (TSIG/TKEY extended error) */
114+ /**
115+ * Signature out of time window.
116+ *
117+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc8945">RFC 8945: Secret Key Transaction
118+ * Authentication for DNS (TSIG)</a>
119+ */
66120 public static final int BADTIME = 18 ;
67121
68- /** The mode is invalid (TKEY extended error) */
122+ /**
123+ * Bad TKEY Mode.
124+ *
125+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc2930">RFC 2930: Secret Key Establishment
126+ * for DNS (TKEY RR)</a>
127+ */
69128 public static final int BADMODE = 19 ;
70129
71- /** Duplicate key name (TKEY extended error) */
130+ /**
131+ * Duplicate key name.
132+ *
133+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc2930">RFC 2930: Secret Key Establishment
134+ * for DNS (TKEY RR)</a>
135+ */
72136 public static final int BADNAME = 20 ;
73137
74- /** Algorithm not supported (TKEY extended error) */
138+ /**
139+ * Algorithm not supported.
140+ *
141+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc2930">RFC 2930: Secret Key Establishment
142+ * for DNS (TKEY RR)</a>
143+ */
75144 public static final int BADALG = 21 ;
76145
77- /** Bad truncation (RFC 4635) */
146+ /**
147+ * Bad Truncation.
148+ *
149+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc8945">RFC 8945: Secret Key Transaction
150+ * Authentication for DNS (TSIG)</a>
151+ */
78152 public static final int BADTRUNC = 22 ;
79153
80- /** Bad or missing server cookie (RFC 7873) */
154+ /**
155+ * Bad/missing server cookie.
156+ *
157+ * @see <a href="https://datatracker.ietf.org/doc/html/rfc7873">RFC 7873: Domain Name System (DNS)
158+ * Cookies</a>
159+ */
81160 public static final int BADCOOKIE = 23 ;
82161
83162 static {
@@ -97,6 +176,7 @@ public final class Rcode {
97176 rcodes .add (NXRRSET , "NXRRSET" );
98177 rcodes .add (NOTAUTH , "NOTAUTH" );
99178 rcodes .add (NOTZONE , "NOTZONE" );
179+ rcodes .add (DSOTYPENI , "DSOTYPENI" );
100180 rcodes .add (BADVERS , "BADVERS" );
101181 rcodes .add (BADKEY , "BADKEY" );
102182 rcodes .add (BADTIME , "BADTIME" );
0 commit comments