* LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
*
+ * Support for the Link Management Protocol as per rfc 4204.
+ *
* Support for LMP service discovery extensions (defined by UNI 1.0) added
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-lmp.c,v 1.7 2006-03-28 07:32:41 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-lmp.c,v 1.11 2007-08-02 17:32:49 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
};
static const struct tok lmp_obj_begin_verify_error_values[] = {
- { 0x01, "\n\t\tLink Verification Procedure Not supported"},
- { 0x02, "\n\t\tUnwilling to verify"},
- { 0x04, "\n\t\tUnsupported verification transport mechanism"},
- { 0x08, "\n\t\tLink_Id configuration error"},
- { 0x10, "\n\t\tUnknown object c-type"},
+ { 0x01, "Link Verification Procedure Not supported"},
+ { 0x02, "Unwilling to verify"},
+ { 0x04, "Unsupported verification transport mechanism"},
+ { 0x08, "Link-Id configuration error"},
+ { 0x10, "Unknown object c-type"},
{ 0, NULL}
};
static const struct tok lmp_obj_link_summary_error_values[] = {
- { 0x01, "\n\t\tUnacceptable non-negotiable LINK_SUMMARY parameters"},
- { 0x02, "\n\t\tRenegotiate LINK_SUMMARY parameters"},
- { 0x04, "\n\t\tInvalid TE-LINK Object"},
- { 0x08, "\n\t\tInvalid DATA-LINK Object"},
- { 0x10, "\n\t\tUnknown TE-LINK Object c-type"},
- { 0x20, "\n\t\tUnknown DATA-LINK Object c-type"},
+ { 0x01, "Unacceptable non-negotiable LINK-SUMMARY parameters"},
+ { 0x02, "Renegotiate LINK-SUMMARY parameters"},
+ { 0x04, "Invalid TE-LINK Object"},
+ { 0x08, "Invalid DATA-LINK Object"},
+ { 0x10, "Unknown TE-LINK Object c-type"},
+ { 0x20, "Unknown DATA-LINK Object c-type"},
{ 0, NULL}
};
#define LMP_SD_SERVICE_CONFIG_CPSA_LINK_TYPE_SDH 5 /* UNI 1.0 Sec 9.4.2 */
#define LMP_SD_SERVICE_CONFIG_CPSA_LINK_TYPE_SONET 6 /* UNI 1.0 Sec 9.4.2 */
-#define FALSE 0
-#define TRUE 1
-
/*
* the ctypes are not globally unique so for
* translating it to strings we build a table based
case LMP_OBJ_HELLO:
switch(lmp_obj_ctype) {
case LMP_CTYPE_HELLO:
- printf("\n\t TxSeqNum: %u\n\t RcvSeqNum: %u",
+ printf("\n\t Tx Seq: %u, Rx Seq: %u",
EXTRACT_32BITS(obj_tptr),
EXTRACT_32BITS(obj_tptr+4));
break;
EXTRACT_16BITS(obj_tptr+offset+2)&0x00FF);
bw.i = EXTRACT_32BITS(obj_tptr+offset+4);
printf("\n\t Min Reservable Bandwidth: %.3f Mbps",
- bw.f);
+ bw.f*8/1000000);
bw.i = EXTRACT_32BITS(obj_tptr+offset+8);
printf("\n\t Max Reservable Bandwidth: %.3f Mbps",
- bw.f);
+ bw.f*8/1000000);
break;
case WAVELENGTH_SUBOBJ:
printf("\n\t Wavelength: %u",
EXTRACT_16BITS(obj_tptr+10),
EXTRACT_16BITS(obj_tptr+10)&8000 ? "(Payload test messages capable)" : "");
bw.i = EXTRACT_32BITS(obj_tptr+12);
- printf("\n\t Transmission Rate: %.3f Mbps",bw.f);
+ printf("\n\t Transmission Rate: %.3f Mbps",bw.f*8/1000000);
printf("\n\t Wavelength: %u",
EXTRACT_32BITS(obj_tptr+16));
break;