diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-31 10:19:43 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-31 14:56:03 +0200 |
commit | 0dae31d468b1a0e22d98921f7b0dbd92fd217167 (patch) | |
tree | 0b1b2c51eab8bc4dc474b5fd1b3777abf64ed85c /src/resolve/resolved-dns-rr.h | |
parent | resolved: SPF records (diff) | |
download | systemd-0dae31d468b1a0e22d98921f7b0dbd92fd217167.tar.xz systemd-0dae31d468b1a0e22d98921f7b0dbd92fd217167.zip |
resolved: LOC records
LOC records have a version field. So far only version 0 has been
published, but if a record with a different version was encountered,
our only recourse is to treat it as an unknown type. This is
implemented with the 'unparseable' flag, which causes the
serialization/deserialization and printing function to cause the
record as a blob. The flag can be used if other packet types cannot be
parsed for whatever reason.
Diffstat (limited to '')
-rw-r--r-- | src/resolve/resolved-dns-rr.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-rr.h b/src/resolve/resolved-dns-rr.h index afd623a382..8fb463946b 100644 --- a/src/resolve/resolved-dns-rr.h +++ b/src/resolve/resolved-dns-rr.h @@ -51,6 +51,7 @@ 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, @@ -78,6 +79,7 @@ struct DnsResourceRecord { unsigned n_ref; DnsResourceKey *key; uint32_t ttl; + bool unparseable; union { struct { void *data; @@ -126,6 +128,16 @@ struct DnsResourceRecord { 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; }; }; |