*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.46 2006-02-08 16:18:56 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.47 2006-02-08 16:50:16 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
{ 0, NULL }
};
+struct tok atm_pty_values[] = {
+ { 0x0, "user data, uncongested, SDU 0" },
+ { 0x1, "user data, uncongested, SDU 1" },
+ { 0x2, "user data, congested, SDU 0" },
+ { 0x3, "user data, congested, SDU 1" },
+ { 0x4, "VCC OAM F5 flow segment" },
+ { 0x5, "VCC OAM F5 flow end-to-end" },
+ { 0x6, "Traffic Control and resource Mgmt" },
+ { 0, NULL }
+};
+
#define OAM_CELLTYPE_FM 0x1
#define OAM_CELLTYPE_PM 0x2
#define OAM_CELLTYPE_AD 0x8
payload = (cell_header>>1)&0x7;
clp = cell_header&0x1;
- printf("%s, vpi %u, vci %u, payload %u, clp %u, length %u",
+ printf("%s, vpi %u, vci %u, payload [ %s ], clp %u, length %u",
tok2str(oam_f_values, "OAM F5", vci),
- vpi, vci, payload, clp, length);
+ vpi, vci,
+ tok2str(atm_pty_values, "Unknown", payload),
+ clp, length);
if (!vflag) {
return 1;
EXTRACT_LE_32BITS(&oam_ptr.oam_fm_loopback->correlation_tag));
printf("\n\tLocation-ID ");
for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->loopback_id); idx++) {
- printf("0x%02x ", oam_ptr.oam_fm_loopback->loopback_id[idx]);
+ if (idx % 2) {
+ printf("%04x ", EXTRACT_16BITS(&oam_ptr.oam_fm_loopback->loopback_id[idx]));
+ }
}
printf("\n\tSource-ID ");
for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->source_id); idx++) {
- printf("0x%02x ", oam_ptr.oam_fm_loopback->source_id[idx]);
+ if (idx % 2) {
+ printf("%04x ", EXTRACT_16BITS(&oam_ptr.oam_fm_loopback->source_id[idx]));
+ }
}
break;
printf("\n\tFailure-type 0x%02x", oam_ptr.oam_fm_ais_rdi->failure_type);
printf("\n\tLocation-ID ");
for (idx = 0; idx < sizeof(oam_ptr.oam_fm_ais_rdi->failure_location); idx++) {
- printf("0x%02x ", oam_ptr.oam_fm_ais_rdi->failure_location[idx]);
+ if (idx % 2) {
+ printf("%04x ", EXTRACT_16BITS(&oam_ptr.oam_fm_ais_rdi->failure_location[idx]));
+ }
}
break;