From 99c679696a3184ca9ab3f6a04b0bd633ae0055ad Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 5 Dec 2013 16:44:50 +0000 Subject: [ipv6] Expose NDP-provided settings (including the DNS server) Signed-off-by: Michael Brown --- src/include/ipxe/ndp.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'src/include') diff --git a/src/include/ipxe/ndp.h b/src/include/ipxe/ndp.h index 46083b53c..464dab333 100644 --- a/src/include/ipxe/ndp.h +++ b/src/include/ipxe/ndp.h @@ -67,6 +67,36 @@ struct ndp_prefix_information_option { /** NDP autonomous address configuration flag */ #define NDP_PREFIX_AUTONOMOUS 0x40 +/** NDP recursive DNS server option */ +#define NDP_OPT_RDNSS 25 + +/** NDP recursive DNS server */ +struct ndp_rdnss_option { + /** NDP option header */ + struct ndp_option_header header; + /** Reserved */ + uint16_t reserved; + /** Lifetime */ + uint32_t lifetime; + /** Addresses */ + struct in6_addr addresses[0]; +} __attribute__ (( packed )); + +/** NDP DNS search list option */ +#define NDP_OPT_DNSSL 31 + +/** NDP DNS search list */ +struct ndp_dnssl_option { + /** NDP option header */ + struct ndp_option_header header; + /** Reserved */ + uint16_t reserved; + /** Lifetime */ + uint32_t lifetime; + /** Domain names */ + uint8_t names[0]; +} __attribute__ (( packed )); + /** An NDP option */ union ndp_option { /** Option header */ @@ -75,6 +105,10 @@ union ndp_option { struct ndp_ll_addr_option ll_addr; /** Prefix information option */ struct ndp_prefix_information_option prefix; + /** Recursive DNS server option */ + struct ndp_rdnss_option rdnss; + /** DNS search list option */ + struct ndp_dnssl_option dnssl; } __attribute__ (( packed )); /** An NDP neighbour solicitation or advertisement header */ @@ -166,4 +200,7 @@ static inline int ndp_tx ( struct io_buffer *iobuf, struct net_device *netdev, &ndp_discovery, net_source, ll_source ); } +/** NDP settings block name */ +#define NDP_SETTINGS_NAME "ndp" + #endif /* _IPXE_NDP_H */ -- cgit v1.2.3-55-g7522