/* packet-atm.c
* Routines for ATM packet disassembly
*
- * $Id: packet-atm.c,v 1.56 2003/01/09 04:11:08 guy Exp $
+ * $Id: packet-atm.c,v 1.57 2003/01/10 04:04:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
val_to_str(pinfo->pseudo_header->atm.aal, aal_vals,
"Unknown AAL (%u)"));
}
- if (pinfo->pseudo_header->atm.aal == AAL_5 ||
- pinfo->pseudo_header->atm.aal == AAL_SIGNALLING) {
- /* This is a reassembled PDU. */
- dissect_reassembled_pdu(tvb, pinfo, tree, atm_tree, truncated);
- } else {
- /* Assume this is a single cell, with the cell header at the beginning. */
+ if (pinfo->pseudo_header->atm.flags & ATM_IS_CELL) {
+ /* This is a single cell, with the cell header at the beginning. */
proto_item_set_len(ti, 5);
dissect_atm_cell(tvb, pinfo, tree, atm_tree);
+ } else {
+ /* This is a reassembled PDU. */
+ dissect_reassembled_pdu(tvb, pinfo, tree, atm_tree, truncated);
}
}
/* iptrace.c
*
- * $Id: iptrace.c,v 1.46 2003/01/03 06:45:45 guy Exp $
+ * $Id: iptrace.c,v 1.47 2003/01/10 04:04:41 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
atm_guess_traffic_type(pd, len, pseudo_header);
/* We don't have this information */
+ pseudo_header->atm.flags = 0;
pseudo_header->atm.cells = 0;
pseudo_header->atm.aal5t_u2u = 0;
pseudo_header->atm.aal5t_len = 0;
/* libpcap.c
*
- * $Id: libpcap.c,v 1.89 2003/01/09 01:55:12 guy Exp $
+ * $Id: libpcap.c,v 1.90 2003/01/10 04:04:41 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
pseudo_header->atm.channel = (atm_phdr->flags & 0x80) ? 0 : 1;
/* We don't have this information */
+ pseudo_header->atm.flags = 0;
pseudo_header->atm.cells = 0;
pseudo_header->atm.aal5t_u2u = 0;
pseudo_header->atm.aal5t_len = 0;
/* netmon.c
*
- * $Id: netmon.c,v 1.63 2003/01/06 20:30:38 guy Exp $
+ * $Id: netmon.c,v 1.64 2003/01/10 04:04:41 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
pseudo_header->atm.vci = vci;
/* We don't have this information */
+ pseudo_header->atm.flags = 0;
pseudo_header->atm.channel = 0;
pseudo_header->atm.cells = 0;
pseudo_header->atm.aal5t_u2u = 0;
/* netxray.c
*
- * $Id: netxray.c,v 1.73 2003/01/09 01:55:12 guy Exp $
+ * $Id: netxray.c,v 1.74 2003/01/10 04:04:41 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
break;
case WTAP_ENCAP_ATM_PDUS_UNTRUNCATED:
+ pseudo_header->atm.flags = 0;
+ /*
+ * XXX - is 0x08 an "OAM cell" flag?
+ */
+ if (hdr->hdr_2_x.xxx[9] & 0x04)
+ pseudo_header->atm.flags |= ATM_RAW_CELL;
pseudo_header->atm.vpi = hdr->hdr_2_x.xxx[11];
pseudo_header->atm.vci = pletohs(&hdr->hdr_2_x.xxx[12]);
pseudo_header->atm.channel =
/* ngsniffer.c
*
- * $Id: ngsniffer.c,v 1.103 2003/01/09 04:36:26 guy Exp $
+ * $Id: ngsniffer.c,v 1.104 2003/01/10 04:04:41 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
static void set_pseudo_header_frame4(union wtap_pseudo_header *pseudo_header,
struct frame4_rec *frame4)
{
+ guint32 StatusWord;
guint8 aal_type, hl_type;
guint16 vpi, vci;
+ /*
+ * Map flags from frame4.atm_info.StatusWord.
+ */
+ pseudo_header->atm.flags = 0;
+ StatusWord = pletohl(&frame4->atm_info.StatusWord);
+ if (StatusWord & SW_RAW_CELL)
+ pseudo_header->atm.flags |= ATM_RAW_CELL;
+
aal_type = frame4->atm_info.AppTrafType & ATT_AALTYPE;
hl_type = frame4->atm_info.AppTrafType & ATT_HLTYPE;
vpi = pletohs(&frame4->atm_info.Vpi);
/* snoop.c
*
- * $Id: snoop.c,v 1.60 2003/01/09 01:55:12 guy Exp $
+ * $Id: snoop.c,v 1.61 2003/01/10 04:04:42 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
pseudo_header->atm.channel = (atm_phdr.flags & 0x80) ? 0 : 1;
/* We don't have this information */
+ pseudo_header->atm.flags = 0;
pseudo_header->atm.cells = 0;
pseudo_header->atm.aal5t_u2u = 0;
pseudo_header->atm.aal5t_len = 0;
/* wtap.h
*
- * $Id: wtap.h,v 1.131 2003/01/09 01:55:13 guy Exp $
+ * $Id: wtap.h,v 1.132 2003/01/10 04:04:42 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
/* Packet "pseudo-header" for ATM capture files.
Not all of this information is supplied by all capture types. */
+/*
+ * Status bits.
+ */
+#define ATM_RAW_CELL 0x01 /* TRUE if the packet is a single cell */
+
/*
* AAL types.
*/
#define TRAF_ST_IPSILON_FT2 3 /* Ipsilon: Flow Type 2 */
struct atm_phdr {
+ guint32 flags; /* status flags */
guint8 aal; /* AAL of the traffic */
guint8 type; /* traffic type */
guint8 subtype; /* traffic subtype */