diff options
Diffstat (limited to 'lib/proto.c')
-rw-r--r-- | lib/proto.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/proto.c b/lib/proto.c new file mode 100644 index 00000000..cf12e94e --- /dev/null +++ b/lib/proto.c @@ -0,0 +1,19 @@ +/* Copyright (C) CZ.NIC, z.s.p.o. <knot-resolver@labs.nic.cz> + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#include "lib/proto.h" + +const char *kr_proto_name(enum kr_proto p) +{ + switch (p) { + case KR_PROTO_INTERNAL: + return "INTERNAL"; +#define XX(cid, vid, name) case KR_PROTO_##cid: \ + return (name); + KR_PROTO_MAP(XX) +#undef XX + default: + return "(default)"; + } +} |