diff options
Diffstat (limited to 'contrib/tcpdump/print-ospf.c')
-rw-r--r-- | contrib/tcpdump/print-ospf.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/tcpdump/print-ospf.c b/contrib/tcpdump/print-ospf.c index 9ac6c61..634849b 100644 --- a/contrib/tcpdump/print-ospf.c +++ b/contrib/tcpdump/print-ospf.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.56.2.2 2005/05/06 07:57:19 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.56.2.3 2005/08/23 11:16:29 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -128,7 +128,7 @@ static struct tok lsa_opaque_te_link_tlv_subtlv_values[] = { { LS_OPAQUE_TE_LINK_SUBTLV_LINK_PROTECTION_TYPE, "Link Protection Type" }, { LS_OPAQUE_TE_LINK_SUBTLV_INTF_SW_CAP_DESCR, "Interface Switching Capability" }, { LS_OPAQUE_TE_LINK_SUBTLV_SHARED_RISK_GROUP, "Shared Risk Link Group" }, - { LS_OPAQUE_TE_LINK_SUBTLV_DIFFSERV_TE, "Diffserv TE" }, + { LS_OPAQUE_TE_LINK_SUBTLV_BW_CONSTRAINTS, "Bandwidth Constraints" }, { 0, NULL } }; @@ -253,7 +253,7 @@ ospf_print_lsa(register const struct lsa *lsap) register const struct aslametric *almp; register const struct mcla *mcp; register const u_int32_t *lp; - register int j, k, tlv_type, tlv_length, subtlv_type, subtlv_length, priority_level, bandwidth_constraint; + register int j, k, tlv_type, tlv_length, subtlv_type, subtlv_length, priority_level, te_class; register int ls_length; const u_int8_t *tptr; int count_srlg; @@ -627,22 +627,22 @@ ospf_print_lsa(register const struct lsa *lsap) printf(", %.3f Mbps", bw.f*8/1000000 ); break; case LS_OPAQUE_TE_LINK_SUBTLV_UNRES_BW: - for (priority_level = 0; priority_level < 8; priority_level++) { - bw.i = EXTRACT_32BITS(tptr+priority_level*4); - printf("\n\t\tpriority level %d: %.3f Mbps", - priority_level, + for (te_class = 0; te_class < 8; te_class++) { + bw.i = EXTRACT_32BITS(tptr+te_class*4); + printf("\n\t\tTE-Class %u: %.3f Mbps", + te_class, bw.f*8/1000000 ); } break; - case LS_OPAQUE_TE_LINK_SUBTLV_DIFFSERV_TE: + case LS_OPAQUE_TE_LINK_SUBTLV_BW_CONSTRAINTS: printf("\n\t\tBandwidth Constraints Model ID: %s (%u)", tok2str(diffserv_te_bc_values, "unknown", *tptr), *tptr); /* decode BCs until the subTLV ends */ - for (bandwidth_constraint = 0; bandwidth_constraint < (subtlv_length-4)/4; bandwidth_constraint++) { - bw.i = EXTRACT_32BITS(tptr+4+bandwidth_constraint*4); - printf("\n\t\t Bandwidth constraint %d: %.3f Mbps", - bandwidth_constraint, + for (te_class = 0; te_class < (subtlv_length-4)/4; te_class++) { + bw.i = EXTRACT_32BITS(tptr+4+te_class*4); + printf("\n\t\t Bandwidth constraint CT%u: %.3f Mbps", + te_class, bw.f*8/1000000 ); } break; |