forked from yaosj2k/dnsforwarder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dnsrelated.h
executable file
·73 lines (63 loc) · 1.42 KB
/
dnsrelated.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef _DNS_RELATED_
#define _DNS_RELATED_
#include "common.h"
typedef enum _DNSRecordType{
DNS_TYPE_UNKNOWN = 0,
DNS_TYPE_A = 1,
DNS_TYPE_AAAA = 28,
DNS_TYPE_APL = 42,
DNS_TYPE_CERT = 37,
DNS_TYPE_CNAME = 5,
DNS_TYPE_DHCID = 49,
DNS_TYPE_DLV = 32769,
DNS_TYPE_DNAME = 39,
DNS_TYPE_DNSKEY = 48,
DNS_TYPE_DS = 43,
DNS_TYPE_HIP = 55,
DNS_TYPE_IPSECKEY = 45,
DNS_TYPE_KEY = 25,
DNS_TYPE_KX = 36,
DNS_TYPE_LOC = 29,
DNS_TYPE_MX = 15,
DNS_TYPE_NAPTR = 35,
DNS_TYPE_NS = 2,
DNS_TYPE_NSEC = 47,
DNS_TYPE_NSEC3 = 50,
DNS_TYPE_NSEC3PARAM = 51,
DNS_TYPE_PTR = 12,
DNS_TYPE_RRSIG = 46,
DNS_TYPE_RP = 17,
DNS_TYPE_SIG = 24,
DNS_TYPE_SOA = 6,
DNS_TYPE_SPF = 99,
DNS_TYPE_SRV = 33,
DNS_TYPE_SSHFP = 44,
DNS_TYPE_TA = 32768,
DNS_TYPE_TKEY = 249,
DNS_TYPE_TSIG = 250,
DNS_TYPE_TXT = 16,
DNS_TYPE_ANY = 255,
DNS_TYPE_AXFR = 252,
DNS_TYPE_IXFR = 251,
DNS_TYPE_HINFO = 13,
DNS_TYPE_OPT = 41,
}DNSRecordType;
typedef enum _DNSRecordClass{
DNS_CLASS_UNKNOWN = 0,
DNS_CLASS_IN = 1,
DNS_CLASS_CH = 3,
DNS_CLASS_ANY = 255,
}DNSRecordClass;
typedef struct _DNSTypeName{
DNSRecordType Num;
const char *Name;
}DNSTypeAndName;
typedef struct _DNSSECAlgorithm {
int Num;
const char *Name;
} DNSSECAlgorithm;
extern const DNSTypeAndName DNSTypeList[];
extern const DNSSECAlgorithm DNSSECAlgorithmList[];
const char *DNSGetTypeName(uint16_t Num);
const char *DNSSECGetAlgorithmName(int Num);
#endif /* _DNS_RELATED_ */