* Basic Fibre Channel Header definitions
* Copyright 2002 Dinesh G Dutt (ddutt@cisco.com)
*
- * $Id$
- *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __PACKET_FC_H_
#define __PACKET_FC_H_
+#include <epan/conversation.h>
+#include "ws_symbol_export.h"
+
/* R_CTL upper bits creates a classification tree */
#define FC_RCTL_DEV_DATA 0x00
#define FC_RCTL_ELS 0x20
#define FC_TYPE_CMNSVC 0x0 /* Used in PRLI Svc Param Page */
/* TYPE definitions for Basic or Extended Link_Data */
+#define FC_TYPE_BLS 0x0
#define FC_TYPE_ELS 0x1
/* TYPE definitions for FC-4 */
/*
* the following allows TAP code access to the messages
- * without having to duplicate it. With MSVC and a
- * libethereal.dll, we need a special declaration.
+ * without having to duplicate it. With MSVC and a
+ * libwireshark.dll, we need a special declaration.
*/
-ETH_VAR_IMPORT const value_string fc_fc4_val[];
+WS_DLL_PUBLIC const value_string fc_fc4_val[];
/* DF_CTL bits */
#define FC_DFCTL_DH 0x03 /* Device_Header type bits: */
#define FC_FCTL_ABTS_MASK 0x000030
#define FC_FCTL_REL_OFFSET 0x000008
-/* Structure containing itlq nexus data :
- * The itlq nexus is a structure containing data specific
- * for a initiator target lun queue/commandid combination.
- */
-/* XXX the LUN field will later be moved into an itl_nexusu_t structure */
-typedef struct _itlq_nexus_t {
+
+typedef struct _fc_exchange_t {
guint32 first_exchange_frame;
guint32 last_exchange_frame;
- guint16 lun; /* initialized to 0xffff == unknown */
- guint16 scsi_opcode; /* initialized to 0xffff == unknown */
nstime_t fc_time;
-} itlq_nexus_t;
+} fc_exchange_t;
/* FC header structure */
typedef struct _fc_hdr {
guint16 rxid;
guint8 r_ctl;
guint8 cs_ctl;
- itlq_nexus_t *itlq;
+ guint16 lun;
+ fc_exchange_t* fc_ex;
+ guint32 relative_offset;
} fc_hdr;
+#define FC_DATA_SOF_FIRST_FRAME 0x1
+#define FC_DATA_SOF_SOFF 0x2
+#define FC_DATA_EOF_LAST_FRAME 0x80
+#define FC_DATA_EOF_INVALID 0x40
+
+/* Data structure to pass into FC dissector */
+typedef struct _fc_data {
+ guint ethertype;
+ guint8 sof_eof; /**< FC's SOF/EOF encoding passed to FC decoder
+ * Bit 7 set if Last frame in sequence
+ * Bit 6 set if invalid frame content
+ * Bit 2 set if SOFf
+ * Bit 1 set if first frame in sequence
+ */
+} fc_data_t;
+
#endif /* __PACKET_FC_H_ */