Debian Codegraph @

src/basic/dns-def.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "basic-forward.h"
5
6 /* Length of a single label, with all escaping removed, excluding any trailing dot or NUL byte */
7 #define DNS_LABEL_MAX 63
8
9 /* Worst case length of a single label, with all escaping applied and room for a trailing NUL byte. */
10 #define DNS_LABEL_ESCAPED_MAX (DNS_LABEL_MAX*4+1)
11
12 /* Maximum length of a full hostname, consisting of a series of unescaped labels, and no trailing dot or NUL byte */
13 #define DNS_HOSTNAME_MAX 253
14
15 /* Maximum length of a full hostname, on the wire, including the final NUL byte */
16 #define DNS_WIRE_FORMAT_HOSTNAME_MAX 255
17
18 /* Maximum number of labels per valid hostname */
19 #define DNS_N_LABELS_MAX 127