]> git.ipfire.org Git - thirdparty/pdns.git/blob - pdns/dnsdistdist/docs/reference/constants.rst
updated KSK and ZSK Rollover procedures, small fixes in Algorithm Rollover procedure
[thirdparty/pdns.git] / pdns / dnsdistdist / docs / reference / constants.rst
1 Constants
2 =========
3
4 There are many constants in :program:`dnsdist`.
5
6 .. _DNSOpcode:
7
8 OPCode
9 ------
10
11 These constants represent the `OpCode <https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-5>`__ of a query.
12
13 - ``DNSOpcode.Query``
14 - ``DNSOpcode.IQuery``
15 - ``DNSOpcode.Status``
16 - ``DNSOpcode.Notify``
17 - ``DNSOpcode.Update``
18
19 Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-5
20
21 .. _DNSClass:
22
23 DNSClass
24 --------
25
26 These constants represent the `CLASS <https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-2>`__ of a DNS record.
27
28 - ``DNSClass.IN``
29 - ``DNSClass.CHAOS``
30 - ``DNSClass.NONE``
31 - ``DNSClass.ANY``
32
33 Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-2
34
35 .. _DNSRCode:
36
37 RCode
38 -----
39
40 These constants represent the different `RCODEs <https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6>`__ for DNS messages.
41
42 .. versionchanged:: 1.4.0
43 The prefix is changed from ``dnsdist`` to ``DNSRCode``.
44
45 .. versionchanged:: 1.7.0
46 The lookup fallback from ``dnsdist`` to ``DNSRCode`` was removed.
47
48 - ``DNSRCode.NOERROR``
49 - ``DNSRCode.FORMERR``
50 - ``DNSRCode.SERVFAIL``
51 - ``DNSRCode.NXDOMAIN``
52 - ``DNSRCode.NOTIMP``
53 - ``DNSRCode.REFUSED``
54 - ``DNSRCode.YXDOMAIN``
55 - ``DNSRCode.YXRRSET``
56 - ``DNSRCode.NXRRSET``
57 - ``DNSRCode.NOTAUTH``
58 - ``DNSRCode.NOTZONE``
59
60 RCodes below are extended RCodes that can only be matched using :func:`ERCodeRule`.
61
62 - ``DNSRCode.BADVERS``
63 - ``DNSRCode.BADSIG``
64 - ``DNSRCode.BADKEY``
65 - ``DNSRCode.BADTIME``
66 - ``DNSRCode.BADMODE``
67 - ``DNSRCode.BADNAME``
68 - ``DNSRCode.BADALG``
69 - ``DNSRCode.BADTRUNC``
70 - ``DNSRCode.BADCOOKIE``
71
72 .. _EDNSOptionCode:
73
74 EDNSOptionCode
75 --------------
76
77 - ``EDNSOptionCode.DHU``
78 - ``EDNSOptionCode.ECS``
79 - ``EDNSOptionCode.N3U``
80 - ``EDNSOptionCode.DAU``
81 - ``EDNSOptionCode.TCPKEEPALIVE``
82 - ``EDNSOptionCode.COOKIE``
83 - ``EDNSOptionCode.PADDING``
84 - ``EDNSOptionCode.KEYTAG``
85 - ``EDNSOptionCode.NSID``
86 - ``EDNSOptionCode.CHAIN``
87 - ``EDNSOptionCode.EXPIRE``
88
89 Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11
90
91 .. _DNSSection:
92
93 DNS Packet Sections
94 -------------------
95
96 These constants represent the section in the DNS Packet.
97
98 - ``DNSSection.Question``
99 - ``DNSSection.Answer``
100 - ``DNSSection.Authority``
101 - ``DNSSection.Additional``
102
103 .. _DNSAction:
104
105 DNSAction
106 ---------
107
108 .. versionchanged:: 1.5.0
109 ``DNSAction.SpoofRaw`` has been added.
110
111 .. versionchanged:: 1.8.0
112 ``DNSAction.SpoofPacket`` has been added.
113
114 These constants represent an Action that can be returned from :func:`LuaAction` functions.
115
116 * ``DNSAction.Allow``: let the query pass, skipping other rules
117 * ``DNSAction.Delay``: delay the response for the specified milliseconds (UDP-only), continue to the next rule
118 * ``DNSAction.Drop``: drop the query
119 * ``DNSAction.HeaderModify``: indicate that the query has been turned into a response
120 * ``DNSAction.None``: continue to the next rule
121 * ``DNSAction.NoOp``: continue to the next rule (used for Dynamic Block actions where None has a different meaning)
122 * ``DNSAction.Nxdomain``: return a response with a NXDomain rcode
123 * ``DNSAction.Pool``: use the specified pool to forward this query
124 * ``DNSAction.Refused``: return a response with a Refused rcode
125 * ``DNSAction.ServFail``: return a response with a ServFail rcode
126 * ``DNSAction.Spoof``: spoof the response using the supplied IPv4 (A), IPv6 (AAAA) or string (CNAME) value. TTL will be 60 seconds.
127 * ``DNSAction.SpoofPacket``: spoof the response using the supplied raw packet
128 * ``DNSAction.SpoofRaw``: spoof the response using the supplied raw value as record data (see also :meth:`DNSQuestion:spoof` and :func:`dnsdist_ffi_dnsquestion_spoof_raw` to spoof multiple values)
129 * ``DNSAction.Truncate``: truncate the response
130 * ``DNSAction.NoRecurse``: set rd=0 on the query
131
132 .. _DNSQType:
133
134 DNSQType
135 --------
136
137 .. versionchanged:: 1.4.0
138 The prefix is changed from ``dnsdist.`` to ``DNSQType``.
139
140 .. versionchanged:: 1.7.0
141 The lookup fallback from ``dnsdist`` to ``DNSQType`` was removed.
142
143 All named `QTypes <https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4>`__ are available as constants, prefixed with ``DNSQType.``, e.g.:
144
145 * ``DNSQType.AAAA``
146 * ``DNSQType.AXFR``
147 * ``DNSQType.A``
148 * ``DNSQType.NS``
149 * ``DNSQType.SOA``
150 * etc.
151
152 .. _DNSResponseAction:
153
154 DNSResponseAction
155 -----------------
156
157 These constants represent an Action that can be returned from :func:`LuaResponseAction` functions.
158
159 * ``DNSResponseAction.Allow``: let the response pass, skipping other rules
160 * ``DNSResponseAction.Delay``: delay the response for the specified milliseconds (UDP-only), continue to the next rule
161 * ``DNSResponseAction.Drop``: drop the response
162 * ``DNSResponseAction.HeaderModify``: indicate that the query has been turned into a response
163 * ``DNSResponseAction.None``: continue to the next rule
164 * ``DNSResponseAction.ServFail``: return a response with a ServFail rcode