ND_TCHECK_2(lsap->lsa_un.un_rla.rla_count);
j = EXTRACT_BE_U_2(lsap->lsa_un.un_rla.rla_count);
- ND_TCHECK(lsap->lsa_un.un_rla.rla_link);
+ ND_TCHECK_SIZE(lsap->lsa_un.un_rla.rla_link);
rlp = lsap->lsa_un.un_rla.rla_link;
while (j--) {
ND_TCHECK_SIZE(rlp);
ND_TCHECK_4(&lsap->lsa_un.un_nla.nla_mask);
ND_PRINT("\n\t Mask %s",
ipaddr_string(ndo, &lsap->lsa_un.un_sla.sla_mask));
- ND_TCHECK(lsap->lsa_un.un_sla.sla_tosmetric);
+ ND_TCHECK_SIZE(lsap->lsa_un.un_sla.sla_tosmetric);
lp = (const uint8_t *)lsap->lsa_un.un_sla.sla_tosmetric;
while (lp < ls_end) {
uint32_t ul;
break;
case LS_TYPE_SUM_ABR:
- ND_TCHECK(lsap->lsa_un.un_sla.sla_tosmetric);
+ ND_TCHECK_SIZE(lsap->lsa_un.un_sla.sla_tosmetric);
lp = (const uint8_t *)lsap->lsa_un.un_sla.sla_tosmetric;
while (lp < ls_end) {
uint32_t ul;
ND_PRINT("\n\t Mask %s",
ipaddr_string(ndo, &lsap->lsa_un.un_asla.asla_mask));
- ND_TCHECK(lsap->lsa_un.un_sla.sla_tosmetric);
+ ND_TCHECK_SIZE(lsap->lsa_un.un_sla.sla_tosmetric);
almp = lsap->lsa_un.un_asla.asla_metric;
while ((const u_char *)almp < ls_end) {
uint32_t ul;
switch (EXTRACT_U_1(op->ospf_type)) {
case OSPF_TYPE_HELLO:
- ND_TCHECK(op->ospf_hello.hello_options);
+ ND_TCHECK_1(op->ospf_hello.hello_options);
ND_PRINT("\n\tOptions [%s]",
bittok2str(ospf_option_values,"none",EXTRACT_U_1(op->ospf_hello.hello_options)));
- ND_TCHECK(op->ospf_hello.hello_deadint);
+ ND_TCHECK_4(op->ospf_hello.hello_deadint);
ND_PRINT("\n\t Hello Timer %us, Dead Timer %us, Mask %s, Priority %u",
EXTRACT_BE_U_2(op->ospf_hello.hello_helloint),
EXTRACT_BE_U_4(op->ospf_hello.hello_deadint),
ipaddr_string(ndo, &op->ospf_hello.hello_mask),
EXTRACT_U_1(op->ospf_hello.hello_priority));
- ND_TCHECK(op->ospf_hello.hello_dr);
+ ND_TCHECK_4(&op->ospf_hello.hello_dr);
if (op->ospf_hello.hello_dr.s_addr != 0)
ND_PRINT("\n\t Designated Router %s",
ipaddr_string(ndo, &op->ospf_hello.hello_dr));
- ND_TCHECK(op->ospf_hello.hello_bdr);
+ ND_TCHECK_4(&op->ospf_hello.hello_bdr);
if (op->ospf_hello.hello_bdr.s_addr != 0)
ND_PRINT(", Backup Designated Router %s",
ipaddr_string(ndo, &op->ospf_hello.hello_bdr));
break; /* HELLO */
case OSPF_TYPE_DD:
- ND_TCHECK(op->ospf_db.db_options);
+ ND_TCHECK_1(op->ospf_db.db_options);
ND_PRINT("\n\tOptions [%s]",
bittok2str(ospf_option_values, "none", EXTRACT_U_1(op->ospf_db.db_options)));
- ND_TCHECK(op->ospf_db.db_flags);
+ ND_TCHECK_1(op->ospf_db.db_flags);
ND_PRINT(", DD Flags [%s]",
bittok2str(ospf_dd_flag_values, "none", EXTRACT_U_1(op->ospf_db.db_flags)));
- ND_TCHECK(op->ospf_db.db_ifmtu);
+ ND_TCHECK_2(op->ospf_db.db_ifmtu);
if (EXTRACT_BE_U_2(op->ospf_db.db_ifmtu)) {
ND_PRINT(", MTU: %u", EXTRACT_BE_U_2(op->ospf_db.db_ifmtu));
}
- ND_TCHECK(op->ospf_db.db_seq);
+ ND_TCHECK_4(op->ospf_db.db_seq);
ND_PRINT(", Sequence: 0x%08x", EXTRACT_BE_U_4(op->ospf_db.db_seq));
/* Print all the LS adv's */
case OSPF_TYPE_LS_UPDATE:
lsap = op->ospf_lsu.lsu_lsa;
- ND_TCHECK(op->ospf_lsu.lsu_count);
+ ND_TCHECK_4(op->ospf_lsu.lsu_count);
lsa_count_max = EXTRACT_BE_U_4(op->ospf_lsu.lsu_count);
ND_PRINT(", %u LSA%s", lsa_count_max, PLURAL_SUFFIX(lsa_count_max));
for (lsa_count=1;lsa_count <= lsa_count_max;lsa_count++) {