]> git.ipfire.org Git - thirdparty/pdns.git/blob - pdns/dnsdistdist/docs/reference/constants.rst
248f67148ec1160cf79d618b4b3a7a0e64e63ed9
[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 - ``DNSOpcode.Query``
12 - ``DNSOpcode.IQuery``
13 - ``DNSOpcode.Status``
14 - ``DNSOpcode.Notify``
15 - ``DNSOpcode.Update``
16
17 Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-5
18
19 .. _DNSClass:
20
21 DNSClass
22 ------
23
24 - ``DNSClass.IN``
25 - ``DNSClass.CHAOS``
26 - ``DNSClass.NONE``
27 - ``DNSClass.ANY``
28
29 Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-2
30
31 .. _DNSRCode:
32
33 RCode
34 -----
35
36 - ``dnsdist.NOERROR``
37 - ``dnsdist.FORMERR``
38 - ``dnsdist.SERVFAIL``
39 - ``dnsdist.NXDOMAIN``
40 - ``dnsdist.NOTIMP``
41 - ``dnsdist.REFUSED``
42 - ``dnsdist.YXDOMAIN``
43 - ``dnsdist.YXRRSET``
44 - ``dnsdist.NXRRSET``
45 - ``dnsdist.NOTAUTH``
46 - ``dnsdist.NOTZONE``
47 - ``dnsdist.BADVERS``
48 - ``dnsdist.BADSIG``
49 - ``dnsdist.BADKEY``
50 - ``dnsdist.BADTIME``
51 - ``dnsdist.BADMODE``
52 - ``dnsdist.BADNAME``
53 - ``dnsdist.BADALG``
54 - ``dnsdist.BADTRUNC``
55 - ``dnsdist.BADCOOKIE``
56
57 RCodes below and including ``BADVERS`` are extended RCodes that can only be matched using :func:`ERCodeRule`.
58
59 Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6
60
61
62 .. _EDNSOptionCode:
63
64 EDNSOptionCode
65 --------------
66
67 - ``EDNSOptionCode.DHU``
68 - ``EDNSOptionCode.ECS``
69 - ``EDNSOptionCode.N3U``
70 - ``EDNSOptionCode.DAU``
71 - ``EDNSOptionCode.TCPKEEPALIVE``
72 - ``EDNSOptionCode.COOKIE``
73 - ``EDNSOptionCode.PADDING``
74 - ``EDNSOptionCode.KEYTAG``
75 - ``EDNSOptionCode.NSID``
76 - ``EDNSOptionCode.CHAIN``
77 - ``EDNSOptionCode.EXPIRE``
78
79 Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11
80
81 .. _DNSSection:
82
83 DNS Section
84 -----------
85
86 - ``DNSSection.Question``
87 - ``DNSSection.Answer``
88 - ``DNSSection.Authority``
89 - ``DNSSection.Additional``
90
91 .. _DNSAction:
92
93 DNSAction
94 ---------
95
96 These constants represent an Action that can be returned from :func:`LuaAction` functions.
97
98 * ``DNSAction.Allow``: let the query pass, skipping other rules
99 * ``DNSAction.Delay``: delay the response for the specified milliseconds (UDP-only), continue to the next rule
100 * ``DNSAction.Drop``: drop the query
101 * ``DNSAction.HeaderModify``: indicate that the query has been turned into a response
102 * ``DNSAction.None``: continue to the next rule
103 * ``DNSAction.NoOp``: continue to the next rule (used for Dynamic Block actions where None has a different meaning)
104 * ``DNSAction.Nxdomain``: return a response with a NXDomain rcode
105 * ``DNSAction.Pool``: use the specified pool to forward this query
106 * ``DNSAction.Refused``: return a response with a Refused rcode
107 * ``DNSAction.ServFail``: return a response with a ServFail rcode
108 * ``DNSAction.Spoof``: spoof the response using the supplied IPv4 (A), IPv6 (AAAA) or string (CNAME) value
109 * ``DNSAction.Truncate``: truncate the response
110 * ``DNSAction.NoRecurse``: set rd=0 on the query
111
112
113 .. _DNSResponseAction:
114
115 DNSResponseAction
116 -----------------
117
118 These constants represent an Action that can be returned from :func:`LuaResponseAction` functions.
119
120 * ``DNSResponseAction.Allow``: let the response pass, skipping other rules
121 * ``DNSResponseAction.Delay``: delay the response for the specified milliseconds (UDP-only), continue to the next rule
122 * ``DNSResponseAction.Drop``: drop the response
123 * ``DNSResponseAction.HeaderModify``: indicate that the query has been turned into a response
124 * ``DNSResponseAction.None``: continue to the next rule
125 * ``DNSResponseAction.ServFail``: return a response with a ServFail rcode