*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.48 2006-02-09 20:33:49 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.49 2007-10-22 19:37:51 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#define OAM_CELLTYPE_FUNCTYPE_LEN 1
struct tok oam_f_values[] = {
- { OAMF4SC, "OAM F4 (segment)" },
- { OAMF4EC, "OAM F4 (end)" },
+ { VCI_OAMF4SC, "OAM F4 (segment)" },
+ { VCI_OAMF4EC, "OAM F4 (end)" },
{ 0, NULL }
};
printf(":%s ",
tok2str(msgtype2str, "msgtype#%d", p[MSG_TYPE_POS]));
- if (caplen < CALL_REF_POS+3) {
- printf("[|atm]");
- return;
- }
+ /*
+ * The call reference comes before the message type,
+ * so if we know we have the message type, which we
+ * do from the caplen test above, we also know we have
+ * the call reference.
+ */
call_ref = EXTRACT_24BITS(&p[CALL_REF_POS]);
printf("CALL_REF:0x%06x", call_ref);
} else {
if (vpi == 0) {
switch (vci) {
- case PPC:
+ case VCI_PPC:
sig_print(p, caplen);
return;
- case BCC:
+ case VCI_BCC:
printf("broadcast sig: ");
return;
- case OAMF4SC: /* fall through */
- case OAMF4EC:
+ case VCI_OAMF4SC: /* fall through */
+ case VCI_OAMF4EC:
oam_print(p, length, ATM_OAM_HEC);
return;
- case METAC:
+ case VCI_METAC:
printf("meta: ");
return;
- case ILMIC:
+ case VCI_ILMIC:
printf("ilmi: ");
snmp_print(p, length);
return;