aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.h
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-04-30 08:48:27 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-04-30 08:48:27 +0000
commitd17f8a6d18a23986cf6fe62a5a89e42a09273d66 (patch)
tree04505b1415d7970b203d0b221bd3418d0495343c /wiretap/wtap.h
parent8c690a1fd74e4a1e11dce30d5c6cef9151247f24 (diff)
Replace the "ngsniffer_atm" with an "atm" pseudo-header, which isn't
just an image of the ATM Sniffer data. This means that Ethereal doesn't have to know any ATM Sniffer-specific details (that's all hidden in Wiretap), and allows us to add to that pseudo-header fields, traffic types, etc. unknown to ATM Sniffers. Have Wiretap map VPI 0/VCI 5 to the signalling AAL - for some capture files, this might not be necessary, as they may mark all signalling traffic as such, but, on other platforms, we don't know the AAL, so we assume AAL5 except for 0/5 traffic. Doing it in Wiretap lets us hide those details from Ethereal (and lets Ethereal interpret 0/5 traffic as non-signalling traffic, in case that happens to be what it is). We may know that traffic is LANE, but not whether it's LE Control or emulated 802.3/802.5; handle that case. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5302 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap/wtap.h')
-rw-r--r--wiretap/wtap.h140
1 files changed, 76 insertions, 64 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index 84bf02f1fc..f044bc7c3e 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -1,6 +1,6 @@
/* wtap.h
*
- * $Id: wtap.h,v 1.110 2002/04/09 08:15:04 guy Exp $
+ * $Id: wtap.h,v 1.111 2002/04/30 08:48:27 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -190,12 +190,76 @@ struct x25_phdr {
guint8 flags; /* ENCAP_LAPB, ENCAP_V120 : 1st bit means From DCE */
};
-/* Packet "pseudo-header" for ATM Sniffer capture files. */
-struct ngsniffer_atm_phdr {
- guint8 AppTrafType; /* traffic type */
- guint8 AppHLType; /* protocol type */
- guint16 Vpi; /* virtual path identifier */
- guint16 Vci; /* virtual circuit identifier */
+/* Packet "pseudo-header" for ATM capture files.
+ Not all of this information is supplied by all capture types. */
+
+/*
+ * AAL types.
+ */
+#define AAL_UNKNOWN 0 /* AAL unknown */
+#define AAL_1 1 /* AAL1 */
+#define AAL_2 2 /* AAL2 */
+#define AAL_3_4 3 /* AAL3/4 */
+#define AAL_5 4 /* AAL5 */
+#define AAL_USER 5 /* User AAL */
+#define AAL_SIGNALLING 6 /* Signaling AAL */
+#define AAL_OAMCELL 7 /* OAM cell */
+
+/*
+ * Traffic types.
+ */
+#define TRAF_UNKNOWN 0 /* Unknown */
+#define TRAF_LLCMX 1 /* LLC multiplexed (RFC 1483) */
+#define TRAF_VCMX 2 /* VC multiplexed (RFC 1483) */
+#define TRAF_LANE 3 /* LAN Emulation */
+#define TRAF_ILMI 4 /* ILMI */
+#define TRAF_FR 5 /* Frame Relay */
+#define TRAF_SPANS 6 /* FORE SPANS */
+#define TRAF_IPSILON 7 /* Ipsilon */
+
+/*
+ * Traffic subtypes.
+ */
+#define TRAF_ST_UNKNOWN 0 /* Unknown */
+
+/*
+ * For TRAF_VCMX:
+ */
+#define TRAF_ST_VCMX_802_3_FCS 1 /* 802.3 with an FCS */
+#define TRAF_ST_VCMX_802_4_FCS 2 /* 802.4 with an FCS */
+#define TRAF_ST_VCMX_802_5_FCS 3 /* 802.5 with an FCS */
+#define TRAF_ST_VCMX_FDDI_FCS 4 /* FDDI with an FCS */
+#define TRAF_ST_VCMX_802_6_FCS 5 /* 802.6 with an FCS */
+#define TRAF_ST_VCMX_802_3 7 /* 802.3 without an FCS */
+#define TRAF_ST_VCMX_802_4 8 /* 802.4 without an FCS */
+#define TRAF_ST_VCMX_802_5 9 /* 802.5 without an FCS */
+#define TRAF_ST_VCMX_FDDI 10 /* FDDI without an FCS */
+#define TRAF_ST_VCMX_802_6 11 /* 802.6 without an FCS */
+#define TRAF_ST_VCMX_FRAGMENTS 12 /* Fragments */
+#define TRAF_ST_VCMX_BPDU 13 /* BPDU */
+
+/*
+ * For TRAF_LANE:
+ */
+#define TRAF_ST_LANE_LE_CTRL 1 /* LANE: LE Ctrl */
+#define TRAF_ST_LANE_802_3 2 /* LANE: 802.3 */
+#define TRAF_ST_LANE_802_5 3 /* LANE: 802.5 */
+#define TRAF_ST_LANE_802_3_MC 4 /* LANE: 802.3 multicast */
+#define TRAF_ST_LANE_802_5_MC 5 /* LANE: 802.5 multicast */
+
+/*
+ * For TRAF_IPSILON:
+ */
+#define TRAF_ST_IPSILON_FT0 1 /* Ipsilon: Flow Type 0 */
+#define TRAF_ST_IPSILON_FT1 2 /* Ipsilon: Flow Type 1 */
+#define TRAF_ST_IPSILON_FT2 3 /* Ipsilon: Flow Type 2 */
+
+struct atm_phdr {
+ guint8 aal; /* AAL of the traffic */
+ guint8 type; /* traffic type */
+ guint8 subtype; /* traffic subtype */
+ guint16 vpi; /* virtual path identifier */
+ guint16 vci; /* virtual circuit identifier */
guint16 channel; /* link: 0 for DCE, 1 for DTE */
guint16 cells; /* number of cells */
guint16 aal5t_u2u; /* user-to-user indicator */
@@ -233,64 +297,12 @@ struct ieee_802_11_phdr {
guint8 signal_level; /* percentage */
};
-/*
- * Bits in AppTrafType.
- *
- * For AAL types other than AAL5, the packet data is presumably for a
- * single cell, not a reassembled frame, as the ATM Sniffer manual says
- * it dosn't reassemble cells other than AAL5 cells.
- */
-#define ATT_AALTYPE 0x0F /* AAL type: */
-#define ATT_AAL_UNKNOWN 0x00 /* Unknown AAL */
-#define ATT_AAL1 0x01 /* AAL1 */
-#define ATT_AAL3_4 0x02 /* AAL3/4 */
-#define ATT_AAL5 0x03 /* AAL5 */
-#define ATT_AAL_USER 0x04 /* User AAL */
-#define ATT_AAL_SIGNALLING 0x05 /* Signaling AAL */
-#define ATT_OAMCELL 0x06 /* OAM cell */
-
-#define ATT_HLTYPE 0xF0 /* Higher-layer type: */
-#define ATT_HL_UNKNOWN 0x00 /* unknown */
-#define ATT_HL_LLCMX 0x10 /* LLC multiplexed (probably RFC 1483) */
-#define ATT_HL_VCMX 0x20 /* VC multiplexed (probably RFC 1483) */
-#define ATT_HL_LANE 0x30 /* LAN Emulation */
-#define ATT_HL_ILMI 0x40 /* ILMI */
-#define ATT_HL_FRMR 0x50 /* Frame Relay */
-#define ATT_HL_SPANS 0x60 /* FORE SPANS */
-#define ATT_HL_IPSILON 0x70 /* Ipsilon */
-
-/*
- * Values for AppHLType; the interpretation depends on the ATT_HLTYPE
- * bits in AppTrafType.
- */
-#define AHLT_UNKNOWN 0x0
-#define AHLT_VCMX_802_3_FCS 0x1 /* VCMX: 802.3 FCS */
-#define AHLT_LANE_LE_CTRL 0x1 /* LANE: LE Ctrl */
-#define AHLT_IPSILON_FT0 0x1 /* Ipsilon: Flow Type 0 */
-#define AHLT_VCMX_802_4_FCS 0x2 /* VCMX: 802.4 FCS */
-#define AHLT_LANE_802_3 0x2 /* LANE: 802.3 */
-#define AHLT_IPSILON_FT1 0x2 /* Ipsilon: Flow Type 1 */
-#define AHLT_VCMX_802_5_FCS 0x3 /* VCMX: 802.5 FCS */
-#define AHLT_LANE_802_5 0x3 /* LANE: 802.5 */
-#define AHLT_IPSILON_FT2 0x3 /* Ipsilon: Flow Type 2 */
-#define AHLT_VCMX_FDDI_FCS 0x4 /* VCMX: FDDI FCS */
-#define AHLT_LANE_802_3_MC 0x4 /* LANE: 802.3 multicast */
-#define AHLT_VCMX_802_6_FCS 0x5 /* VCMX: 802.6 FCS */
-#define AHLT_LANE_802_5_MC 0x5 /* LANE: 802.5 multicast */
-#define AHLT_VCMX_802_3 0x7 /* VCMX: 802.3 */
-#define AHLT_VCMX_802_4 0x8 /* VCMX: 802.4 */
-#define AHLT_VCMX_802_5 0x9 /* VCMX: 802.5 */
-#define AHLT_VCMX_FDDI 0xa /* VCMX: FDDI */
-#define AHLT_VCMX_802_6 0xb /* VCMX: 802.6 */
-#define AHLT_VCMX_FRAGMENTS 0xc /* VCMX: Fragments */
-#define AHLT_VCMX_BPDU 0xe /* VCMX: BPDU */
-
union wtap_pseudo_header {
- struct x25_phdr x25;
- struct ngsniffer_atm_phdr ngsniffer_atm;
- struct ascend_phdr ascend;
- struct p2p_phdr p2p;
- struct ieee_802_11_phdr ieee_802_11;
+ struct x25_phdr x25;
+ struct atm_phdr atm;
+ struct ascend_phdr ascend;
+ struct p2p_phdr p2p;
+ struct ieee_802_11_phdr ieee_802_11;
};
struct wtap_pkthdr {