void ospf6_prefix_options_printbuf(uint8_t prefix_options, char *buf, int size)
{
- const char *p, *mc, *la, *nu;
+ const char *dn, *p, *mc, *la, *nu;
- p = (CHECK_FLAG(prefix_options, OSPF6_PREFIX_OPTION_P)
- ? "P"
- : "--");
- mc = (CHECK_FLAG(prefix_options, OSPF6_PREFIX_OPTION_MC)
- ? "MC"
- : "--");
- la = (CHECK_FLAG(prefix_options, OSPF6_PREFIX_OPTION_LA)
- ? "LA"
- : "--");
- nu = (CHECK_FLAG(prefix_options, OSPF6_PREFIX_OPTION_NU)
- ? "NU"
- : "--");
- snprintf(buf, size, "%s|%s|%s|%s", p, mc, la, nu);
+ dn = (CHECK_FLAG(prefix_options, OSPF6_PREFIX_OPTION_DN) ? "DN" : "--");
+ p = (CHECK_FLAG(prefix_options, OSPF6_PREFIX_OPTION_P) ? "P" : "--");
+ mc = (CHECK_FLAG(prefix_options, OSPF6_PREFIX_OPTION_MC) ? "MC" : "--");
+ la = (CHECK_FLAG(prefix_options, OSPF6_PREFIX_OPTION_LA) ? "LA" : "--");
+ nu = (CHECK_FLAG(prefix_options, OSPF6_PREFIX_OPTION_NU) ? "NU" : "--");
+ snprintf(buf, size, "%s|%s|%s|%s|%s", dn, p, mc, la, nu);
}
void ospf6_capability_printbuf(char capability, char *buf, int size)
#define OSPF6_PREFIX_OPTION_LA (1 << 1) /* Local Address */
#define OSPF6_PREFIX_OPTION_MC (1 << 2) /* MultiCast */
#define OSPF6_PREFIX_OPTION_P (1 << 3) /* Propagate (NSSA) */
+#define OSPF6_PREFIX_OPTION_DN \
+ (1 << 4) /* DN bit to prevent loops in VPN environment */
/* caddr_t OSPF6_PREFIX_BODY (struct ospf6_prefix *); */
#define OSPF6_PREFIX_BODY(x) ((caddr_t)(x) + sizeof(struct ospf6_prefix))