- printf("\n\tOptions [%s]",
- bittok2str(ospf_option_values,"none",op->ospf_hello.hello_options));
-
- TCHECK(op->ospf_hello.hello_deadint);
- printf("\n\t Hello Timer %us, Dead Timer %us, Mask %s, Priority %u",
- EXTRACT_16BITS(&op->ospf_hello.hello_helloint),
- EXTRACT_32BITS(&op->ospf_hello.hello_deadint),
- ipaddr_string(&op->ospf_hello.hello_mask),
- op->ospf_hello.hello_priority);
-
- TCHECK(op->ospf_hello.hello_dr);
- if (op->ospf_hello.hello_dr.s_addr != 0)
- printf("\n\t Designated Router %s",
- ipaddr_string(&op->ospf_hello.hello_dr));
-
- TCHECK(op->ospf_hello.hello_bdr);
- if (op->ospf_hello.hello_bdr.s_addr != 0)
- printf(", Backup Designated Router %s",
- ipaddr_string(&op->ospf_hello.hello_bdr));
-
- ap = op->ospf_hello.hello_neighbor;
- if ((u_char *)ap < dataend)
- printf("\n\t Neighbor List:");
- while ((u_char *)ap < dataend) {
- TCHECK(*ap);
- printf("\n\t %s", ipaddr_string(ap));
- ++ap;
- }
+ ND_PRINT("\n\tOptions [%s]",
+ bittok2str(ospf_option_values,"none",GET_U_1(op->ospf_hello.hello_options)));
+
+ ND_PRINT("\n\t Hello Timer %us, Dead Timer %us, Mask %s, Priority %u",
+ GET_BE_U_2(op->ospf_hello.hello_helloint),
+ GET_BE_U_4(op->ospf_hello.hello_deadint),
+ GET_IPADDR_STRING(op->ospf_hello.hello_mask),
+ GET_U_1(op->ospf_hello.hello_priority));
+
+ if (GET_IPV4_TO_NETWORK_ORDER(op->ospf_hello.hello_dr) != 0)
+ ND_PRINT("\n\t Designated Router %s",
+ GET_IPADDR_STRING(op->ospf_hello.hello_dr));
+
+ if (GET_IPV4_TO_NETWORK_ORDER(op->ospf_hello.hello_bdr) != 0)
+ ND_PRINT(", Backup Designated Router %s",
+ GET_IPADDR_STRING(op->ospf_hello.hello_bdr));
+
+ ap = op->ospf_hello.hello_neighbor;
+ if ((const u_char *)ap < dataend)
+ ND_PRINT("\n\t Neighbor List:");
+ while ((const u_char *)ap < dataend) {
+ ND_TCHECK_SIZE(ap);
+ ND_PRINT("\n\t %s", GET_IPADDR_STRING(*ap));
+ ++ap;
+ }