Lines Matching refs:ndo
184 ospf_print_grace_lsa(netdissect_options *ndo, in ospf_print_grace_lsa() argument
193 ND_PRINT((ndo, "\n\t Remaining LS length %u < 4", ls_length)); in ospf_print_grace_lsa()
201 ND_PRINT((ndo, "\n\t %s TLV (%u), length %u, value: ", in ospf_print_grace_lsa()
207 ND_PRINT((ndo, "\n\t Bogus length %u > %u", tlv_length, in ospf_print_grace_lsa()
222 ND_PRINT((ndo, "\n\t Bogus length %u != 4", tlv_length)); in ospf_print_grace_lsa()
225 ND_PRINT((ndo, "%us", EXTRACT_32BITS(tptr))); in ospf_print_grace_lsa()
230 ND_PRINT((ndo, "\n\t Bogus length %u != 1", tlv_length)); in ospf_print_grace_lsa()
233 ND_PRINT((ndo, "%s (%u)", in ospf_print_grace_lsa()
240 ND_PRINT((ndo, "\n\t Bogus length %u != 4", tlv_length)); in ospf_print_grace_lsa()
243 ND_PRINT((ndo, "%s", ipaddr_string(ndo, tptr))); in ospf_print_grace_lsa()
247 if (ndo->ndo_vflag <= 1) { in ospf_print_grace_lsa()
248 if (!print_unknown_data(ndo, tptr, "\n\t ", tlv_length)) in ospf_print_grace_lsa()
267 ospf_print_te_lsa(netdissect_options *ndo, in ospf_print_te_lsa() argument
280 ND_PRINT((ndo, "\n\t Remaining LS length %u < 4", ls_length)); in ospf_print_te_lsa()
288 ND_PRINT((ndo, "\n\t %s TLV (%u), length: %u", in ospf_print_te_lsa()
294 ND_PRINT((ndo, "\n\t Bogus length %u > %u", tlv_length, in ospf_print_te_lsa()
308 ND_PRINT((ndo, "\n\t Remaining TLV length %u < 4", in ospf_print_te_lsa()
322 ND_PRINT((ndo, "\n\t %s subTLV (%u), length: %u", in ospf_print_te_lsa()
331 ND_PRINT((ndo, " != 4")); in ospf_print_te_lsa()
334 ND_PRINT((ndo, ", 0x%08x", EXTRACT_32BITS(tptr))); in ospf_print_te_lsa()
339 ND_PRINT((ndo, " != 4 && != 8")); in ospf_print_te_lsa()
342 ND_PRINT((ndo, ", %s (0x%08x)", in ospf_print_te_lsa()
343 ipaddr_string(ndo, tptr), in ospf_print_te_lsa()
346 ND_PRINT((ndo, ", %s (0x%08x)", in ospf_print_te_lsa()
347 ipaddr_string(ndo, tptr+4), in ospf_print_te_lsa()
353 ND_PRINT((ndo, " != 4")); in ospf_print_te_lsa()
356 ND_PRINT((ndo, ", %s", ipaddr_string(ndo, tptr))); in ospf_print_te_lsa()
361 ND_PRINT((ndo, " != 4")); in ospf_print_te_lsa()
365 ND_PRINT((ndo, ", %.3f Mbps", bw.f * 8 / 1000000)); in ospf_print_te_lsa()
369 ND_PRINT((ndo, " != 32")); in ospf_print_te_lsa()
374 ND_PRINT((ndo, "\n\t\tTE-Class %u: %.3f Mbps", in ospf_print_te_lsa()
381 ND_PRINT((ndo, " < 4")); in ospf_print_te_lsa()
385 ND_PRINT((ndo, "\n\t\tBandwidth Constraints Model ID: %s (%u)", in ospf_print_te_lsa()
389 ND_PRINT((ndo, "\n\t\tlength %u != N x 4", subtlv_length)); in ospf_print_te_lsa()
393 ND_PRINT((ndo, "\n\t\tlength %u > 36", subtlv_length)); in ospf_print_te_lsa()
399 ND_PRINT((ndo, "\n\t\t Bandwidth constraint CT%u: %.3f Mbps", in ospf_print_te_lsa()
406 ND_PRINT((ndo, " != 4")); in ospf_print_te_lsa()
409 ND_PRINT((ndo, ", Metric %u", EXTRACT_32BITS(tptr))); in ospf_print_te_lsa()
414 ND_PRINT((ndo, " != 4")); in ospf_print_te_lsa()
417 ND_PRINT((ndo, ", %s", in ospf_print_te_lsa()
422 ND_PRINT((ndo, " < 36")); in ospf_print_te_lsa()
426 ND_PRINT((ndo, "\n\t\tInterface Switching Capability: %s", in ospf_print_te_lsa()
428 ND_PRINT((ndo, "\n\t\tLSP Encoding: %s\n\t\tMax LSP Bandwidth:", in ospf_print_te_lsa()
432 ND_PRINT((ndo, "\n\t\t priority level %d: %.3f Mbps", in ospf_print_te_lsa()
439 ND_PRINT((ndo, " != 1")); in ospf_print_te_lsa()
442 ND_PRINT((ndo, ", %s (%u)", in ospf_print_te_lsa()
449 ND_PRINT((ndo, " != N x 4")); in ospf_print_te_lsa()
454 ND_PRINT((ndo, "\n\t\t Shared risk group: ")); in ospf_print_te_lsa()
457 ND_PRINT((ndo, "%d", bw.i)); in ospf_print_te_lsa()
461 ND_PRINT((ndo, ", ")); in ospf_print_te_lsa()
466 if (ndo->ndo_vflag <= 1) { in ospf_print_te_lsa()
467 if (!print_unknown_data(ndo, tptr, "\n\t\t", subtlv_length)) in ospf_print_te_lsa()
484 ND_PRINT((ndo, "\n\t TLV length %u < 4", tlv_length)); in ospf_print_te_lsa()
488 ND_PRINT((ndo, ", %s", ipaddr_string(ndo, tptr))); in ospf_print_te_lsa()
492 if (ndo->ndo_vflag <= 1) { in ospf_print_te_lsa()
493 if (!print_unknown_data(ndo, tptr, "\n\t ", tlv_length)) in ospf_print_te_lsa()
508 ND_PRINT((ndo, "%s", istr)); in ospf_print_te_lsa()
513 ospf_print_lshdr(netdissect_options *ndo, in ospf_print_lshdr() argument
521 ND_PRINT((ndo, "\n\t Bogus length %u < header (%lu)", ls_length, in ospf_print_lshdr()
527 ND_PRINT((ndo, "\n\t Advertising Router %s, seq 0x%08x, age %us, length %u", in ospf_print_lshdr()
528 ipaddr_string(ndo, &lshp->ls_router), in ospf_print_lshdr()
539 ND_PRINT((ndo, "\n\t %s LSA (%d), Opaque-Type %s LSA (%u), Opaque-ID %u", in ospf_print_lshdr()
554 ND_PRINT((ndo, "\n\t %s LSA (%d), LSA-ID: %s", in ospf_print_lshdr()
557 ipaddr_string(ndo, &lshp->un_lsa_id.lsa_id))); in ospf_print_lshdr()
562 …ND_PRINT((ndo, "\n\t Options: [%s]", bittok2str(ospf_option_values, "none", lshp->ls_options))); in ospf_print_lshdr()
581 ospf_print_tos_metrics(netdissect_options *ndo, in ospf_print_tos_metrics() argument
595 ND_PRINT((ndo, "\n\t\ttopology %s (%u), metric %u", in ospf_print_tos_metrics()
615 ospf_print_lsa(netdissect_options *ndo, in ospf_print_lsa() argument
629 ls_length = ospf_print_lshdr(ndo, &lsap->ls_hdr); in ospf_print_lsa()
639 ND_PRINT((ndo, "\n\t Router LSA Options: [%s]", in ospf_print_lsa()
651 ND_PRINT((ndo, "\n\t Virtual Link: Neighbor Router-ID: %s, Interface Address: %s", in ospf_print_lsa()
652 ipaddr_string(ndo, &rlp->link_id), in ospf_print_lsa()
653 ipaddr_string(ndo, &rlp->link_data))); in ospf_print_lsa()
657 ND_PRINT((ndo, "\n\t Neighbor Router-ID: %s, Interface Address: %s", in ospf_print_lsa()
658 ipaddr_string(ndo, &rlp->link_id), in ospf_print_lsa()
659 ipaddr_string(ndo, &rlp->link_data))); in ospf_print_lsa()
663 ND_PRINT((ndo, "\n\t Neighbor Network-ID: %s, Interface Address: %s", in ospf_print_lsa()
664 ipaddr_string(ndo, &rlp->link_id), in ospf_print_lsa()
665 ipaddr_string(ndo, &rlp->link_data))); in ospf_print_lsa()
669 ND_PRINT((ndo, "\n\t Stub Network: %s, Mask: %s", in ospf_print_lsa()
670 ipaddr_string(ndo, &rlp->link_id), in ospf_print_lsa()
671 ipaddr_string(ndo, &rlp->link_data))); in ospf_print_lsa()
675 ND_PRINT((ndo, "\n\t Unknown Router Link Type (%u)", in ospf_print_lsa()
680 if (ospf_print_tos_metrics(ndo, &rlp->un_tos)) in ospf_print_lsa()
690 ND_PRINT((ndo, "\n\t Mask %s\n\t Connected Routers:", in ospf_print_lsa()
691 ipaddr_string(ndo, &lsap->lsa_un.un_nla.nla_mask))); in ospf_print_lsa()
695 ND_PRINT((ndo, "\n\t %s", ipaddr_string(ndo, ap))); in ospf_print_lsa()
702 ND_PRINT((ndo, "\n\t Mask %s", in ospf_print_lsa()
703 ipaddr_string(ndo, &lsap->lsa_un.un_sla.sla_mask))); in ospf_print_lsa()
712 ND_PRINT((ndo, "\n\t\ttopology %s (%u) metric %d", in ospf_print_lsa()
729 ND_PRINT((ndo, "\n\t\ttopology %s (%u) metric %d", in ospf_print_lsa()
740 ND_PRINT((ndo, "\n\t Mask %s", in ospf_print_lsa()
741 ipaddr_string(ndo, &lsap->lsa_un.un_asla.asla_mask))); in ospf_print_lsa()
751 ND_PRINT((ndo, "\n\t\ttopology %s (%u), type %d, metric", in ospf_print_lsa()
756 ND_PRINT((ndo, " infinite")); in ospf_print_lsa()
758 ND_PRINT((ndo, " %d", (ul & ASLA_MASK_METRIC))); in ospf_print_lsa()
762 ND_PRINT((ndo, ", forward %s", ipaddr_string(ndo, &almp->asla_forward))); in ospf_print_lsa()
766 ND_PRINT((ndo, ", tag %s", ipaddr_string(ndo, &almp->asla_tag))); in ospf_print_lsa()
780 ND_PRINT((ndo, "\n\t Router Router-ID %s", in ospf_print_lsa()
781 ipaddr_string(ndo, &mcp->mcla_vid))); in ospf_print_lsa()
785 ND_PRINT((ndo, "\n\t Network Designated Router %s", in ospf_print_lsa()
786 ipaddr_string(ndo, &mcp->mcla_vid))); in ospf_print_lsa()
790 ND_PRINT((ndo, "\n\t unknown VertexType (%u)", in ospf_print_lsa()
809 ND_PRINT((ndo, "\n\t Remaining LS length %u < 4", ls_length)); in ospf_print_lsa()
817 ND_PRINT((ndo, "\n\t %s TLV (%u), length: %u, value: ", in ospf_print_lsa()
823 ND_PRINT((ndo, "\n\t Bogus length %u > %u", tlv_length, in ospf_print_lsa()
832 ND_PRINT((ndo, "\n\t Bogus length %u != 4", tlv_length)); in ospf_print_lsa()
835 ND_PRINT((ndo, "Capabilities: %s", in ospf_print_lsa()
839 if (ndo->ndo_vflag <= 1) { in ospf_print_lsa()
840 if (!print_unknown_data(ndo, tptr, "\n\t ", tlv_length)) in ospf_print_lsa()
852 if (ospf_print_grace_lsa(ndo, (const uint8_t *)(&lsap->lsa_un.un_grace_tlv.type), in ospf_print_lsa()
859 if (ospf_print_te_lsa(ndo, (const uint8_t *)(&lsap->lsa_un.un_te_lsa_tlv.type), in ospf_print_lsa()
866 if (ndo->ndo_vflag <= 1) { in ospf_print_lsa()
867 if (!print_unknown_data(ndo, (const uint8_t *)lsap->lsa_un.un_unknown, in ospf_print_lsa()
876 if (ndo->ndo_vflag> 1) in ospf_print_lsa()
877 if (!print_unknown_data(ndo, (const uint8_t *)lsap->lsa_un.un_unknown, in ospf_print_lsa()
888 ospf_decode_lls(netdissect_options *ndo, in ospf_decode_lls() argument
923 ND_PRINT((ndo, "\n\t[LLS truncated]")); in ospf_decode_lls()
927 ND_PRINT((ndo, "\n\t LLS: checksum: 0x%04x", (u_int)EXTRACT_16BITS(dptr))); in ospf_decode_lls()
932 ND_PRINT((ndo, ", length: %u", length2)); in ospf_decode_lls()
939 ND_PRINT((ndo, "\n\t %s (%u)", in ospf_decode_lls()
945 ND_PRINT((ndo, ", length: %u", lls_len)); in ospf_decode_lls()
951 ND_PRINT((ndo, " [should be 4]")); in ospf_decode_lls()
956 ND_PRINT((ndo, "\n\t Options: 0x%08x [%s]", lls_flags, in ospf_decode_lls()
963 ND_PRINT((ndo, " [should be 20]")); in ospf_decode_lls()
967 ND_PRINT((ndo, "\n\t Sequence number: 0x%08x", EXTRACT_32BITS(dptr))); in ospf_decode_lls()
980 ospf_decode_v2(netdissect_options *ndo, in ospf_decode_v2() argument
1000 ND_PRINT((ndo, "\n\tOptions [%s]", in ospf_decode_v2()
1004 ND_PRINT((ndo, "\n\t Hello Timer %us, Dead Timer %us, Mask %s, Priority %u", in ospf_decode_v2()
1007 ipaddr_string(ndo, &op->ospf_hello.hello_mask), in ospf_decode_v2()
1012 ND_PRINT((ndo, "\n\t Designated Router %s", in ospf_decode_v2()
1013 ipaddr_string(ndo, &op->ospf_hello.hello_dr))); in ospf_decode_v2()
1017 ND_PRINT((ndo, ", Backup Designated Router %s", in ospf_decode_v2()
1018 ipaddr_string(ndo, &op->ospf_hello.hello_bdr))); in ospf_decode_v2()
1022 ND_PRINT((ndo, "\n\t Neighbor List:")); in ospf_decode_v2()
1025 ND_PRINT((ndo, "\n\t %s", ipaddr_string(ndo, ap))); in ospf_decode_v2()
1032 ND_PRINT((ndo, "\n\tOptions [%s]", in ospf_decode_v2()
1035 ND_PRINT((ndo, ", DD Flags [%s]", in ospf_decode_v2()
1039 ND_PRINT((ndo, ", MTU: %u", EXTRACT_16BITS(&op->ospf_db.db_ifmtu))); in ospf_decode_v2()
1042 ND_PRINT((ndo, ", Sequence: 0x%08x", EXTRACT_32BITS(&op->ospf_db.db_seq))); in ospf_decode_v2()
1046 while (((const u_char *)lshp < dataend) && ospf_print_lshdr(ndo, lshp) != -1) { in ospf_decode_v2()
1056 ND_PRINT((ndo, "\n\t Advertising Router: %s, %s LSA (%u)", in ospf_decode_v2()
1057 ipaddr_string(ndo, &lsrp->ls_router), in ospf_decode_v2()
1066 ND_PRINT((ndo, ", Opaque-Type: %s LSA (%u), Opaque-ID: %u", in ospf_decode_v2()
1072 ND_PRINT((ndo, ", LSA-ID: %s", in ospf_decode_v2()
1073 ipaddr_string(ndo, &lsrp->un_ls_stateid.ls_stateid))); in ospf_decode_v2()
1085 ND_PRINT((ndo, ", %d LSA%s", lsa_count_max, PLURAL_SUFFIX(lsa_count_max))); in ospf_decode_v2()
1087 ND_PRINT((ndo, "\n\t LSA #%u", lsa_count)); in ospf_decode_v2()
1088 lsap = (const struct lsa *)ospf_print_lsa(ndo, lsap); in ospf_decode_v2()
1096 while (ospf_print_lshdr(ndo, lshp) != -1) { in ospf_decode_v2()
1110 ospf_print(netdissect_options *ndo, in ospf_print() argument
1124 ndo->ndo_snapend -= OSPF_AUTH_MD5_LEN; in ospf_print()
1131 ND_PRINT((ndo, "OSPFv%u, %s, length %u", op->ospf_version, cp, length)); in ospf_print()
1135 if (!ndo->ndo_vflag) { /* non verbose - so lets bail out here */ in ospf_print()
1141 ND_PRINT((ndo, " [len %d]", EXTRACT_16BITS(&op->ospf_len))); in ospf_print()
1151 ND_PRINT((ndo, "\n\tRouter-ID %s", ipaddr_string(ndo, &op->ospf_routerid))); in ospf_print()
1155 ND_PRINT((ndo, ", Area %s", ipaddr_string(ndo, &op->ospf_areaid))); in ospf_print()
1157 ND_PRINT((ndo, ", Backbone Area")); in ospf_print()
1159 if (ndo->ndo_vflag) { in ospf_print()
1163 ND_PRINT((ndo, ", Authentication Type: %s (%u)", in ospf_print()
1173 ND_PRINT((ndo, "\n\tSimple text password: ")); in ospf_print()
1174 safeputs(ndo, op->ospf_authdata, OSPF_AUTH_SIMPLE_LEN); in ospf_print()
1178 ND_PRINT((ndo, "\n\tKey-ID: %u, Auth-Length: %u, Crypto Sequence Number: 0x%08x", in ospf_print()
1193 if (ospf_decode_v2(ndo, op, dataend)) in ospf_print()
1196 if (ospf_decode_lls(ndo, op, length)) in ospf_print()
1202 ND_PRINT((ndo, " ospf [version %d]", op->ospf_version)); in ospf_print()
1208 ND_PRINT((ndo, "%s", tstr)); in ospf_print()