4 There are many constants in :program:`dnsdist`.
12 - ``DNSOpcode.IQuery``
13 - ``DNSOpcode.Status``
14 - ``DNSOpcode.Notify``
15 - ``DNSOpcode.Update``
17 Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-5
29 Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-2
38 - ``dnsdist.SERVFAIL``
39 - ``dnsdist.NXDOMAIN``
42 - ``dnsdist.YXDOMAIN``
54 - ``dnsdist.BADTRUNC``
55 - ``dnsdist.BADCOOKIE``
57 RCodes below and including ``BADVERS`` are extended RCodes that can only be matched using :func:`ERCodeRule`.
59 Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6
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``
79 Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11
86 - ``DNSSection.Question``
87 - ``DNSSection.Answer``
88 - ``DNSSection.Authority``
89 - ``DNSSection.Additional``
96 These constants represent an Action that can be returned from :func:`LuaAction` functions.
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
113 .. _DNSResponseAction:
118 These constants represent an Action that can be returned from :func:`LuaResponseAction` functions.
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