chiark / gitweb /
resolved: SPF records
[elogind.git] / src / resolve / resolved-dns-rr.h
index 524630071dea7797907796a8ab15654aaf25bacc..afd623a3829c81cb116e1bd4f1408a2e39069126 100644 (file)
@@ -35,6 +35,8 @@ typedef struct DnsResourceRecord DnsResourceRecord;
 enum {
         DNS_CLASS_IN   = 0x01,
         DNS_CLASS_ANY  = 0xFF,
+        _DNS_CLASS_MAX,
+        _DNS_CLASS_INVALID = -1
 };
 
 /* DNS record types, see RFC 1035 */
@@ -53,6 +55,8 @@ enum {
         DNS_TYPE_DNAME = 0x27,
         DNS_TYPE_SSHFP = 0x2C,
 
+        DNS_TYPE_SPF   = 0x63,
+
         /* Special records */
         DNS_TYPE_ANY   = 0xFF,
         DNS_TYPE_OPT   = 0x29,      /* EDNS0 option */
@@ -60,6 +64,8 @@ enum {
         DNS_TYPE_TSIG  = 0xFA,
         DNS_TYPE_IXFR  = 0xFB,
         DNS_TYPE_AXFR  = 0xFC,
+        _DNS_TYPE_MAX,
+        _DNS_TYPE_INVALID = -1
 };
 
 struct DnsResourceKey {
@@ -94,9 +100,9 @@ struct DnsResourceRecord {
                         char *os;
                 } hinfo;
 
-                /* struct { */
-                /*         char **list; */
-                /* } txt; */
+                struct {
+                        char **strings;
+                } txt;
 
                 struct {
                         struct in_addr in_addr;
@@ -115,6 +121,11 @@ struct DnsResourceRecord {
                         uint32_t expire;
                         uint32_t minimum;
                 } soa;
+
+                struct {
+                        uint16_t priority;
+                        char *exchange;
+                } mx;
         };
 };