2003-01-14 01:17:44 +00:00
|
|
|
/* packet-fcfzs.c
|
|
|
|
* Routines for FC Fabric Zone Server
|
|
|
|
* Copyright 2001, Dinesh G Dutt <ddutt@andiamo.com>
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2003-01-14 01:17:44 +00:00
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2003-01-14 01:17:44 +00:00
|
|
|
* 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.
|
2007-08-15 22:27:52 +00:00
|
|
|
*
|
2003-01-14 01:17:44 +00:00
|
|
|
* 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.
|
2007-08-15 22:27:52 +00:00
|
|
|
*
|
2003-01-14 01:17:44 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 23:18:38 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2003-01-14 01:17:44 +00:00
|
|
|
*/
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include <epan/packet.h>
|
2005-08-12 23:00:01 +00:00
|
|
|
#include <epan/emem.h>
|
2003-01-14 01:17:44 +00:00
|
|
|
#include <epan/conversation.h>
|
2005-09-17 00:02:31 +00:00
|
|
|
#include <epan/etypes.h>
|
2006-10-11 10:38:59 +00:00
|
|
|
#include "packet-scsi.h"
|
2003-01-14 01:17:44 +00:00
|
|
|
#include "packet-fc.h"
|
|
|
|
#include "packet-fcct.h"
|
|
|
|
#include "packet-fcfzs.h"
|
|
|
|
|
|
|
|
/* Initialize the protocol and registered fields */
|
2012-05-03 20:35:44 +00:00
|
|
|
static int proto_fcfzs = -1;
|
|
|
|
static int hf_fcfzs_opcode = -1;
|
|
|
|
static int hf_fcfzs_gzc_vendor = -1;
|
|
|
|
static int hf_fcfzs_gest_vendor = -1;
|
|
|
|
static int hf_fcfzs_numzoneattrs = -1;
|
|
|
|
static int hf_fcfzs_zonesetnmlen = -1;
|
|
|
|
static int hf_fcfzs_zonesetname = -1;
|
|
|
|
static int hf_fcfzs_numzones = -1;
|
|
|
|
static int hf_fcfzs_numzonesetattrs = -1;
|
|
|
|
static int hf_fcfzs_zonenmlen = -1;
|
|
|
|
static int hf_fcfzs_zonename = -1;
|
|
|
|
static int hf_fcfzs_nummbrs = -1;
|
|
|
|
static int hf_fcfzs_nummbrentries = -1;
|
|
|
|
static int hf_fcfzs_mbrid = -1;
|
|
|
|
static int hf_fcfzs_mbridlen = -1;
|
|
|
|
static int hf_fcfzs_mbrtype = -1;
|
|
|
|
static int hf_fcfzs_reason = -1;
|
|
|
|
static int hf_fcfzs_rjtdetail = -1;
|
|
|
|
static int hf_fcfzs_rjtvendor = -1;
|
|
|
|
static int hf_fcfzs_maxres_size = -1;
|
|
|
|
static int hf_fcfzs_mbrid_lun = -1;
|
|
|
|
static int hf_fcfzs_gzc_flags = -1;
|
|
|
|
static int hf_fcfzs_gzc_flags_hard_zones = -1;
|
|
|
|
static int hf_fcfzs_gzc_flags_soft_zones = -1;
|
|
|
|
static int hf_fcfzs_gzc_flags_zoneset_db = -1;
|
|
|
|
static int hf_fcfzs_zone_state = -1;
|
2005-10-27 08:35:44 +00:00
|
|
|
static int hf_fcfzs_soft_zone_set_enforced = -1;
|
|
|
|
static int hf_fcfzs_hard_zone_set_enforced = -1;
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
/* Initialize the subtree pointers */
|
|
|
|
static gint ett_fcfzs = -1;
|
2005-10-24 08:44:36 +00:00
|
|
|
static gint ett_fcfzs_gzc_flags = -1;
|
2005-10-27 08:35:44 +00:00
|
|
|
static gint ett_fcfzs_zone_state = -1;
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
typedef struct _fcfzs_conv_key {
|
|
|
|
guint32 conv_idx;
|
|
|
|
} fcfzs_conv_key_t;
|
|
|
|
|
|
|
|
typedef struct _fcfzs_conv_data {
|
|
|
|
guint32 opcode;
|
|
|
|
} fcfzs_conv_data_t;
|
|
|
|
|
2010-10-11 19:00:55 +00:00
|
|
|
static GHashTable *fcfzs_req_hash = NULL;
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
static dissector_handle_t data_handle;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Hash Functions
|
|
|
|
*/
|
|
|
|
static gint
|
|
|
|
fcfzs_equal(gconstpointer v, gconstpointer w)
|
|
|
|
{
|
2010-10-11 19:00:55 +00:00
|
|
|
const fcfzs_conv_key_t *v1 = v;
|
|
|
|
const fcfzs_conv_key_t *v2 = w;
|
2003-01-14 01:17:44 +00:00
|
|
|
|
2010-10-11 19:00:55 +00:00
|
|
|
return (v1->conv_idx == v2->conv_idx);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static guint
|
2012-05-03 20:15:53 +00:00
|
|
|
fcfzs_hash(gconstpointer v)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
2010-10-11 19:00:55 +00:00
|
|
|
const fcfzs_conv_key_t *key = v;
|
|
|
|
guint val;
|
2003-01-14 01:17:44 +00:00
|
|
|
|
2010-10-11 19:00:55 +00:00
|
|
|
val = key->conv_idx;
|
2003-01-14 01:17:44 +00:00
|
|
|
|
2010-10-11 19:00:55 +00:00
|
|
|
return val;
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Protocol initialization
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
fcfzs_init_protocol(void)
|
|
|
|
{
|
2010-10-11 19:00:55 +00:00
|
|
|
if (fcfzs_req_hash)
|
2012-05-03 20:15:53 +00:00
|
|
|
g_hash_table_destroy(fcfzs_req_hash);
|
2003-01-14 01:17:44 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
fcfzs_req_hash = g_hash_table_new(fcfzs_hash, fcfzs_equal);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Code to actually dissect the packets */
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_zoneset(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int numzones, nummbrs, i, j, len;
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
/* The zoneset structure has the following format */
|
2003-12-02 06:06:30 +00:00
|
|
|
/* zoneset name (len[not including pad], name, pad),
|
|
|
|
* number of zones,
|
2003-01-14 01:17:44 +00:00
|
|
|
* for each zone,
|
2003-12-02 06:06:30 +00:00
|
|
|
* Zone name (len[not including pad], name, pad), num zone mbrs
|
2003-01-14 01:17:44 +00:00
|
|
|
* for each zone mbr,
|
|
|
|
* zone mbr id type, zone mbr id (len, name, pad)
|
|
|
|
*/
|
|
|
|
if (tree) {
|
|
|
|
|
2007-08-15 22:27:52 +00:00
|
|
|
/* Zoneset Name */
|
2012-05-03 20:15:53 +00:00
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetnmlen, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetname, tvb, offset+4,
|
2012-05-03 20:35:44 +00:00
|
|
|
len, ENC_ASCII|ENC_NA);
|
2003-12-02 06:06:30 +00:00
|
|
|
offset += 4 + len + (4-(len % 4));
|
|
|
|
|
2007-08-15 22:27:52 +00:00
|
|
|
|
|
|
|
/* Number of zones */
|
2012-05-03 20:15:53 +00:00
|
|
|
numzones = tvb_get_ntohl(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_numzones, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2003-01-14 01:17:44 +00:00
|
|
|
offset += 4;
|
2007-08-15 22:27:52 +00:00
|
|
|
|
|
|
|
/* For each zone... */
|
2003-01-14 01:17:44 +00:00
|
|
|
for (i = 0; i < numzones; i++) {
|
2012-05-03 20:15:53 +00:00
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonenmlen, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonename, tvb, offset+4,
|
2012-05-03 20:35:44 +00:00
|
|
|
len, ENC_ASCII|ENC_NA);
|
2003-12-02 06:06:30 +00:00
|
|
|
offset += 4 + len + (4-(len % 4));
|
2003-01-14 01:17:44 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
nummbrs = tvb_get_ntohl(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_nummbrentries, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
4, ENC_BIG_ENDIAN);
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
offset += 4;
|
|
|
|
for (j = 0; j < nummbrs; j++) {
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_mbrtype, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
switch (tvb_get_guint8(tvb, offset)) {
|
2003-01-14 01:17:44 +00:00
|
|
|
case FC_FZS_ZONEMBR_PWWN:
|
|
|
|
case FC_FZS_ZONEMBR_NWWN:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string(tree, hf_fcfzs_mbrid, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 8,
|
|
|
|
tvb_fcwwn_to_str(tvb, offset+4));
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_ZONEMBR_DP:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string_format(tree,
|
2012-05-03 20:35:44 +00:00
|
|
|
hf_fcfzs_mbrid,
|
|
|
|
tvb, offset+4, 3, " ",
|
|
|
|
"0x%x",
|
|
|
|
tvb_get_ntoh24(tvb,
|
|
|
|
offset+4));
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_ZONEMBR_FCID:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string(tree, hf_fcfzs_mbrid, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 4,
|
|
|
|
tvb_fc_to_str(tvb, offset+4));
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_ZONEMBR_PWWN_LUN:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string(tree, hf_fcfzs_mbrid, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 8,
|
|
|
|
tvb_fcwwn_to_str(tvb, offset+4));
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_mbrid_lun, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+8, 8, ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_ZONEMBR_DP_LUN:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string_format(tree,
|
2012-05-03 20:35:44 +00:00
|
|
|
hf_fcfzs_mbrid,
|
|
|
|
tvb, offset+4, 3, " ",
|
|
|
|
"0x%x",
|
|
|
|
tvb_get_ntoh24(tvb,
|
|
|
|
offset+4));
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_mbrid_lun, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 8, ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_ZONEMBR_FCID_LUN:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string(tree, hf_fcfzs_mbrid, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 4,
|
|
|
|
tvb_fc_to_str(tvb, offset+4));
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_mbrid_lun, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 8, ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
default:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string(tree, hf_fcfzs_mbrid, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 8,
|
|
|
|
"Unknown member type format");
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
offset += 12;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-10-24 08:44:36 +00:00
|
|
|
static const true_false_string tfs_fc_fcfzs_gzc_flags_hard_zones = {
|
2010-10-11 19:00:55 +00:00
|
|
|
"Hard Zones Supported",
|
|
|
|
"Hard zones NOT supported"
|
2005-10-24 08:44:36 +00:00
|
|
|
};
|
|
|
|
static const true_false_string tfs_fc_fcfzs_gzc_flags_soft_zones = {
|
2010-10-11 19:00:55 +00:00
|
|
|
"Soft Zones Supported",
|
|
|
|
"Soft zones NOT supported"
|
2005-10-24 08:44:36 +00:00
|
|
|
};
|
|
|
|
static const true_false_string tfs_fc_fcfzs_gzc_flags_zoneset_db = {
|
2010-10-11 19:00:55 +00:00
|
|
|
"Zone Set Database is Available",
|
|
|
|
"Zone set database is NOT available"
|
2005-10-24 08:44:36 +00:00
|
|
|
};
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gzc(tvbuff_t *tvb, int offset, proto_tree *parent_tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
2010-10-11 19:00:55 +00:00
|
|
|
if (!isreq) {
|
|
|
|
guint8 flags;
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_item *item = NULL;
|
|
|
|
proto_tree *tree = NULL;
|
2010-10-11 19:00:55 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
flags = tvb_get_guint8(tvb, offset);
|
|
|
|
if (parent_tree) {
|
|
|
|
item = proto_tree_add_uint(parent_tree, hf_fcfzs_gzc_flags, tvb, offset, 1, flags);
|
|
|
|
tree = proto_item_add_subtree(item, ett_fcfzs_gzc_flags);
|
2010-10-11 19:00:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
proto_tree_add_boolean(tree, hf_fcfzs_gzc_flags_hard_zones, tvb, offset, 1, flags);
|
2012-05-03 20:15:53 +00:00
|
|
|
if (flags & 0x80) {
|
2010-10-11 19:00:55 +00:00
|
|
|
proto_item_append_text(item, " Hard Zones");
|
|
|
|
}
|
2012-05-03 20:15:53 +00:00
|
|
|
flags &= (~( 0x80 ));
|
2010-10-11 19:00:55 +00:00
|
|
|
|
|
|
|
proto_tree_add_boolean(tree, hf_fcfzs_gzc_flags_soft_zones, tvb, offset, 1, flags);
|
2012-05-03 20:15:53 +00:00
|
|
|
if (flags & 0x40) {
|
2010-10-11 19:00:55 +00:00
|
|
|
proto_item_append_text(item, " Soft Zones");
|
|
|
|
}
|
2012-05-03 20:15:53 +00:00
|
|
|
flags &= (~( 0x40 ));
|
2010-10-11 19:00:55 +00:00
|
|
|
|
|
|
|
proto_tree_add_boolean(tree, hf_fcfzs_gzc_flags_zoneset_db, tvb, offset, 1, flags);
|
2012-05-03 20:15:53 +00:00
|
|
|
if (flags & 0x01) {
|
2010-10-11 19:00:55 +00:00
|
|
|
proto_item_append_text(item, " ZoneSet Database Available");
|
|
|
|
}
|
2012-05-03 20:15:53 +00:00
|
|
|
flags &= (~( 0x01 ));
|
2010-10-11 19:00:55 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_gzc_vendor, tvb, offset+4, 4, ENC_BIG_ENDIAN);
|
2010-10-11 19:00:55 +00:00
|
|
|
}
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
|
2005-10-27 08:35:44 +00:00
|
|
|
static const true_false_string tfs_fc_fcfzs_soft_zone_set_enforced = {
|
2010-10-11 19:00:55 +00:00
|
|
|
"Soft Zone Set is ENFORCED",
|
|
|
|
"Soft zone set is NOT enforced"
|
2005-10-27 08:35:44 +00:00
|
|
|
};
|
|
|
|
static const true_false_string tfs_fc_fcfzs_hard_zone_set_enforced = {
|
2010-10-11 19:00:55 +00:00
|
|
|
"Hard Zone Set is ENFORCED",
|
|
|
|
"Hard zone set is NOT enforced"
|
2005-10-27 08:35:44 +00:00
|
|
|
};
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gest(tvbuff_t *tvb, proto_tree *parent_tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
2010-10-11 19:00:55 +00:00
|
|
|
int offset = 16; /* past the fc_ct header */
|
|
|
|
|
|
|
|
if (!isreq) {
|
|
|
|
guint8 flags;
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_item *item = NULL;
|
|
|
|
proto_tree *tree = NULL;
|
2010-10-11 19:00:55 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
flags = tvb_get_guint8(tvb, offset);
|
|
|
|
if (parent_tree) {
|
|
|
|
item = proto_tree_add_uint(parent_tree, hf_fcfzs_zone_state, tvb, offset, 1, flags);
|
|
|
|
tree = proto_item_add_subtree(item, ett_fcfzs_zone_state);
|
2010-10-11 19:00:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
proto_tree_add_boolean(tree, hf_fcfzs_soft_zone_set_enforced, tvb, offset, 1, flags);
|
2012-05-03 20:15:53 +00:00
|
|
|
if (flags & 0x80) {
|
2010-10-11 19:00:55 +00:00
|
|
|
proto_item_append_text(item, " Soft Zone Set Enforced");
|
|
|
|
}
|
2012-05-03 20:15:53 +00:00
|
|
|
flags &= (~( 0x80 ));
|
2010-10-11 19:00:55 +00:00
|
|
|
|
|
|
|
proto_tree_add_boolean(tree, hf_fcfzs_hard_zone_set_enforced, tvb, offset, 1, flags);
|
2012-05-03 20:15:53 +00:00
|
|
|
if (flags & 0x40) {
|
2010-10-11 19:00:55 +00:00
|
|
|
proto_item_append_text(item, " Hard Zone Set Enforced");
|
|
|
|
}
|
2012-05-03 20:15:53 +00:00
|
|
|
flags &= (~( 0x40 ));
|
2010-10-11 19:00:55 +00:00
|
|
|
|
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(parent_tree, hf_fcfzs_gest_vendor, tvb, offset+4, 4, ENC_BIG_ENDIAN);
|
2010-10-11 19:00:55 +00:00
|
|
|
}
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gzsn(tvbuff_t *tvb, proto_tree *tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int numrec, i, len;
|
|
|
|
int offset = 16; /* past the fc_ct header */
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if (tree) {
|
|
|
|
if (!isreq) {
|
2012-05-03 20:15:53 +00:00
|
|
|
numrec = tvb_get_ntohl(tvb, offset);
|
2003-01-14 01:17:44 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_numzonesetattrs, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
4, ENC_BIG_ENDIAN);
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
offset += 4;
|
|
|
|
for (i = 0; i < numrec; i++) {
|
2012-05-03 20:15:53 +00:00
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetnmlen, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetname, tvb, offset+1,
|
2012-05-03 20:35:44 +00:00
|
|
|
len, ENC_ASCII|ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
offset += len + 1 + (len % 4);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_numzones, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
4, ENC_BIG_ENDIAN);
|
2003-01-14 01:17:44 +00:00
|
|
|
offset += 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gzd(tvbuff_t *tvb, proto_tree *tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int numrec, i, len;
|
|
|
|
int offset = 16; /* past the fc_ct header */
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if (tree) {
|
|
|
|
if (isreq) {
|
2012-05-03 20:15:53 +00:00
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetnmlen, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetname, tvb, offset+1,
|
2012-05-03 20:35:44 +00:00
|
|
|
len, ENC_ASCII|ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
else {
|
2012-05-03 20:15:53 +00:00
|
|
|
numrec = tvb_get_ntohl(tvb, offset);
|
2003-01-14 01:17:44 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_numzoneattrs, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
4, ENC_BIG_ENDIAN);
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
offset += 4;
|
|
|
|
for (i = 0; i < numrec; i++) {
|
2012-05-03 20:15:53 +00:00
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonenmlen, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonename, tvb, offset+1,
|
2012-05-03 20:35:44 +00:00
|
|
|
len, ENC_ASCII|ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
offset += len + 1 + (len % 4);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_nummbrs, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
4, ENC_BIG_ENDIAN);
|
2003-01-14 01:17:44 +00:00
|
|
|
offset += 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gzm(tvbuff_t *tvb, proto_tree *tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int numrec, i, len;
|
|
|
|
int offset = 16; /* past the fc_ct header */
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if (tree) {
|
|
|
|
if (isreq) {
|
2012-05-03 20:15:53 +00:00
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonenmlen, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonename, tvb, offset+1,
|
2012-05-03 20:35:44 +00:00
|
|
|
len, ENC_ASCII|ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
else {
|
2012-05-03 20:15:53 +00:00
|
|
|
numrec = tvb_get_ntohl(tvb, offset);
|
2003-01-14 01:17:44 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_nummbrentries, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
4, ENC_BIG_ENDIAN);
|
2003-01-14 01:17:44 +00:00
|
|
|
offset += 4;
|
|
|
|
for (i = 0; i < numrec; i++) {
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_mbrtype, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
switch (tvb_get_guint8(tvb, offset)) {
|
2003-01-14 01:17:44 +00:00
|
|
|
case FC_FZS_ZONEMBR_PWWN:
|
|
|
|
case FC_FZS_ZONEMBR_NWWN:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string(tree, hf_fcfzs_mbrid, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 8,
|
|
|
|
tvb_fcwwn_to_str(tvb, offset+4));
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_ZONEMBR_DP:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string_format(tree,
|
2012-05-03 20:35:44 +00:00
|
|
|
hf_fcfzs_mbrid,
|
|
|
|
tvb, offset+4, 3, " ",
|
|
|
|
"0x%x",
|
|
|
|
tvb_get_ntoh24(tvb,
|
|
|
|
offset+4));
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_ZONEMBR_FCID:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string(tree, hf_fcfzs_mbrid, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 4,
|
|
|
|
tvb_fc_to_str(tvb, offset+4));
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
default:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string(tree, hf_fcfzs_mbrid, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 8,
|
|
|
|
"Unknown member type format");
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
offset += 12;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gazs(tvbuff_t *tvb, proto_tree *tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int offset = 16; /* past the fc_ct header */
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if (tree) {
|
|
|
|
if (!isreq) {
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_zoneset(tvb, tree, offset);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gzs(tvbuff_t *tvb, proto_tree *tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int offset = 16; /* past the fc_ct header */
|
|
|
|
int len;
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if (tree) {
|
|
|
|
if (isreq) {
|
2012-05-03 20:15:53 +00:00
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetnmlen, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetname, tvb, offset+4,
|
2012-05-03 20:35:44 +00:00
|
|
|
len, ENC_ASCII|ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
else {
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_zoneset(tvb, tree, offset);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_adzs(tvbuff_t *tvb, proto_tree *tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int offset = 16; /* past the fc_ct header */
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if (tree) {
|
|
|
|
if (isreq) {
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_zoneset(tvb, tree, offset);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_azsd(tvbuff_t *tvb, proto_tree *tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int offset = 16; /* past the fc_ct header */
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if (tree) {
|
|
|
|
if (isreq) {
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_zoneset(tvb, tree, offset);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_arzs(tvbuff_t *tvb, proto_tree *tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int offset = 16; /* past the fc_ct header */
|
|
|
|
int len;
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if (tree) {
|
|
|
|
if (isreq) {
|
2012-05-03 20:15:53 +00:00
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetnmlen, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetname, tvb, offset+4,
|
2012-05-03 20:35:44 +00:00
|
|
|
len, ENC_ASCII|ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_dzs(tvbuff_t *tvb _U_, proto_tree *tree _U_, gboolean isreq _U_)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
/* Both req & successful response contain just the FC_CT header */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_arzm(tvbuff_t *tvb, proto_tree *tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int numrec, i, len, plen;
|
|
|
|
int offset = 16; /* past the fc_ct header */
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if (tree) {
|
|
|
|
if (isreq) {
|
2012-05-03 20:15:53 +00:00
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonenmlen, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonename, tvb, offset+1,
|
2012-05-03 20:35:44 +00:00
|
|
|
len, ENC_ASCII|ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
len += (len % 4);
|
2012-05-03 20:15:53 +00:00
|
|
|
plen = tvb_length(tvb) - offset - len;
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
numrec = plen/12; /* each mbr rec is 12 bytes long */
|
|
|
|
|
|
|
|
offset += len;
|
|
|
|
for (i = 0; i < numrec; i++) {
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_mbrtype, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
switch (tvb_get_guint8(tvb, offset)) {
|
2003-01-14 01:17:44 +00:00
|
|
|
case FC_FZS_ZONEMBR_PWWN:
|
|
|
|
case FC_FZS_ZONEMBR_NWWN:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string(tree, hf_fcfzs_mbrid, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 8,
|
|
|
|
tvb_fcwwn_to_str(tvb, offset+4));
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_ZONEMBR_DP:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string_format(tree,
|
2012-05-03 20:35:44 +00:00
|
|
|
hf_fcfzs_mbrid,
|
|
|
|
tvb, offset+4, 3, " ",
|
|
|
|
"0x%x",
|
|
|
|
tvb_get_ntoh24(tvb,
|
|
|
|
offset+4));
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_ZONEMBR_FCID:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string(tree, hf_fcfzs_mbrid, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 4,
|
|
|
|
tvb_fc_to_str(tvb, offset+4));
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
default:
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_string(tree, hf_fcfzs_mbrid, tvb,
|
2012-05-03 20:35:44 +00:00
|
|
|
offset+4, 8,
|
|
|
|
"Unknown member type format");
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
offset += 12;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_arzd(tvbuff_t *tvb, proto_tree *tree, gboolean isreq)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int offset = 16; /* past the fc_ct header */
|
|
|
|
int len;
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if (tree) {
|
|
|
|
if (isreq) {
|
2012-05-03 20:15:53 +00:00
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetnmlen, tvb, offset,
|
2012-05-03 20:35:44 +00:00
|
|
|
1, ENC_BIG_ENDIAN);
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonesetname, tvb, offset+4,
|
2012-05-03 20:35:44 +00:00
|
|
|
len, ENC_ASCII|ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
len += (len % 4);
|
|
|
|
offset += len;
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonenmlen, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_zonename, tvb, offset+4,
|
2012-05-03 20:35:44 +00:00
|
|
|
len, ENC_ASCII|ENC_NA);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_rjt(tvbuff_t *tvb, proto_tree *tree)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
int offset = 0;
|
|
|
|
|
|
|
|
if (tree) {
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_item(tree, hf_fcfzs_reason, tvb, offset+13, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_rjtdetail, tvb, offset+14, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_fcfzs_rjtvendor, tvb, offset+15, 1, ENC_BIG_ENDIAN);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
/* Set up structures needed to add the protocol subtree and manage it */
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_item *ti;
|
|
|
|
proto_tree *fcfzs_tree = NULL;
|
|
|
|
int offset = 0;
|
|
|
|
fc_ct_preamble cthdr;
|
|
|
|
int opcode;
|
|
|
|
int failed_opcode = 0;
|
|
|
|
conversation_t *conversation;
|
2003-01-14 01:17:44 +00:00
|
|
|
fcfzs_conv_data_t *cdata;
|
2012-05-03 20:15:53 +00:00
|
|
|
fcfzs_conv_key_t ckey, *req_key;
|
|
|
|
gboolean isreq = TRUE;
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
/* Make entries in Protocol column and Info column on summary display */
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Zone Server");
|
2007-08-15 22:27:52 +00:00
|
|
|
|
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
tvb_memcpy(tvb, (guint8 *)&cthdr, offset, FCCT_PRMBL_SIZE);
|
|
|
|
cthdr.revision = tvb_get_guint8(tvb, offset+1);
|
|
|
|
cthdr.in_id = tvb_get_ntoh24(tvb, offset);
|
|
|
|
cthdr.opcode = g_ntohs(cthdr.opcode);
|
2003-01-14 01:17:44 +00:00
|
|
|
opcode = cthdr.opcode;
|
2012-05-03 20:15:53 +00:00
|
|
|
cthdr.maxres_size = g_ntohs(cthdr.maxres_size);
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
if (tree) {
|
2012-05-03 20:15:53 +00:00
|
|
|
ti = proto_tree_add_protocol_format(tree, proto_fcfzs, tvb, 0,
|
2012-05-03 20:35:44 +00:00
|
|
|
tvb_length(tvb),
|
|
|
|
"Zone Server");
|
2012-05-03 20:15:53 +00:00
|
|
|
fcfzs_tree = proto_item_add_subtree(ti, ett_fcfzs);
|
|
|
|
proto_tree_add_item(fcfzs_tree, hf_fcfzs_opcode, tvb, offset+8, 2, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(fcfzs_tree, hf_fcfzs_maxres_size, tvb, offset+10,
|
2012-05-03 20:35:44 +00:00
|
|
|
2, ENC_BIG_ENDIAN);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if ((opcode != FCCT_MSG_ACC) && (opcode != FCCT_MSG_RJT)) {
|
2012-05-03 20:15:53 +00:00
|
|
|
conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
|
2012-05-03 20:35:44 +00:00
|
|
|
pinfo->ptype, pinfo->oxid,
|
|
|
|
pinfo->rxid, NO_PORT2);
|
2003-01-14 01:17:44 +00:00
|
|
|
if (!conversation) {
|
2012-05-03 20:15:53 +00:00
|
|
|
conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
|
2012-05-03 20:35:44 +00:00
|
|
|
pinfo->ptype, pinfo->oxid,
|
|
|
|
pinfo->rxid, NO_PORT2);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
ckey.conv_idx = conversation->index;
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
cdata = (fcfzs_conv_data_t *)g_hash_table_lookup(fcfzs_req_hash,
|
2012-05-03 20:35:44 +00:00
|
|
|
&ckey);
|
2003-01-14 01:17:44 +00:00
|
|
|
if (cdata) {
|
|
|
|
/* Since we never free the memory used by an exchange, this maybe a
|
|
|
|
* case of another request using the same exchange as a previous
|
2007-08-15 22:27:52 +00:00
|
|
|
* req.
|
2003-01-14 01:17:44 +00:00
|
|
|
*/
|
|
|
|
cdata->opcode = opcode;
|
|
|
|
}
|
|
|
|
else {
|
2012-05-03 20:15:53 +00:00
|
|
|
req_key = se_alloc(sizeof(fcfzs_conv_key_t));
|
2003-01-14 01:17:44 +00:00
|
|
|
req_key->conv_idx = conversation->index;
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
cdata = se_alloc(sizeof(fcfzs_conv_data_t));
|
2003-01-14 01:17:44 +00:00
|
|
|
cdata->opcode = opcode;
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
g_hash_table_insert(fcfzs_req_hash, req_key, cdata);
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
2012-05-03 20:15:53 +00:00
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)) {
|
|
|
|
col_add_str(pinfo->cinfo, COL_INFO, val_to_str(opcode, fc_fzs_opcode_val,
|
2012-05-03 20:35:44 +00:00
|
|
|
"0x%x"));
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* Opcode is ACC or RJT */
|
2012-05-03 20:15:53 +00:00
|
|
|
conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
|
2012-05-03 20:35:44 +00:00
|
|
|
pinfo->ptype, pinfo->oxid,
|
|
|
|
pinfo->rxid, NO_PORT2);
|
2012-05-03 20:15:53 +00:00
|
|
|
isreq = FALSE;
|
2003-01-14 01:17:44 +00:00
|
|
|
if (!conversation) {
|
|
|
|
if (tree && (opcode == FCCT_MSG_ACC)) {
|
2012-05-03 20:15:53 +00:00
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)) {
|
|
|
|
col_add_str(pinfo->cinfo, COL_INFO,
|
2012-05-03 20:35:44 +00:00
|
|
|
val_to_str(opcode, fc_fzs_opcode_val,
|
|
|
|
"0x%x"));
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
/* No record of what this accept is for. Can't decode */
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_text(fcfzs_tree, tvb, 0, tvb_length(tvb),
|
2012-05-03 20:35:44 +00:00
|
|
|
"No record of Exchg. Unable to decode MSG_ACC");
|
2003-01-14 01:17:44 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
ckey.conv_idx = conversation->index;
|
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
cdata = (fcfzs_conv_data_t *)g_hash_table_lookup(fcfzs_req_hash, &ckey);
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
if (cdata != NULL) {
|
|
|
|
if (opcode == FCCT_MSG_ACC)
|
|
|
|
opcode = cdata->opcode;
|
|
|
|
else
|
|
|
|
failed_opcode = cdata->opcode;
|
|
|
|
}
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)) {
|
2003-01-14 01:17:44 +00:00
|
|
|
if (opcode != FCCT_MSG_RJT) {
|
2012-05-03 20:15:53 +00:00
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "MSG_ACC (%s)",
|
2012-05-03 20:35:44 +00:00
|
|
|
val_to_str(opcode,
|
|
|
|
fc_fzs_opcode_val, "0x%x"));
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
else {
|
2012-05-03 20:15:53 +00:00
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "MSG_RJT (%s)",
|
2012-05-03 20:35:44 +00:00
|
|
|
val_to_str(failed_opcode,
|
|
|
|
fc_fzs_opcode_val, "0x%x"));
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
}
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
if (tree) {
|
|
|
|
if ((cdata == NULL) && (opcode != FCCT_MSG_RJT)) {
|
|
|
|
/* No record of what this accept is for. Can't decode */
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_tree_add_text(fcfzs_tree, tvb, 0, tvb_length(tvb),
|
2012-05-03 20:35:44 +00:00
|
|
|
"No record of Exchg. Unable to decode MSG_ACC/RJT");
|
2003-01-14 01:17:44 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (opcode) {
|
|
|
|
case FCCT_MSG_RJT:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_rjt(tvb, fcfzs_tree);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_GZC:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gzc(tvb, 16, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_GEST:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gest(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_GZSN:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gzsn(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_GZD:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gzd(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_GZM:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gzm(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_GAZS:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gazs(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_GZS:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_gzs(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_ADZS:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_adzs(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_AZSD:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_azsd(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_AZS:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_arzs(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_DZS:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_dzs(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_AZM:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_arzm(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_AZD:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_arzd(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_RZM:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_arzm(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_RZD:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_arzd(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
case FC_FZS_RZS:
|
2012-05-03 20:15:53 +00:00
|
|
|
dissect_fcfzs_arzs(tvb, fcfzs_tree, isreq);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
default:
|
2012-05-03 20:15:53 +00:00
|
|
|
call_dissector(data_handle, tvb, pinfo, tree);
|
2003-01-14 01:17:44 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-05-21 04:49:01 +00:00
|
|
|
/* Register the protocol with Wireshark */
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
proto_register_fcfzs(void)
|
2007-08-15 22:27:52 +00:00
|
|
|
{
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_fcfzs_opcode,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Opcode", "fcfzs.opcode",
|
|
|
|
FT_UINT16, BASE_HEX, VALS(fc_fzs_opcode_val), 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_gzc_vendor,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Vendor Specific Flags", "fcfzs.gzc.vendor",
|
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_gest_vendor,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Vendor Specific State", "fcfzs.gest.vendor",
|
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_numzoneattrs,
|
|
|
|
{"Number of Zone Attribute Entries", "fcfzs.zone.numattrs",
|
2012-05-03 20:15:53 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_zonesetnmlen,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Zone Set Name Length", "fcfzs.zoneset.namelen",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_zonesetname,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Zone Set Name", "fcfzs.zoneset.name",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_numzones,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Number of Zones", "fcfzs.zoneset.numzones",
|
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_numzonesetattrs,
|
|
|
|
{"Number of Zone Set Attribute Entries", "fcfzs.zoneset.numattrs",
|
2012-05-03 20:15:53 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_zonenmlen,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Zone Name Length", "fcfzs.zone.namelen",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_zonename,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Zone Name", "fcfzs.zone.name",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_nummbrs,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Number of Zone Members", "fcfzs.zone.nummbrs",
|
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_nummbrentries,
|
|
|
|
{"Number of Zone Member Attribute Entries", "fcfzs.zonembr.numattrs",
|
2012-05-03 20:15:53 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_mbrtype,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Zone Member Identifier Type", "fcfzs.zonembr.idtype",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(fc_fzs_zonembr_type_val), 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_mbridlen,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Zone Member Identifier Length", "fcfzs.zonembr.idlen",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_mbrid,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Zone Member Identifier", "fcfzs.zone.mbrid",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_reason,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Reason Code", "fcfzs.reason",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(fc_ct_rjt_code_vals), 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_rjtdetail,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Reason Code Explanation", "fcfzs.rjtdetail",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(fc_fzs_rjt_code_val), 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_rjtvendor,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Vendor Specific Reason", "fcfzs.rjtvendor",
|
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_maxres_size,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Maximum/Residual Size", "fcfzs.maxres_size",
|
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
{ &hf_fcfzs_mbrid_lun,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"LUN", "fcfzs.zone.lun",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2005-10-24 08:44:36 +00:00
|
|
|
{ &hf_fcfzs_gzc_flags,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Capabilities", "fcfzs.gzc.flags",
|
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL}},
|
2012-05-03 20:15:53 +00:00
|
|
|
|
2005-10-24 08:44:36 +00:00
|
|
|
{ &hf_fcfzs_gzc_flags_hard_zones,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Hard Zones", "fcfzs.gzc.flags.hard_zones",
|
|
|
|
FT_BOOLEAN, 8, TFS(&tfs_fc_fcfzs_gzc_flags_hard_zones), 0x80,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2005-10-24 08:44:36 +00:00
|
|
|
{ &hf_fcfzs_gzc_flags_soft_zones,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Soft Zones", "fcfzs.gzc.flags.soft_zones",
|
|
|
|
FT_BOOLEAN, 8, TFS(&tfs_fc_fcfzs_gzc_flags_soft_zones), 0x40,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2005-10-24 08:44:36 +00:00
|
|
|
{ &hf_fcfzs_gzc_flags_zoneset_db,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"ZoneSet Database", "fcfzs.gzc.flags.zoneset_db",
|
|
|
|
FT_BOOLEAN, 8, TFS(&tfs_fc_fcfzs_gzc_flags_zoneset_db), 0x01,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2005-10-27 08:35:44 +00:00
|
|
|
{ &hf_fcfzs_zone_state,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Zone State", "fcfzs.zone.state",
|
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL}},
|
2012-05-03 20:15:53 +00:00
|
|
|
|
2005-10-27 08:35:44 +00:00
|
|
|
{ &hf_fcfzs_soft_zone_set_enforced,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Soft Zone Set", "fcfzs.soft_zone_set.enforced",
|
|
|
|
FT_BOOLEAN, 8, TFS(&tfs_fc_fcfzs_soft_zone_set_enforced), 0x80,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2005-10-27 08:35:44 +00:00
|
|
|
{ &hf_fcfzs_hard_zone_set_enforced,
|
2012-05-03 20:15:53 +00:00
|
|
|
{"Hard Zone Set", "fcfzs.hard_zone_set.enforced",
|
|
|
|
FT_BOOLEAN, 8, TFS(&tfs_fc_fcfzs_hard_zone_set_enforced), 0x40,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2003-01-14 01:17:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_fcfzs,
|
2005-10-24 08:44:36 +00:00
|
|
|
&ett_fcfzs_gzc_flags,
|
2005-10-27 08:35:44 +00:00
|
|
|
&ett_fcfzs_zone_state,
|
2003-01-14 01:17:44 +00:00
|
|
|
};
|
|
|
|
|
2005-03-29 14:56:09 +00:00
|
|
|
proto_fcfzs = proto_register_protocol("Fibre Channel Fabric Zone Server", "FC FZS", "fcfzs");
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
proto_register_field_array(proto_fcfzs, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2012-05-03 20:15:53 +00:00
|
|
|
register_init_routine(&fcfzs_init_protocol);
|
2003-01-14 01:17:44 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-05-03 20:15:53 +00:00
|
|
|
proto_reg_handoff_fcfzs(void)
|
2003-01-14 01:17:44 +00:00
|
|
|
{
|
|
|
|
dissector_handle_t fzs_handle;
|
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
fzs_handle = create_dissector_handle(dissect_fcfzs, proto_fcfzs);
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_add_uint("fcct.server", FCCT_GSRVR_FZS, fzs_handle);
|
2003-01-14 01:17:44 +00:00
|
|
|
|
2012-05-03 20:15:53 +00:00
|
|
|
data_handle = find_dissector("data");
|
2003-01-14 01:17:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|