]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/resolve/resolved-def.h
NEWS: add warnings about read-only fs and libkmod being dlopen'ed
[thirdparty/systemd.git] / src / resolve / resolved-def.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
51323288
LP
2#pragma once
3
e53c6e4a
LP
4#include <inttypes.h>
5
4cbfd62b
MCO
6#include "time-util.h"
7
dc194dce
LP
8/* Input + Output: The various protocols we can use */
9#define SD_RESOLVED_DNS (UINT64_C(1) << 0)
10#define SD_RESOLVED_LLMNR_IPV4 (UINT64_C(1) << 1)
11#define SD_RESOLVED_LLMNR_IPV6 (UINT64_C(1) << 2)
12#define SD_RESOLVED_MDNS_IPV4 (UINT64_C(1) << 3)
13#define SD_RESOLVED_MDNS_IPV6 (UINT64_C(1) << 4)
14
15/* Input: Don't follow CNAMEs/DNAMEs */
16#define SD_RESOLVED_NO_CNAME (UINT64_C(1) << 5)
17
18/* Input: When doing service (SRV) resolving, don't resolve associated mDNS-style TXT records */
19#define SD_RESOLVED_NO_TXT (UINT64_C(1) << 6)
20
21/* Input: When doing service (SRV) resolving, don't resolve A/AAA RR for included hostname */
22#define SD_RESOLVED_NO_ADDRESS (UINT64_C(1) << 7)
23
24/* Input: Don't apply search domain logic to request */
25#define SD_RESOLVED_NO_SEARCH (UINT64_C(1) << 8)
26
27/* Output: Result is authenticated */
28#define SD_RESOLVED_AUTHENTICATED (UINT64_C(1) << 9)
29
775ae354
LP
30/* Input: Don't DNSSEC validate request */
31#define SD_RESOLVED_NO_VALIDATE (UINT64_C(1) << 10)
32
33/* Input: Don't answer request from locally synthesized records (which includes /etc/hosts) */
34#define SD_RESOLVED_NO_SYNTHESIZE (UINT64_C(1) << 11)
35
36/* Input: Don't answer request from cache */
37#define SD_RESOLVED_NO_CACHE (UINT64_C(1) << 12)
38
39/* Input: Don't answer request from locally registered public LLMNR/mDNS RRs */
40#define SD_RESOLVED_NO_ZONE (UINT64_C(1) << 13)
41
c6f20515 42/* Input: Don't answer request from locally configured trust anchors. */
775ae354
LP
43#define SD_RESOLVED_NO_TRUST_ANCHOR (UINT64_C(1) << 14)
44
45/* Input: Don't go to network for this request */
46#define SD_RESOLVED_NO_NETWORK (UINT64_C(1) << 15)
47
48/* Input: Require that request is answered from a "primary" answer, i.e. not from RRs acquired as
49 * side-effect of a previous transaction */
50#define SD_RESOLVED_REQUIRE_PRIMARY (UINT64_C(1) << 16)
51
52/* Input: If reply is answered from cache, the TTLs will be adjusted by age of cache entry */
53#define SD_RESOLVED_CLAMP_TTL (UINT64_C(1) << 17)
54
43fc4baa
LP
55/* Output: Result was only sent via encrypted channels, or never left this system */
56#define SD_RESOLVED_CONFIDENTIAL (UINT64_C(1) << 18)
57
5c1790d1
LP
58/* Output: Result was (at least partially) synthesized locally */
59#define SD_RESOLVED_SYNTHETIC (UINT64_C(1) << 19)
60
61/* Output: Result was (at least partially) answered from cache */
62#define SD_RESOLVED_FROM_CACHE (UINT64_C(1) << 20)
63
64/* Output: Result was (at least partially) answered from local zone */
65#define SD_RESOLVED_FROM_ZONE (UINT64_C(1) << 21)
66
67/* Output: Result was (at least partially) answered from trust anchor */
68#define SD_RESOLVED_FROM_TRUST_ANCHOR (UINT64_C(1) << 22)
69
70/* Output: Result was (at least partially) answered from network */
71#define SD_RESOLVED_FROM_NETWORK (UINT64_C(1) << 23)
72
5ed91481
KV
73/* Input: Don't answer request with stale data */
74#define SD_RESOLVED_NO_STALE (UINT64_C(1) << 24)
75
d0eae64c
LP
76/* Input: Allow single-label lookups to Internet DNS servers */
77#define SD_RESOLVED_RELAX_SINGLE_LABEL \
78 (UINT64_C(1) << 25)
79
dc194dce
LP
80#define SD_RESOLVED_LLMNR (SD_RESOLVED_LLMNR_IPV4|SD_RESOLVED_LLMNR_IPV6)
81#define SD_RESOLVED_MDNS (SD_RESOLVED_MDNS_IPV4|SD_RESOLVED_MDNS_IPV6)
82#define SD_RESOLVED_PROTOCOLS_ALL (SD_RESOLVED_MDNS|SD_RESOLVED_LLMNR|SD_RESOLVED_DNS)
4cbfd62b 83
5c1790d1
LP
84#define SD_RESOLVED_FROM_MASK (SD_RESOLVED_FROM_CACHE|SD_RESOLVED_FROM_ZONE|SD_RESOLVED_FROM_TRUST_ANCHOR|SD_RESOLVED_FROM_NETWORK)
85
4cbfd62b 86#define SD_RESOLVED_QUERY_TIMEOUT_USEC (120 * USEC_PER_SEC)