aboutsummaryrefslogtreecommitdiff
path: root/slirp/ip6_icmp.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-03-20 16:02:52 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-07-03 23:31:12 +0200
commitf7725df38750c1eaebc6665159bb58ec23864c92 (patch)
treeb53b89a33b40cab71ee501ebf2d589152ef6c310 /slirp/ip6_icmp.h
parentef763fa4bd47892d9949dbaf292b032e2fc16475 (diff)
slirp: Add RDNSS advertisement
This adds the RDNSS option to IPv6 router advertisements, so that the guest can autoconfigure the DNS server address. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com> --- Changes since last submission: - Disable on windows, until we have support for it
Diffstat (limited to 'slirp/ip6_icmp.h')
-rw-r--r--slirp/ip6_icmp.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/slirp/ip6_icmp.h b/slirp/ip6_icmp.h
index 9460bf837a..2282d29076 100644
--- a/slirp/ip6_icmp.h
+++ b/slirp/ip6_icmp.h
@@ -122,6 +122,7 @@ struct ndpopt {
uint8_t ndpopt_len; /* /!\ In units of 8 octets */
union {
unsigned char linklayer_addr[6]; /* Source/Target Link-layer */
+#define ndpopt_linklayer ndpopt_body.linklayer_addr
struct prefixinfo { /* Prefix Information */
uint8_t prefix_length;
#ifdef HOST_WORDS_BIGENDIAN
@@ -134,19 +135,26 @@ struct ndpopt {
uint32_t reserved2;
struct in6_addr prefix;
} QEMU_PACKED prefixinfo;
- } ndpopt_body;
-#define ndpopt_linklayer ndpopt_body.linklayer_addr
#define ndpopt_prefixinfo ndpopt_body.prefixinfo
+ struct rdnss {
+ uint16_t reserved;
+ uint32_t lifetime;
+ struct in6_addr addr;
+ } QEMU_PACKED rdnss;
+#define ndpopt_rdnss ndpopt_body.rdnss
+ } ndpopt_body;
} QEMU_PACKED;
/* NDP options type */
#define NDPOPT_LINKLAYER_SOURCE 1 /* Source Link-Layer Address */
#define NDPOPT_LINKLAYER_TARGET 2 /* Target Link-Layer Address */
#define NDPOPT_PREFIX_INFO 3 /* Prefix Information */
+#define NDPOPT_RDNSS 25 /* Recursive DNS Server Address */
/* NDP options size, in octets. */
#define NDPOPT_LINKLAYER_LEN 8
#define NDPOPT_PREFIXINFO_LEN 32
+#define NDPOPT_RDNSS_LEN 24
/*
* Definition of type and code field values.