mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-17 21:56:45 +08:00
nd6: add support for RDNSS option (as per RFC 6106)
This commit is contained in:
@@ -2378,6 +2378,14 @@
|
||||
#define LWIP_ND6_TCP_REACHABILITY_HINTS 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LWIP_ND6_RDNSS_MAX_DNS_SERVERS > 0: Use IPv6 Router Advertisement Recursive
|
||||
* DNS Server Option (as per RFC 6106) to copy a defined maximum number of DNS
|
||||
* servers to the DNS module.
|
||||
*/
|
||||
#if !defined LWIP_ND6_RDNSS_MAX_DNS_SERVERS || defined __DOXYGEN__
|
||||
#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS 0
|
||||
#endif
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
@@ -247,6 +247,29 @@ PACK_STRUCT_END
|
||||
# include "arch/epstruct.h"
|
||||
#endif
|
||||
|
||||
/** Recursive DNS Server Option. */
|
||||
#if LWIP_ND6_RDNSS_MAX_DNS_SERVERS
|
||||
#define LWIP_RDNSS_OPTION_MAX_SERVERS LWIP_ND6_RDNSS_MAX_DNS_SERVERS
|
||||
#else
|
||||
#define LWIP_RDNSS_OPTION_MAX_SERVERS 1
|
||||
#endif
|
||||
#define ND6_OPTION_TYPE_RDNSS (25)
|
||||
#ifdef PACK_STRUCT_USE_INCLUDES
|
||||
# include "arch/bpstruct.h"
|
||||
#endif
|
||||
PACK_STRUCT_BEGIN
|
||||
struct rdnss_option {
|
||||
PACK_STRUCT_FLD_8(u8_t type);
|
||||
PACK_STRUCT_FLD_8(u8_t length);
|
||||
PACK_STRUCT_FIELD(u16_t reserved);
|
||||
PACK_STRUCT_FIELD(u32_t lifetime);
|
||||
PACK_STRUCT_FLD_S(ip6_addr_p_t rdnss_address[LWIP_RDNSS_OPTION_MAX_SERVERS]);
|
||||
} PACK_STRUCT_STRUCT;
|
||||
PACK_STRUCT_END
|
||||
#ifdef PACK_STRUCT_USE_INCLUDES
|
||||
# include "arch/epstruct.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user