diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-01-10 04:04:42 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-01-10 04:04:42 +0000 |
commit | 62f69979c0f81efae50ccd752d5d5f6b270c41de (patch) | |
tree | 7e5ca309b08cac82b6faa42f0296a645c4273940 | |
parent | eaee04a5add8cf1f3c6f667bd0c37bb5814c3b07 (diff) |
The Sniffer file formats include a file to identify raw cells; export
that flag in the ATM pseudo-header, and use it to determine whether a
frame is a raw cell or a reassembled frame, rather than using the AAL,
as you can have raw AAL5 cells in a capture.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6889 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | packet-atm.c | 13 | ||||
-rw-r--r-- | wiretap/iptrace.c | 3 | ||||
-rw-r--r-- | wiretap/libpcap.c | 3 | ||||
-rw-r--r-- | wiretap/netmon.c | 3 | ||||
-rw-r--r-- | wiretap/netxray.c | 8 | ||||
-rw-r--r-- | wiretap/ngsniffer.c | 11 | ||||
-rw-r--r-- | wiretap/snoop.c | 3 | ||||
-rw-r--r-- | wiretap/wtap.h | 8 |
8 files changed, 38 insertions, 14 deletions
diff --git a/packet-atm.c b/packet-atm.c index 51df856d56..bdd57d9b9b 100644 --- a/packet-atm.c +++ b/packet-atm.c @@ -1,7 +1,7 @@ /* 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> @@ -1511,14 +1511,13 @@ dissect_atm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, 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); } } diff --git a/wiretap/iptrace.c b/wiretap/iptrace.c index 9bb1a7aef7..8f5d2a9775 100644 --- a/wiretap/iptrace.c +++ b/wiretap/iptrace.c @@ -1,6 +1,6 @@ /* 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> @@ -531,6 +531,7 @@ get_atm_pseudo_header(const guint8 *pd, guint32 len, 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; diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c index 59054904fc..a9c7d8ac9e 100644 --- a/wiretap/libpcap.c +++ b/wiretap/libpcap.c @@ -1,6 +1,6 @@ /* 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> @@ -1161,6 +1161,7 @@ libpcap_get_atm_pseudoheader(const struct sunatm_hdr *atm_phdr, 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; diff --git a/wiretap/netmon.c b/wiretap/netmon.c index ba86b50902..d760f59054 100644 --- a/wiretap/netmon.c +++ b/wiretap/netmon.c @@ -1,6 +1,6 @@ /* 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> @@ -508,6 +508,7 @@ netmon_read_atm_pseudoheader(FILE_T fh, union wtap_pseudo_header *pseudo_header, 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; diff --git a/wiretap/netxray.c b/wiretap/netxray.c index 3ee0267dc8..0d69f2f002 100644 --- a/wiretap/netxray.c +++ b/wiretap/netxray.c @@ -1,6 +1,6 @@ /* 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> @@ -645,6 +645,12 @@ netxray_set_pseudo_header(wtap *wth, const guint8 *pd, int len, 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 = diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index bebca85ba7..62b44ddf7d 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -1,6 +1,6 @@ /* 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> @@ -1254,9 +1254,18 @@ static gboolean ngsniffer_read_frame4(wtap *wth, gboolean is_random, 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); diff --git a/wiretap/snoop.c b/wiretap/snoop.c index cac30feba5..7a702c393c 100644 --- a/wiretap/snoop.c +++ b/wiretap/snoop.c @@ -1,6 +1,6 @@ /* 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> @@ -589,6 +589,7 @@ snoop_read_atm_pseudoheader(FILE_T fh, union wtap_pseudo_header *pseudo_header, 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; diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 8aea9d0e68..06fabbe77d 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1,6 +1,6 @@ /* 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> @@ -208,6 +208,11 @@ struct isdn_phdr { 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 AAL_UNKNOWN 0 /* AAL unknown */ @@ -269,6 +274,7 @@ struct isdn_phdr { #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 */ |