aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/dns.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2013-12-04 22:21:47 +0000
committerMichael Brown <mcb30@ipxe.org>2013-12-05 00:41:49 +0000
commit6248894f52b5794970292ea40f68fe0c892eafec (patch)
tree25cfd1614410615498bb091158da5c6b7f9bf42c /src/include/ipxe/dns.h
parent60c4e62e5dc56a451958456c7c013b161e53c9b9 (diff)
downloadipxe-6248894f52b5794970292ea40f68fe0c892eafec.tar.gz
[dns] Add support for resolving IPv6 addresses via AAAA records
Our policy is to prefer IPv6 addreses to IPv4 addresses, but to request IPv6 addresses only if we have an IPv6 address for the name server itself. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/dns.h')
-rw-r--r--src/include/ipxe/dns.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/ipxe/dns.h b/src/include/ipxe/dns.h
index 1c427601a..164c16aec 100644
--- a/src/include/ipxe/dns.h
+++ b/src/include/ipxe/dns.h
@@ -19,6 +19,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define DNS_TYPE_A 1
#define DNS_TYPE_CNAME 5
+#define DNS_TYPE_AAAA 28
#define DNS_TYPE_ANY 255
#define DNS_CLASS_IN 1
@@ -78,6 +79,11 @@ struct dns_rr_info_a {
struct in_addr in_addr;
} __attribute__ (( packed ));
+struct dns_rr_info_aaaa {
+ struct dns_rr_info_common common;
+ struct in6_addr in6_addr;
+} __attribute__ (( packed ));
+
struct dns_rr_info_cname {
struct dns_rr_info_common common;
char cname[0];
@@ -86,6 +92,7 @@ struct dns_rr_info_cname {
union dns_rr_info {
struct dns_rr_info_common common;
struct dns_rr_info_a a;
+ struct dns_rr_info_aaaa aaaa;
struct dns_rr_info_cname cname;
};