]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/resolve/resolved-def.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
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)
15 /* Input: Don't follow CNAMEs/DNAMEs */
16 #define SD_RESOLVED_NO_CNAME (UINT64_C(1) << 5)
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)
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)
24 /* Input: Don't apply search domain logic to request */
25 #define SD_RESOLVED_NO_SEARCH (UINT64_C(1) << 8)
27 /* Output: Result is authenticated */
28 #define SD_RESOLVED_AUTHENTICATED (UINT64_C(1) << 9)
30 /* Input: Don't DNSSEC validate request */
31 #define SD_RESOLVED_NO_VALIDATE (UINT64_C(1) << 10)
33 /* Input: Don't answer request from locally synthesized records (which includes /etc/hosts) */
34 #define SD_RESOLVED_NO_SYNTHESIZE (UINT64_C(1) << 11)
36 /* Input: Don't answer request from cache */
37 #define SD_RESOLVED_NO_CACHE (UINT64_C(1) << 12)
39 /* Input: Don't answer request from locally registered public LLMNR/mDNS RRs */
40 #define SD_RESOLVED_NO_ZONE (UINT64_C(1) << 13)
42 /* Input: Don't answer request from locally configured trust anchors. */
43 #define SD_RESOLVED_NO_TRUST_ANCHOR (UINT64_C(1) << 14)
45 /* Input: Don't go to network for this request */
46 #define SD_RESOLVED_NO_NETWORK (UINT64_C(1) << 15)
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)
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)
55 /* Output: Result was only sent via encrypted channels, or never left this system */
56 #define SD_RESOLVED_CONFIDENTIAL (UINT64_C(1) << 18)
58 /* Output: Result was (at least partially) synthesized locally */
59 #define SD_RESOLVED_SYNTHETIC (UINT64_C(1) << 19)
61 /* Output: Result was (at least partially) answered from cache */
62 #define SD_RESOLVED_FROM_CACHE (UINT64_C(1) << 20)
64 /* Output: Result was (at least partially) answered from local zone */
65 #define SD_RESOLVED_FROM_ZONE (UINT64_C(1) << 21)
67 /* Output: Result was (at least partially) answered from trust anchor */
68 #define SD_RESOLVED_FROM_TRUST_ANCHOR (UINT64_C(1) << 22)
70 /* Output: Result was (at least partially) answered from network */
71 #define SD_RESOLVED_FROM_NETWORK (UINT64_C(1) << 23)
73 /* Input: Don't answer request with stale data */
74 #define SD_RESOLVED_NO_STALE (UINT64_C(1) << 24)
76 /* Input: Allow single-label lookups to Internet DNS servers */
77 #define SD_RESOLVED_RELAX_SINGLE_LABEL \
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)
84 #define SD_RESOLVED_FROM_MASK (SD_RESOLVED_FROM_CACHE|SD_RESOLVED_FROM_ZONE|SD_RESOLVED_FROM_TRUST_ANCHOR|SD_RESOLVED_FROM_NETWORK)
86 #define SD_RESOLVED_QUERY_TIMEOUT_USEC (120 * USEC_PER_SEC)