struct lsa6 lsu_lsa[1]; /* may repeat */
};
-static const char tstr[] = " [|ospf3]";
static const struct tok ospf6_option_values[] = {
{ OSPF6_OPTION_V6, "V6" },
{
const struct lsa6_prefix *lsapp = (const struct lsa6_prefix *)tptr;
u_int wordlen;
- struct in6_addr prefix;
+ nd_ipv6 prefix;
if (lsa_length < sizeof (*lsapp) - IPV6_ADDR_LEN_BYTES)
goto trunc;
goto trunc;
lsa_length -= wordlen * 4;
ND_TCHECK_LEN(lsapp->lsa_p_prefix, wordlen * 4);
- memset(&prefix, 0, sizeof(prefix));
- memcpy(&prefix, lsapp->lsa_p_prefix, wordlen * 4);
- ND_PRINT("\n\t\t%s/%u", ip6addr_string(ndo, (const u_char *)&prefix),
- EXTRACT_U_1(lsapp->lsa_p_len));
+ memset(prefix, 0, sizeof(prefix));
+ memcpy(prefix, lsapp->lsa_p_prefix, wordlen * 4);
+ ND_PRINT("\n\t\t%s/%u", ip6addr_string(ndo, prefix),
+ EXTRACT_U_1(lsapp->lsa_p_len));
if (EXTRACT_U_1(lsapp->lsa_p_opt)) {
ND_PRINT(", Options [%s]",
bittok2str(ospf6_lsa_prefix_option_values,
* header.
*/
if (length < sizeof(struct lsa6_hdr) || (const u_char *)lsap + length > dataend)
- return (1);
+ return (1);
lsa_length = length - sizeof(struct lsa6_hdr);
tptr = (const uint8_t *)lsap+sizeof(struct lsa6_hdr);
break;
case LS_TYPE_GRACE | LS_SCOPE_LINKLOCAL:
- if (ospf_print_grace_lsa(ndo, tptr, lsa_length) == -1) {
+ if (ospf_grace_lsa_print(ndo, tptr, lsa_length) == -1) {
return 1;
}
break;
case LS_TYPE_INTRA_ATE | LS_SCOPE_LINKLOCAL:
- if (ospf_print_te_lsa(ndo, tptr, lsa_length) == -1) {
+ if (ospf_te_lsa_print(ndo, tptr, lsa_length) == -1) {
return 1;
}
break;
const char *cp;
uint16_t datalen;
+ ndo->ndo_protocol = "ospf3";
op = (const struct ospf6hdr *)bp;
/* If the type is valid translate it, or just print the type */
return;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
}