Daniel Hagerty <hag at ai dot mit dot edu>
Darren Reed <darrenr at reed dot wattle dot id dot au>
David Binderman <d dot binderman at virgin dot net>
+ David Horn <dhorn2000 at gmail dot com>
David Smith <dsmith at redhat dot com>
David Young <dyoung at ojctech dot com>
Don Ebright <Don dot Ebright at compuware dot com>
#define ND_OPT_ADVINTERVAL 7
#define ND_OPT_HOMEAGENT_INFO 8
#define ND_OPT_ROUTE_INFO 9 /* draft-ietf-ipngwg-router-preference, not officially assigned yet */
-
+#define ND_OPT_RDNSS 25
struct nd_opt_prefix_info { /* prefix information */
u_int8_t nd_opt_pi_type;
u_int32_t nd_opt_mtu_mtu;
};
+struct nd_opt_rdnss { /* RDNSS RFC 5006 */
+ u_int8_t nd_opt_rdnss_type;
+ u_int8_t nd_opt_rdnss_len;
+ u_int16_t nd_opt_rdnss_reserved;
+ u_int32_t nd_opt_rdnss_lifetime;
+ struct in6_addr nd_opt_rdnss_addr[1]; /* variable-length */
+};
+
struct nd_opt_advinterval { /* Advertisement interval option */
u_int8_t nd_opt_adv_type;
u_int8_t nd_opt_adv_len;
{ ND_OPT_PREFIX_INFORMATION, "prefix info"},
{ ND_OPT_REDIRECTED_HEADER, "redirected header"},
{ ND_OPT_MTU, "mtu"},
+ { ND_OPT_RDNSS, "rdnss"},
{ ND_OPT_ADVINTERVAL, "advertisement interval"},
{ ND_OPT_HOMEAGENT_INFO, "homeagent information"},
{ ND_OPT_ROUTE_INFO, "route info"},
const struct nd_opt_prefix_info *opp;
const struct icmp6_opts_redirect *opr;
const struct nd_opt_mtu *opm;
+ const struct nd_opt_rdnss *oprd;
const struct nd_opt_advinterval *opa;
const struct nd_opt_homeagent_info *oph;
const struct nd_opt_route_info *opri;
const u_char *cp, *ep;
struct in6_addr in6, *in6p;
size_t l;
+ u_int i;
#define ECHECK(var) if ((u_char *)&(var) > ep - sizeof(var)) return
EXTRACT_32BITS(&opm->nd_opt_mtu_mtu),
(op->nd_opt_len != 1) ? "bad option length" : "" );
break;
+ case ND_OPT_RDNSS:
+ oprd = (struct nd_opt_rdnss *)op;
+ l = (op->nd_opt_len - 1) / 2;
+ printf(" lifetime %us,",
+ EXTRACT_32BITS(&oprd->nd_opt_rdnss_lifetime));
+ for (i = 0; i < l; i++) {
+ TCHECK(oprd->nd_opt_rdnss_addr[i]);
+ printf(" addr: %s",
+ ip6addr_string(&oprd->nd_opt_rdnss_addr[i]));
+ }
+ break;
case ND_OPT_ADVINTERVAL:
opa = (struct nd_opt_advinterval *)op;
TCHECK(opa->nd_opt_adv_interval);