summaryrefslogtreecommitdiffstats
path: root/lib/rules
diff options
context:
space:
mode:
authorOto Šťáva <oto.stava@nic.cz>2024-05-21 11:09:47 +0200
committerOto Šťáva <oto.stava@nic.cz>2024-06-04 13:04:59 +0200
commit870dc3a703b88943502fc772109c4ac5543d3fe8 (patch)
tree3d94df61a0809da85c0fa03240351b3722e9e256 /lib/rules
parentdaemon/session2: documentation improvements (diff)
downloadknot-resolver-870dc3a703b88943502fc772109c4ac5543d3fe8.tar.xz
knot-resolver-870dc3a703b88943502fc772109c4ac5543d3fe8.zip
daemon, lib: unify protolayer_grp and kr_proto enums
Diffstat (limited to 'lib/rules')
-rw-r--r--lib/rules/api.h22
1 files changed, 1 insertions, 21 deletions
diff --git a/lib/rules/api.h b/lib/rules/api.h
index bf51e4d5..1069ef4d 100644
--- a/lib/rules/api.h
+++ b/lib/rules/api.h
@@ -4,6 +4,7 @@
#pragma once
#include "lib/defines.h"
+#include "lib/proto.h"
struct kr_query;
struct kr_request;
struct knot_pkt;
@@ -16,27 +17,6 @@ typedef uint64_t kr_rule_tags_t;
/// Tags "capacity", i.e. numbered from 0 to _CAP - 1.
#define KR_RULE_TAGS_CAP (sizeof(kr_rule_tags_t) * 8)
-/** DNS protocol set - mutually exclusive options, contrary to kr_request_qsource_flags
- *
- * The XDP flag is not discerned here, as it could apply to any protocol.
- * (not right now, but libknot does support it for TCP, so that would complete everything)
- *
- * TODO: probably unify with enum protolayer_grp.
- */
-enum kr_proto {
- KR_PROTO_INTERNAL = 0, /// no protocol, e.g. useful to mark internal requests
- KR_PROTO_UDP53,
- KR_PROTO_TCP53,
- KR_PROTO_DOT,
- KR_PROTO_DOH,
- KR_PROTO_DOQ, /// unused for now
- KR_PROTO_COUNT,
-};
-/** Bitmap of enum kr_proto options. */
-typedef uint8_t kr_proto_set;
-static_assert(sizeof(kr_proto_set) * 8 >= KR_PROTO_COUNT, "bad combination of type sizes");
-
-
/** Open the rule DB.
*
* You can call this to override the path or size (NULL/0 -> default).