X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fresolve%2Fresolved-dns-rr.h;h=8fb463946b37f9d6ac32bf97d589df19256e8cb7;hb=ec2c5e4398f9d65e5dfe61530f2556224733d1e6;hp=524630071dea7797907796a8ab15654aaf25bacc;hpb=2d4c5cbc0ed3ccb09dc086a040088b454c22c644;p=elogind.git diff --git a/src/resolve/resolved-dns-rr.h b/src/resolve/resolved-dns-rr.h index 524630071..8fb463946 100644 --- a/src/resolve/resolved-dns-rr.h +++ b/src/resolve/resolved-dns-rr.h @@ -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 */ @@ -49,10 +51,13 @@ enum { DNS_TYPE_MX = 0x0F, DNS_TYPE_TXT = 0x10, DNS_TYPE_AAAA = 0x1C, + DNS_TYPE_LOC = 0x1D, DNS_TYPE_SRV = 0x21, 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 +65,8 @@ enum { DNS_TYPE_TSIG = 0xFA, DNS_TYPE_IXFR = 0xFB, DNS_TYPE_AXFR = 0xFC, + _DNS_TYPE_MAX, + _DNS_TYPE_INVALID = -1 }; struct DnsResourceKey { @@ -72,6 +79,7 @@ struct DnsResourceRecord { unsigned n_ref; DnsResourceKey *key; uint32_t ttl; + bool unparseable; union { struct { void *data; @@ -94,9 +102,9 @@ struct DnsResourceRecord { char *os; } hinfo; - /* struct { */ - /* char **list; */ - /* } txt; */ + struct { + char **strings; + } txt; struct { struct in_addr in_addr; @@ -115,6 +123,21 @@ struct DnsResourceRecord { uint32_t expire; uint32_t minimum; } soa; + + struct { + uint16_t priority; + char *exchange; + } mx; + + struct { + uint8_t version; + uint8_t size; + uint8_t horiz_pre; + uint8_t vert_pre; + uint32_t latitude; + uint32_t longitude; + uint32_t altitude; + } loc; }; };