- register const rtrid_t *ap;
- register const struct lsr6 *lsrp;
- register const struct lsa6_hdr *lshp;
- register const struct lsa6 *lsap;
- register int i;
-
- switch (op->ospf6_type) {
-
- case OSPF_TYPE_HELLO:
- printf("\n\tOptions [%s]",
- bittok2str(ospf6_option_values, "none",
- EXTRACT_32BITS(&op->ospf6_hello.hello_options)));
-
- TCHECK(op->ospf6_hello.hello_deadint);
- printf("\n\t Hello Timer %us, Dead Timer %us, Interface-ID %s, Priority %u",
- EXTRACT_16BITS(&op->ospf6_hello.hello_helloint),
- EXTRACT_16BITS(&op->ospf6_hello.hello_deadint),
- ipaddr_string(&op->ospf6_hello.hello_ifid),
- op->ospf6_hello.hello_priority);
-
- TCHECK(op->ospf6_hello.hello_dr);
- if (op->ospf6_hello.hello_dr != 0)
- printf("\n\t Designated Router %s",
- ipaddr_string(&op->ospf6_hello.hello_dr));
- TCHECK(op->ospf6_hello.hello_bdr);
- if (op->ospf6_hello.hello_bdr != 0)
- printf(", Backup Designated Router %s",
- ipaddr_string(&op->ospf6_hello.hello_bdr));
- if (vflag > 1) {
- printf("\n\t Neighbor List:");
- ap = op->ospf6_hello.hello_neighbor;
- while ((u_char *)ap < dataend) {
- TCHECK(*ap);
- printf("\n\t %s", ipaddr_string(ap));
+ const rtrid_t *ap;
+ const struct lsr6 *lsrp;
+ const struct lsa6_hdr *lshp;
+ const struct lsa6 *lsap;
+ int i;
+
+ switch (GET_U_1(op->ospf6_type)) {
+
+ case OSPF_TYPE_HELLO: {
+ const struct hello6 *hellop = (const struct hello6 *)((const uint8_t *)op + OSPF6HDR_LEN);
+
+ ND_PRINT("\n\tOptions [%s]",
+ bittok2str(ospf6_option_values, "none",
+ GET_BE_U_4(hellop->hello_options)));
+
+ ND_PRINT("\n\t Hello Timer %us, Dead Timer %us, Interface-ID %s, Priority %u",
+ GET_BE_U_2(hellop->hello_helloint),
+ GET_BE_U_2(hellop->hello_deadint),
+ GET_IPADDR_STRING(hellop->hello_ifid),
+ GET_U_1(hellop->hello_priority));
+
+ if (GET_BE_U_4(hellop->hello_dr) != 0)
+ ND_PRINT("\n\t Designated Router %s",
+ GET_IPADDR_STRING(hellop->hello_dr));
+ if (GET_BE_U_4(hellop->hello_bdr) != 0)
+ ND_PRINT(", Backup Designated Router %s",
+ GET_IPADDR_STRING(hellop->hello_bdr));
+ if (ndo->ndo_vflag > 1) {
+ ND_PRINT("\n\t Neighbor List:");
+ ap = hellop->hello_neighbor;
+ while ((const u_char *)ap < dataend) {
+ ND_PRINT("\n\t %s", GET_IPADDR_STRING(ap));