chiark / gitweb /
resolved: don't abort if a transaction is aborted because its scope is removed
[elogind.git] / src / resolve / dns-type.h
1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3 /***
4   This file is part of systemd.
5
6   Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
7
8   systemd is free software; you can redistribute it and/or modify it
9   under the terms of the GNU Lesser General Public License as published by
10   the Free Software Foundation; either version 2.1 of the License, or
11   (at your option) any later version.
12
13   systemd is distributed in the hope that it will be useful, but
14   WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16   Lesser General Public License for more details.
17
18   You should have received a copy of the GNU Lesser General Public License
19   along with systemd; If not, see <http://www.gnu.org/licenses/>.
20 ***/
21
22 #pragma once
23
24 #include "macro.h"
25
26 const char *dns_type_to_string(int type);
27 int dns_type_from_string(const char *s);
28
29 /* DNS record types, taken from
30  * http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml.
31  */
32 enum {
33         /* Normal records */
34         DNS_TYPE_A          = 0x01,
35         DNS_TYPE_NS,
36         DNS_TYPE_MD,
37         DNS_TYPE_MF,
38         DNS_TYPE_CNAME,
39         DNS_TYPE_SOA,
40         DNS_TYPE_MB,
41         DNS_TYPE_MG,
42         DNS_TYPE_MR,
43         DNS_TYPE_NULL,
44         DNS_TYPE_WKS,
45         DNS_TYPE_PTR,
46         DNS_TYPE_HINFO,
47         DNS_TYPE_MINFO,
48         DNS_TYPE_MX,
49         DNS_TYPE_TXT,
50         DNS_TYPE_RP,
51         DNS_TYPE_AFSDB,
52         DNS_TYPE_X25,
53         DNS_TYPE_ISDN,
54         DNS_TYPE_RT,
55         DNS_TYPE_NSAP,
56         DNS_TYPE_NSAP_PTR,
57         DNS_TYPE_SIG,
58         DNS_TYPE_KEY,
59         DNS_TYPE_PX,
60         DNS_TYPE_GPOS,
61         DNS_TYPE_AAAA,
62         DNS_TYPE_LOC,
63         DNS_TYPE_NXT,
64         DNS_TYPE_EID,
65         DNS_TYPE_NIMLOC,
66         DNS_TYPE_SRV,
67         DNS_TYPE_ATMA,
68         DNS_TYPE_NAPTR,
69         DNS_TYPE_KX,
70         DNS_TYPE_CERT,
71         DNS_TYPE_A6,
72         DNS_TYPE_DNAME,
73         DNS_TYPE_SINK,
74         DNS_TYPE_OPT,          /* EDNS0 option */
75         DNS_TYPE_APL,
76         DNS_TYPE_DS,
77         DNS_TYPE_SSHFP,
78         DNS_TYPE_IPSECKEY,
79         DNS_TYPE_RRSIG,
80         DNS_TYPE_NSEC,
81         DNS_TYPE_DNSKEY,
82         DNS_TYPE_DHCID,
83         DNS_TYPE_NSEC3,
84         DNS_TYPE_NSEC3PARAM,
85         DNS_TYPE_TLSA,
86
87         DNS_TYPE_HIP        = 0x37,
88         DNS_TYPE_NINFO,
89         DNS_TYPE_RKEY,
90         DNS_TYPE_TALINK,
91         DNS_TYPE_CDS,
92         DNS_TYPE_CDNSKEY,
93
94         DNS_TYPE_SPF        = 0x63,
95         DNS_TYPE_NID,
96         DNS_TYPE_L32,
97         DNS_TYPE_L64,
98         DNS_TYPE_LP,
99         DNS_TYPE_EUI48,
100         DNS_TYPE_EUI64,
101
102         DNS_TYPE_TKEY       = 0xF9,
103         DNS_TYPE_TSIG,
104         DNS_TYPE_IXFR,
105         DNS_TYPE_AXFR,
106         DNS_TYPE_MAILB,
107         DNS_TYPE_MAILA,
108         DNS_TYPE_ANY,
109         DNS_TYPE_URI,
110         DNS_TYPE_CAA,
111         DNS_TYPE_TA         = 0x8000,
112         DNS_TYPE_DLV,
113
114         _DNS_TYPE_MAX,
115         _DNS_TYPE_INVALID = -1
116 };
117
118 assert_cc(DNS_TYPE_SSHFP == 44);
119 assert_cc(DNS_TYPE_TLSA == 52);
120 assert_cc(DNS_TYPE_ANY == 255);