#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.4 2003-11-16 09:36:09 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.5 2004-09-15 17:54:10 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
{ 58, "Fiber Channel"},
{ 0, NULL }
};
+
+#define DIFFSERV_BC_MODEL_RDM 0 /* draft-ietf-tewg-diff-te-proto-07 */
+#define DIFFSERV_BC_MODEL_MAM 1 /* draft-ietf-tewg-diff-te-proto-07 */
+#define DIFFSERV_BC_MODEL_EXTD_MAM 254 /* experimental */
+
+struct tok diffserv_te_bc_values[] = {
+ { DIFFSERV_BC_MODEL_RDM, "Russian dolls"},
+ { DIFFSERV_BC_MODEL_MAM, "Maximum allocation"},
+ { DIFFSERV_BC_MODEL_EXTD_MAM, "Maximum allocation with E-LSP support"},
+ { 0, NULL }
+};
-/* @(#) $Header: /tcpdump/master/tcpdump/gmpls.h,v 1.2 2003-06-09 23:28:09 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/gmpls.h,v 1.3 2004-09-15 17:54:11 hannes Exp $ (LBL) */
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
extern struct tok gmpls_switch_cap_values[];
extern struct tok gmpls_encoding_values[];
extern struct tok gmpls_payload_values[];
+extern struct tok diffserv_te_bc_values[];
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.120 2004-09-09 07:11:57 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.121 2004-09-15 17:54:11 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
}
break;
case ISIS_SUBTLV_EXT_IS_REACH_DIFFSERV_TE:
- if (subl >= 36) {
- printf("%sBandwidth Constraints Model ID: (%u)",ident, *tptr);
- tptr+=4;
- /* for now lets just print the first 8 BCs -
- * FIXME is this dep. on the BC model ?
- */
- for (bandwidth_constraint = 0; bandwidth_constraint < 8; bandwidth_constraint++) {
+ printf("%sBandwidth Constraints Model ID: %s (%u)",
+ ident,
+ tok2str(diffserv_te_bc_values, "unknown", *tptr),
+ *tptr);
+ tptr++;
+ /* decode BCs until the subTLV ends */
+ for (bandwidth_constraint = 0; bandwidth_constraint < (subl-1)/4; bandwidth_constraint++) {
bw.i = EXTRACT_32BITS(tptr);
printf("%s Bandwidth constraint %d: %.3f Mbps",
ident,
bandwidth_constraint,
bw.f*8/1000000 );
tptr+=4;
- }
}
break;
case ISIS_SUBTLV_EXT_IS_REACH_TE_METRIC:
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.52 2004-09-09 16:17:38 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.53 2004-09-15 17:54:11 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
}
break;
case LS_OPAQUE_TE_LINK_SUBTLV_DIFFSERV_TE:
- printf("\n\t\tBandwidth Constraints Model ID: (%u)", *tptr);
- for (bandwidth_constraint = 0; bandwidth_constraint < 8; bandwidth_constraint++) {
+ 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,