2 * Routines for FC Inter-switch link services
3 * Copyright 2001, Dinesh G Dutt <ddutt@cisco.com>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 #ifdef HAVE_SYS_TYPES_H
35 # include <sys/types.h>
38 #ifdef HAVE_NETINET_IN_H
39 # include <netinet/in.h>
44 #include <epan/packet.h>
45 #include <epan/emem.h>
46 #include <epan/conversation.h>
47 #include <epan/etypes.h>
48 #include "packet-scsi.h"
49 #include "packet-fc.h"
50 #include "packet-fcswils.h"
51 #include "packet-fcct.h"
54 * See the FC-SW specifications.
57 #define FC_SWILS_RPLY 0x0
58 #define FC_SWILS_REQ 0x1
59 #define FC_SWILS_RSCN_DEVENTRY_SIZE 20
61 /* Zone name has the structure:
62 * name_len (1 byte), rsvd (3 bytes), name (m bytes), fill (n bytes)
63 * name_len excludes the 4 initial bytes before the name
65 #define ZONENAME_LEN(x, y) (tvb_get_guint8(x, y)+4)
67 /* Initialize the protocol and registered fields */
68 static int proto_fcswils = -1;
69 static int hf_swils_opcode = -1;
70 static int hf_swils_elp_rev = -1;
71 static int hf_swils_elp_flags = -1;
72 static int hf_swils_elp_r_a_tov = -1;
73 static int hf_swils_elp_e_d_tov = -1;
74 static int hf_swils_elp_req_epn = -1;
75 static int hf_swils_elp_req_esn = -1;
76 static int hf_swils_elp_clsf_svcp = -1;
77 static int hf_swils_elp_clsf_rcvsz = -1;
78 static int hf_swils_elp_clsf_conseq = -1;
79 static int hf_swils_elp_clsf_e2e = -1;
80 static int hf_swils_elp_clsf_openseq = -1;
81 static int hf_swils_elp_cls1_svcp = -1;
82 static int hf_swils_elp_cls1_rcvsz = -1;
83 static int hf_swils_elp_cls2_svcp = -1;
84 static int hf_swils_elp_cls2_rcvsz = -1;
85 static int hf_swils_elp_cls3_svcp = -1;
86 static int hf_swils_elp_cls3_rcvsz = -1;
87 static int hf_swils_elp_isl_fc_mode = -1;
88 static int hf_swils_elp_fcplen = -1;
89 static int hf_swils_elp_b2bcredit = -1;
90 static int hf_swils_elp_compat1 = -1;
91 static int hf_swils_elp_compat2 = -1;
92 static int hf_swils_elp_compat3 = -1;
93 static int hf_swils_elp_compat4 = -1;
94 static int hf_swils_efp_rec_type = -1;
95 static int hf_swils_efp_dom_id = -1;
96 static int hf_swils_efp_switch_name = -1;
97 static int hf_swils_efp_mcast_grpno = -1;
98 static int hf_swils_efp_alias_token = -1;
99 static int hf_swils_efp_record_len = -1;
100 static int hf_swils_efp_payload_len = -1;
101 static int hf_swils_efp_pswitch_pri = -1;
102 static int hf_swils_efp_pswitch_name = -1;
103 static int hf_swils_dia_switch_name = -1;
104 static int hf_swils_rdi_payload_len = -1;
105 static int hf_swils_rdi_req_sname = -1;
106 static int hf_swils_fspfh_cmd = -1;
107 static int hf_swils_fspfh_rev = -1;
108 static int hf_swils_fspfh_ar_num = -1;
109 static int hf_swils_fspfh_auth_type = -1;
110 static int hf_swils_fspfh_dom_id = -1;
111 static int hf_swils_fspfh_auth = -1;
112 static int hf_swils_hlo_options = -1;
113 static int hf_swils_hlo_hloint = -1;
114 static int hf_swils_hlo_deadint = -1;
115 static int hf_swils_hlo_rcv_domid = -1;
116 static int hf_swils_hlo_orig_pidx = -1;
117 static int hf_swils_ldrec_linkid = -1;
118 static int hf_swils_ldrec_out_pidx = -1;
119 static int hf_swils_ldrec_nbr_pidx = -1;
120 static int hf_swils_ldrec_link_type = -1;
121 static int hf_swils_ldrec_link_cost = -1;
122 static int hf_swils_lsrh_lsr_type = -1;
123 static int hf_swils_lsrh_lsid = -1;
124 static int hf_swils_lsrh_adv_domid = -1;
125 static int hf_swils_lsrh_ls_incid = -1;
126 static int hf_swils_esc_pdesc_vendorid = -1;
127 static int hf_swils_esc_swvendorid = -1;
128 static int hf_swils_esc_protocolid = -1;
129 static int hf_swils_rscn_evtype = -1;
130 static int hf_swils_rscn_addrfmt = -1;
131 static int hf_swils_rscn_detectfn = -1;
132 static int hf_swils_rscn_affectedport = -1;
133 static int hf_swils_rscn_portstate = -1;
134 static int hf_swils_rscn_portid = -1;
135 static int hf_swils_rscn_pwwn = -1;
136 static int hf_swils_rscn_nwwn = -1;
137 static int hf_swils_zone_activezonenm = -1;
138 static int hf_swils_zone_objname = -1;
139 static int hf_swils_zone_objtype = -1;
140 static int hf_swils_zone_mbrtype = -1;
141 static int hf_swils_zone_protocol = -1;
142 static int hf_swils_zone_mbrid = -1;
143 static int hf_swils_zone_status = -1;
144 static int hf_swils_zone_reason = -1;
145 static int hf_swils_aca_domainid = -1;
146 static int hf_swils_sfc_opcode = -1;
147 static int hf_swils_sfc_zonenm = -1;
148 static int hf_swils_rjt = -1;
149 static int hf_swils_rjtdet = -1;
150 static int hf_swils_rjtvendor = -1;
151 static int hf_swils_zone_mbrid_lun = -1;
152 static int hf_swils_ess_rev = -1;
153 static int hf_swils_ess_len = -1;
154 static int hf_swils_ess_numobj = -1;
155 static int hf_swils_interconnect_list_len = -1;
156 static int hf_swils_ess_vendorname = -1;
157 static int hf_swils_ess_modelname = -1;
158 static int hf_swils_ess_relcode = -1;
159 static int hf_swils_ess_vendorspecific = -1;
160 static int hf_swils_ess_cap_type = -1;
161 static int hf_swils_ess_cap_subtype = -1;
162 static int hf_swils_ess_cap_numentries = -1;
163 static int hf_swils_ess_cap_svc = -1;
164 static int hf_swils_ess_dns_obj0h = -1;
165 static int hf_swils_ess_dns_obj1h = -1;
166 static int hf_swils_ess_dns_obj2h = -1;
167 static int hf_swils_ess_dns_obj3h = -1;
168 static int hf_swils_ess_dns_zlacc = -1;
169 static int hf_swils_ess_dns_vendor = -1;
170 static int hf_swils_ess_fctlr_rscn = -1;
171 static int hf_swils_ess_fctlr_vendor = -1;
172 static int hf_swils_ess_fcs_basic = -1;
173 static int hf_swils_ess_fcs_platform = -1;
174 static int hf_swils_ess_fcs_topology = -1;
175 static int hf_swils_ess_fcs_enhanced = -1;
176 static int hf_swils_ess_fzs_enh_supp = -1;
177 static int hf_swils_ess_fzs_enh_ena = -1;
178 static int hf_swils_ess_fzs_mr = -1;
179 static int hf_swils_ess_fzs_zsdb_supp = -1;
180 static int hf_swils_ess_fzs_zsdb_ena = -1;
181 static int hf_swils_ess_fzs_adc_supp = -1;
182 static int hf_swils_ess_fzs_hardzone = -1;
183 static int hf_swils_mrra_rev = -1;
184 static int hf_swils_mrra_size = -1;
185 static int hf_swils_mrra_vendorid = -1;
186 static int hf_swils_mrra_reply = -1;
187 static int hf_swils_mrra_reply_size = -1;
188 static int hf_swils_mrra_waittime = -1;
189 static int hf_swils_ess_cap_t10 = -1;
190 static int hf_swils_ess_cap_vendorobj = -1;
191 static int hf_swils_ess_fzs_defzone = -1;
192 static int hf_swils_ess_cap_len = -1;
193 static int hf_swils_mrra_vendorinfo = -1;
196 /* Initialize the subtree pointers */
197 static gint ett_fcswils = -1;
198 static gint ett_fcswils_swacc = -1;
199 static gint ett_fcswils_swrjt = -1;
200 static gint ett_fcswils_elp = -1;
201 static gint ett_fcswils_efp = -1;
202 static gint ett_fcswils_efplist = -1;
203 static gint ett_fcswils_dia = -1;
204 static gint ett_fcswils_rdi = -1;
205 static gint ett_fcswils_fspfhdr = -1;
206 static gint ett_fcswils_hlo = -1;
207 static gint ett_fcswils_lsrec = -1;
208 static gint ett_fcswils_lsrechdr = -1;
209 static gint ett_fcswils_ldrec = -1;
210 static gint ett_fcswils_lsu = -1;
211 static gint ett_fcswils_lsa = -1;
212 static gint ett_fcswils_bf = -1;
213 static gint ett_fcswils_rcf = -1;
214 static gint ett_fcswils_rscn = -1;
215 static gint ett_fcswils_rscn_dev = -1;
216 static gint ett_fcswils_drlir = -1;
217 static gint ett_fcswils_mr = -1;
218 static gint ett_fcswils_zoneobjlist = -1;
219 static gint ett_fcswils_zoneobj = -1;
220 static gint ett_fcswils_zonembr = -1;
221 static gint ett_fcswils_aca = -1;
222 static gint ett_fcswils_rca = -1;
223 static gint ett_fcswils_sfc = -1;
224 static gint ett_fcswils_ufc = -1;
225 static gint ett_fcswils_esc = -1;
226 static gint ett_fcswils_esc_pdesc = -1;
227 static gint ett_fcswils_ieinfo = -1;
228 static gint ett_fcswils_capinfo = -1;
230 static const value_string fc_swils_opcode_key_val[] = {
231 {FC_SWILS_SWRJT , "SW_RJT"},
232 {FC_SWILS_SWACC , "SW_ACC"},
233 {FC_SWILS_ELP , "ELP"},
234 {FC_SWILS_EFP , "EFP"},
235 {FC_SWILS_DIA , "DIA"},
236 {FC_SWILS_RDI , "RDI"},
237 {FC_SWILS_HLO , "HLO"},
238 {FC_SWILS_LSU , "LSU"},
239 {FC_SWILS_LSA , "LSA"},
240 {FC_SWILS_BF , "BF"},
241 {FC_SWILS_RCF , "RCF"},
242 {FC_SWILS_RSCN , "SW_RSCN"},
243 {FC_SWILS_DRLIR , "DRLIR"},
244 {FC_SWILS_DSCN , "DSCN"},
245 {FC_SWILS_LOOPD , "LOOPD"},
246 {FC_SWILS_MR , "MR"},
247 {FC_SWILS_ACA , "ACA"},
248 {FC_SWILS_RCA , "RCA"},
249 {FC_SWILS_SFC , "SFC"},
250 {FC_SWILS_UFC , "UFC"},
251 {FC_SWILS_ESC , "ESC"},
252 {FC_SWILS_ESS , "ESS"},
253 {FC_SWILS_MRRA , "MRRA"},
254 {FC_SWILS_AUTH_ILS, "AUTH_ILS"},
258 static const value_string fc_swils_rjt_val [] = {
259 {FC_SWILS_RJT_INVCODE , "Invalid Cmd Code"},
260 {FC_SWILS_RJT_INVVER , "Invalid Revision"},
261 {FC_SWILS_RJT_LOGERR , "Logical Error"},
262 {FC_SWILS_RJT_INVSIZE , "Invalid Size"},
263 {FC_SWILS_RJT_LOGBSY , "Logical Busy"},
264 {FC_SWILS_RJT_PROTERR , "Protocol Error"},
265 {FC_SWILS_RJT_GENFAIL , "Unable to Perform"},
266 {FC_SWILS_RJT_CMDNOTSUPP, "Unsupported Cmd"},
267 {FC_SWILS_RJT_VENDUNIQ , "Vendor Unique Err"},
271 static const value_string fc_swils_deterr_val [] = {
272 {FC_SWILS_RJT_NODET , "No Additional Details"},
273 {FC_SWILS_RJT_CLSF_ERR , "Class F Svc Param Err"},
274 {FC_SWILS_RJT_CLSN_ERR , "Class N Svc Param Err"},
275 {FC_SWILS_RJT_INVFC_CODE , "Unknown Flow Ctrl Code"},
276 {FC_SWILS_RJT_INVFC_PARM , "Invalid Flow Ctrl Parm"},
277 {FC_SWILS_RJT_INV_PNAME , "Invalid Port Name"},
278 {FC_SWILS_RJT_INV_SNAME , "Invalid Switch Name"},
279 {FC_SWILS_RJT_TOV_MSMTCH , "R_A_/E_D_TOV Mismatch"},
280 {FC_SWILS_RJT_INV_DIDLST, "Invalid Domain ID List"},
281 {FC_SWILS_RJT_CMD_INPROG , "Cmd Already in Progress"},
282 {FC_SWILS_RJT_OORSRC , "Insufficient Resources"},
283 {FC_SWILS_RJT_NO_DID , "Domain ID Unavailable"},
284 {FC_SWILS_RJT_INV_DID, "Invalid Domain ID"},
285 {FC_SWILS_RJT_NO_REQ , "Request Not Supported"},
286 {FC_SWILS_RJT_NOLNK_PARM , "Link Parm Not Estd."},
287 {FC_SWILS_RJT_NO_REQDID , "Group of Domain IDs Unavail"},
288 {FC_SWILS_RJT_EP_ISOL , "E_Port Isolated"},
292 static const value_string fcswils_elp_fc_val[] = {
293 {FC_SWILS_ELP_FC_VENDOR, "Vendor Unique"},
294 {FC_SWILS_ELP_FC_RRDY, "R_RDY Flow Ctrl"},
298 static const value_string fcswils_rectype_val[] = {
299 {FC_SWILS_LRECTYPE_DOMAIN, "Domain ID Record"},
300 {FC_SWILS_LRECTYPE_MCAST, "Multicast ID Record"},
304 static const value_string fc_swils_link_type_val[] = {
306 {0xF0, "Vendor Specific"},
307 {0xF1, "Vendor Specific"},
308 {0xF2, "Vendor Specific"},
309 {0xF3, "Vendor Specific"},
310 {0xF4, "Vendor Specific"},
311 {0xF5, "Vendor Specific"},
312 {0xF6, "Vendor Specific"},
313 {0xF7, "Vendor Specific"},
314 {0xF8, "Vendor Specific"},
315 {0xF9, "Vendor Specific"},
316 {0xFA, "Vendor Specific"},
317 {0xFB, "Vendor Specific"},
318 {0xFC, "Vendor Specific"},
319 {0xFD, "Vendor Specific"},
320 {0xFE, "Vendor Specific"},
321 {0xFF, "Vendor Specific"},
325 static const value_string fc_swils_fspf_linkrec_val[] = {
326 {FC_SWILS_LSR_SLR, "Switch Link Record"},
327 {FC_SWILS_LSR_ARS, "AR Summary Record"},
331 static const value_string fc_swils_fspf_lsrflags_val[] = {
332 {0x0, "LSR is for a Topology Update"},
333 {0x1, "LSR is for Initial DB Sync | Not the last seq in DB sync"},
334 {0x2, "Last Seq in DB Sync. LSU has no LSRs"},
335 {0x3, "LSR is for Initial DB Sync | Last Seq in DB Sync"},
339 static const value_string fc_swils_rscn_portstate_val[] = {
340 {0, "No Additional Info"},
341 {1, "Port is online"},
342 {2, "Port is offline"},
346 static const value_string fc_swils_rscn_addrfmt_val[] = {
347 {0, "Port Addr Format"},
348 {1, "Area Addr Format"},
349 {2, "Domain Addr Format"},
350 {3, "Fabric Addr Format"},
354 static const value_string fc_swils_rscn_detectfn_val[] = {
355 {1, "Fabric Detected"},
356 {2, "N_Port Detected"},
360 static const value_string fc_swils_esc_protocol_val[] = {
362 {1, "FSPF-Backbone Protocol"},
363 {2, "FSPF Protocol"},
367 static const value_string fc_swils_zoneobj_type_val[] = {
369 {FC_SWILS_ZONEOBJ_ZONESET , "Zone Set"},
370 {FC_SWILS_ZONEOBJ_ZONE , "Zone"},
371 {FC_SWILS_ZONEOBJ_ZONEALIAS, "Zone Alias"},
375 const value_string fc_swils_zonembr_type_val[] = {
377 {FC_SWILS_ZONEMBR_WWN, "WWN"},
378 {FC_SWILS_ZONEMBR_DP, "Domain/Physical Port (0x00ddpppp)"},
379 {FC_SWILS_ZONEMBR_FCID, "FC Address"},
380 {FC_SWILS_ZONEMBR_ALIAS, "Zone Alias"},
381 {FC_SWILS_ZONEMBR_WWN_LUN, "WWN+LUN"},
382 {FC_SWILS_ZONEMBR_DP_LUN, "Domain/Physical Port+LUN"},
383 {FC_SWILS_ZONEMBR_FCID_LUN, "FCID+LUN"},
387 static const value_string fc_swils_mr_rsp_val[] = {
394 static const value_string fc_swils_mr_reason_val[] = {
396 {0x1, "Invalid Data Length"},
397 {0x2, "Unsupported Command"},
399 {0x4, "Not Authorized"},
400 {0x5, "Invalid Request"},
401 {0x6, "Fabric Changing"},
402 {0x7, "Update Not Staged"},
403 {0x8, "Invalid Zone Set Format"},
404 {0x9, "Invalid Data"},
405 {0xA, "Cannot Merge"},
409 static const value_string fc_swils_sfc_op_val[] = {
413 {3, "Activate Zone Set"},
414 {4, "Deactivate Zone Set"},
418 typedef struct _zonename {
425 typedef struct _fcswils_conv_key {
427 } fcswils_conv_key_t;
429 typedef struct _fcswils_conv_data {
431 } fcswils_conv_data_t;
433 GHashTable *fcswils_req_hash = NULL;
435 /* list of commands for each commandset */
436 typedef void (*fcswils_dissector_t)(tvbuff_t *tvb, proto_tree *tree, guint8 isreq);
438 typedef struct _fcswils_func_table_t {
439 fcswils_dissector_t func;
440 } fcswils_func_table_t;
442 static dissector_handle_t data_handle, fcsp_handle;
444 static gint get_zoneobj_len (tvbuff_t *tvb, gint offset);
450 fcswils_equal(gconstpointer v, gconstpointer w)
452 const fcswils_conv_key_t *v1 = v;
453 const fcswils_conv_key_t *v2 = w;
455 return (v1->conv_idx == v2->conv_idx);
459 fcswils_hash (gconstpointer v)
461 const fcswils_conv_key_t *key = v;
470 * Protocol initialization
473 fcswils_init_protocol(void)
475 if (fcswils_req_hash)
476 g_hash_table_destroy (fcswils_req_hash);
478 fcswils_req_hash = g_hash_table_new(fcswils_hash, fcswils_equal);
483 zonenm_to_str (tvbuff_t *tvb, gint offset)
485 int len = tvb_get_guint8 (tvb, offset);
486 return tvb_get_ephemeral_string (tvb, offset+4, len);
489 /* Offset points to the start of the zone object */
491 get_zoneobj_len (tvbuff_t *tvb, gint offset)
493 gint numrec, numrec1;
497 /* zone object structure is:
498 * type (1 byte), protocol (1 byte), rsvd (2 bytes), obj name (x bytes),
499 * num of zone mbrs (4 bytes ), list of zone members (each member if of
502 * zone member structure is:
503 * type (1 byte), rsvd (1 byte), flags (1 byte), id_len (1 byte),
506 objtype = tvb_get_guint8 (tvb, offset);
507 len = 4 + ZONENAME_LEN (tvb, offset+4); /* length upto num_of_mbrs field */
508 numrec = tvb_get_ntohl (tvb, offset+len); /* gets us num of zone mbrs */
510 len += 4; /* + num_mbrs */
511 for (i = 0; i < numrec; i++) {
512 if (objtype == FC_SWILS_ZONEOBJ_ZONESET) {
513 len += 4 + ZONENAME_LEN (tvb, offset+4+len); /* length upto num_of_mbrs field */
514 numrec1 = tvb_get_ntohl (tvb, offset+len);
517 for (j = 0; j < numrec1; j++) {
518 len += 4 + tvb_get_guint8 (tvb, offset+3+len);
522 len += 4 + tvb_get_guint8 (tvb, offset+3+len);
529 #define MAX_INTERCONNECT_ELEMENT_INFO_LEN 252
531 dissect_swils_interconnect_element_info (tvbuff_t *tvb, proto_tree *tree, int offset)
534 int len, max_len = MAX_INTERCONNECT_ELEMENT_INFO_LEN;
537 proto_tree_add_item (tree, hf_swils_interconnect_list_len, tvb, offset+3, 1, 0);
538 len = tvb_strsize (tvb, offset+4);
539 proto_tree_add_item (tree, hf_swils_ess_vendorname, tvb, offset+4, len, FALSE);
542 len = tvb_strsize (tvb, offset);
543 proto_tree_add_item (tree, hf_swils_ess_modelname, tvb, offset, len, FALSE);
546 len = tvb_strsize (tvb, offset);
547 proto_tree_add_item (tree, hf_swils_ess_relcode, tvb, offset, len, FALSE);
550 while (max_len > 0) {
551 /* Vendor specific field is a set of one or more null-terminated
554 len = tvb_strsize (tvb, offset);
555 proto_tree_add_item (tree, hf_swils_ess_vendorspecific, tvb, offset, len, FALSE);
565 dissect_swils_ess_capability (tvbuff_t *tvb, proto_tree *tree, int offset,
571 proto_tree_add_item (tree, hf_swils_ess_dns_zlacc, tvb, offset+3,
573 proto_tree_add_item (tree, hf_swils_ess_dns_obj3h, tvb, offset+3,
575 proto_tree_add_item (tree, hf_swils_ess_dns_obj2h, tvb, offset+3,
577 proto_tree_add_item (tree, hf_swils_ess_dns_obj1h, tvb, offset+3,
579 proto_tree_add_item (tree, hf_swils_ess_dns_obj0h, tvb, offset+3,
581 proto_tree_add_item (tree, hf_swils_ess_dns_vendor, tvb,
584 case FCCT_GSRVR_FCTLR:
585 proto_tree_add_item (tree, hf_swils_ess_fctlr_rscn, tvb,
587 proto_tree_add_item (tree, hf_swils_ess_fctlr_vendor, tvb,
591 proto_tree_add_item (tree, hf_swils_ess_fcs_basic, tvb,
593 proto_tree_add_item (tree, hf_swils_ess_fcs_platform, tvb,
595 proto_tree_add_item (tree, hf_swils_ess_fcs_topology, tvb,
597 proto_tree_add_item (tree, hf_swils_ess_fcs_enhanced, tvb,
601 proto_tree_add_item (tree, hf_swils_ess_fzs_enh_supp, tvb,
603 proto_tree_add_item (tree, hf_swils_ess_fzs_enh_ena, tvb,
605 proto_tree_add_item (tree, hf_swils_ess_fzs_mr, tvb, offset+3,
607 proto_tree_add_item (tree, hf_swils_ess_fzs_defzone, tvb,
609 proto_tree_add_item (tree, hf_swils_ess_fzs_zsdb_supp, tvb,
611 proto_tree_add_item (tree, hf_swils_ess_fzs_zsdb_ena, tvb,
613 proto_tree_add_item (tree, hf_swils_ess_fzs_adc_supp, tvb,
615 proto_tree_add_item (tree, hf_swils_ess_fzs_hardzone, tvb,
627 dissect_swils_ess_capability_obj (tvbuff_t *tvb, proto_tree *tree, int offset)
629 int i = 0, num_entries = 0, len = 0, total_len = 0;
630 guint8 type, subtype, srvr_type;
631 proto_item *ti = NULL;
632 proto_tree *capinfo_tree = NULL;
636 * Structure of capability object is: WK type (2B), WK subtype(2),
637 * rsvd (1), num_cap_entries (1), entry_1 (8) ... entry_n (8)
639 /* Compute length first to create subtree of cap object */
640 type = tvb_get_guint8 (tvb, offset);
641 if (type != FCCT_GSTYPE_VENDOR) {
642 num_entries = tvb_get_guint8 (tvb, offset+3);
643 total_len = 4 + (num_entries*8);
644 ti = proto_tree_add_text (tree, tvb, offset,
645 total_len, "Capability Object (%s)",
646 val_to_str (type, fc_ct_gstype_vals,
648 capinfo_tree = proto_item_add_subtree (ti, ett_fcswils_capinfo);
651 i = tvb_get_guint8 (tvb, offset+3);
654 ti = proto_tree_add_text (tree, tvb, offset,
655 i, "Capability Object (Vendor-specific 0x%x)",
657 capinfo_tree = proto_item_add_subtree (ti, ett_fcswils_capinfo);
660 proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_type, tvb, offset, 1, 0);
661 proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_subtype, tvb, offset+1,
663 subtype = tvb_get_guint8 (tvb, offset+1);
665 if (type != FCCT_GSTYPE_VENDOR) {
666 srvr_type = get_gs_server (type, subtype);
667 proto_tree_add_uint (capinfo_tree, hf_swils_ess_cap_svc, tvb, offset, 2,
669 proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_numentries, tvb,
674 while ((num_entries > 0) && tvb_bytes_exist (tvb, offset, 8)) {
675 dissect_swils_ess_capability (tvb, capinfo_tree, offset, srvr_type);
681 /* Those damn T11 guys defined another format for
682 * Vendor-specific objects.
684 proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_len, tvb, offset+3,
686 proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_t10, tvb, offset+4,
688 i -= 8; /* reduce length by t10 object size */
692 while ((i > 0) && tvb_bytes_exist (tvb, offset, 8)) {
693 proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_vendorobj,
705 dissect_swils_nullpayload (tvbuff_t *tvb _U_, proto_tree *tree _U_,
708 /* Common dissector for those ILSs without a payload */
713 dissect_swils_elp (tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
716 /* Set up structures needed to add the protocol subtree and manage it */
721 /* Response i.e. SW_ACC for an ELP has the same format as the request */
722 /* We skip the initial 4 bytes as we don't care about the opcode */
723 tvb_memcpy (tvb, (guint8 *)&elp, 4, FC_SWILS_ELP_SIZE);
725 elp.r_a_tov = g_ntohl (elp.r_a_tov);
726 elp.e_d_tov = g_ntohl (elp.e_d_tov);
727 elp.isl_flwctrl_mode = g_ntohs (elp.isl_flwctrl_mode);
728 elp.flw_ctrl_parmlen = g_ntohs (elp.flw_ctrl_parmlen);
732 proto_tree_add_item (elp_tree, hf_swils_elp_rev, tvb, offset++, 1, 0);
733 proto_tree_add_item (elp_tree, hf_swils_elp_flags, tvb, offset, 2, 0);
735 proto_tree_add_uint_format (elp_tree, hf_swils_elp_r_a_tov, tvb, offset, 4,
736 elp.r_a_tov, "R_A_TOV: %d msecs", elp.r_a_tov);
738 proto_tree_add_uint_format (elp_tree, hf_swils_elp_e_d_tov, tvb, offset, 4,
739 elp.e_d_tov, "E_D_TOV: %d msecs", elp.e_d_tov);
741 proto_tree_add_string (elp_tree, hf_swils_elp_req_epn, tvb, offset, 8,
742 fcwwn_to_str (elp.req_epname));
744 proto_tree_add_string (elp_tree, hf_swils_elp_req_esn, tvb, offset, 8,
745 fcwwn_to_str (elp.req_sname));
749 if (elp.clsf_svcparm[0] & 0x80) {
750 if (elp.clsf_svcparm[4] & 0x20) {
751 flags="Class F Valid | X_ID Interlock";
753 flags="Class F Valid | No X_ID Interlk";
756 flags="Class F Invld";
758 proto_tree_add_bytes_format (elp_tree, hf_swils_elp_clsf_svcp, tvb, offset, 6,
759 &elp.clsf_svcparm[0], "Class F Svc Parameters: (%s)", flags);
762 proto_tree_add_item (elp_tree, hf_swils_elp_clsf_rcvsz, tvb, offset, 2, 0);
764 proto_tree_add_item (elp_tree, hf_swils_elp_clsf_conseq, tvb, offset, 2, 0);
766 proto_tree_add_item (elp_tree, hf_swils_elp_clsf_e2e, tvb, offset, 2, 0);
768 proto_tree_add_item (elp_tree, hf_swils_elp_clsf_openseq, tvb, offset, 2, 0);
772 if (elp.cls1_svcparm[0] & 0x80) {
773 #define MAX_FLAGS_LEN 40
775 gint stroff, returned_length;
777 flagsbuf=ep_alloc(MAX_FLAGS_LEN);
780 returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff,
782 stroff += MIN(returned_length, MAX_FLAGS_LEN-stroff);
783 if (elp.cls1_svcparm[0] & 0x40) {
784 returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | IMX");
785 stroff += MIN(returned_length, MAX_FLAGS_LEN-stroff);
787 if (elp.cls1_svcparm[0] & 0x20) {
788 returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | IPS");
789 stroff += MIN(returned_length, MAX_FLAGS_LEN-stroff);
791 if (elp.cls1_svcparm[0] & 0x10) {
792 returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | LKS");
793 stroff += MIN(returned_length, MAX_FLAGS_LEN-stroff);
798 flags="Class 1 Invalid";
801 proto_tree_add_bytes_format (elp_tree, hf_swils_elp_cls1_svcp, tvb, offset, 2,
802 tvb_get_ptr (tvb, offset, 2),
803 "Class 1 Svc Parameters: (%s)", flags);
805 if (elp.cls1_svcparm[0] & 0x80) {
806 proto_tree_add_item (elp_tree, hf_swils_elp_cls1_rcvsz, tvb, offset, 2, 0);
811 if (elp.cls2_svcparm[0] & 0x80) {
812 if (elp.cls2_svcparm[0] & 0x08) {
813 flags="Class 2 Valid | Seq Delivery";
816 flags="Class 2 Valid | No Seq Delivery";
820 flags="Class 2 Invld";
823 proto_tree_add_bytes_format (elp_tree, hf_swils_elp_cls2_svcp, tvb, offset, 2,
824 &elp.cls2_svcparm[0],
825 "Class 2 Svc Parameters: (%s)", flags);
828 if (elp.cls2_svcparm[0] & 0x80) {
829 proto_tree_add_item (elp_tree, hf_swils_elp_cls2_rcvsz, tvb, offset, 2, 0);
834 if (elp.cls3_svcparm[0] & 0x80) {
835 if (elp.cls3_svcparm[0] & 0x08) {
836 flags="Class 3 Valid | Seq Delivery";
839 flags="Class 3 Valid | No Seq Delivery";
843 flags="Class 3 Invld";
845 proto_tree_add_bytes_format (elp_tree, hf_swils_elp_cls3_svcp, tvb, offset, 2,
846 &elp.cls3_svcparm[0],
847 "Class 3 Svc Parameters: (%s)", flags);
850 if (elp.cls3_svcparm[0] & 0x80) {
851 proto_tree_add_item (elp_tree, hf_swils_elp_cls3_rcvsz, tvb, offset, 2, 0);
855 proto_tree_add_string (elp_tree, hf_swils_elp_isl_fc_mode, tvb, offset, 2,
856 val_to_str (elp.isl_flwctrl_mode, fcswils_elp_fc_val, "Vendor Unique"));
858 proto_tree_add_item (elp_tree, hf_swils_elp_fcplen, tvb, offset, 2, 0);
860 proto_tree_add_item (elp_tree, hf_swils_elp_b2bcredit, tvb, offset, 4, 0);
862 proto_tree_add_item (elp_tree, hf_swils_elp_compat1, tvb, offset, 4, 0);
864 proto_tree_add_item (elp_tree, hf_swils_elp_compat2, tvb, offset, 4, 0);
866 proto_tree_add_item (elp_tree, hf_swils_elp_compat3, tvb, offset, 4, 0);
868 proto_tree_add_item (elp_tree, hf_swils_elp_compat4, tvb, offset, 4, 0);
874 dissect_swils_efp (tvbuff_t *tvb, proto_tree *efp_tree, guint8 isreq _U_)
877 /* Set up structures needed to add the protocol subtree and manage it */
879 proto_tree *lrec_tree;
886 efp.reclen = tvb_get_guint8 (tvb, offset);
888 proto_tree_add_uint (efp_tree, hf_swils_efp_record_len, tvb, offset, 1, efp.reclen);
890 efp.payload_len = tvb_get_ntohs (tvb, offset);
891 if (efp.payload_len < FC_SWILS_EFP_SIZE) {
893 proto_tree_add_uint_format (efp_tree, hf_swils_efp_payload_len,
894 tvb, offset, 2, efp.payload_len,
895 "Payload Len: %u (bogus, must be >= %u)",
896 efp.payload_len, FC_SWILS_EFP_SIZE);
900 proto_tree_add_item (efp_tree, hf_swils_efp_payload_len, tvb, offset, 2, 0);
901 offset += 5; /* skip 3 reserved bytes, too */
903 proto_tree_add_item (efp_tree, hf_swils_efp_pswitch_pri, tvb,
906 tvb_memcpy (tvb, efp.pswitch_name, offset, 8);
908 proto_tree_add_string (efp_tree, hf_swils_efp_pswitch_name, tvb, offset,
909 8, fcwwn_to_str (efp.pswitch_name));
912 /* Add List Records now */
914 if (efp.reclen == 0) {
915 proto_tree_add_text (efp_tree, tvb, 0, 0, "Record length is zero");
918 num_listrec = (efp.payload_len - FC_SWILS_EFP_SIZE)/efp.reclen;
919 while (num_listrec-- > 0) {
920 rec_type = tvb_get_guint8 (tvb, offset);
921 subti = proto_tree_add_text (efp_tree, tvb, offset, -1,
925 "Unknown record type (0x%02x)"));
926 lrec_tree = proto_item_add_subtree (subti, ett_fcswils_efplist);
927 proto_tree_add_uint (lrec_tree, hf_swils_efp_rec_type, tvb, offset, 1,
931 case FC_SWILS_LRECTYPE_DOMAIN:
932 proto_tree_add_item (lrec_tree, hf_swils_efp_dom_id, tvb, offset+1, 1, 0);
933 proto_tree_add_string (lrec_tree, hf_swils_efp_switch_name, tvb, offset+8, 8,
934 fcwwn_to_str (tvb_get_ptr(tvb, offset+8, 8)));
937 case FC_SWILS_LRECTYPE_MCAST:
938 proto_tree_add_item (lrec_tree, hf_swils_efp_mcast_grpno, tvb, offset+1, 1, 0);
941 offset += efp.reclen;
947 dissect_swils_dia (tvbuff_t *tvb, proto_tree *dia_tree, guint8 isreq _U_)
949 /* Set up structures needed to add the protocol subtree and manage it */
953 proto_tree_add_string (dia_tree, hf_swils_dia_switch_name, tvb, offset+4,
954 8, fcwwn_to_str (tvb_get_ptr (tvb, offset+4, 8)));
959 dissect_swils_rdi (tvbuff_t *tvb, proto_tree *rdi_tree, guint8 isreq)
961 /* Set up structures needed to add the protocol subtree and manage it */
966 plen = tvb_get_ntohs (tvb, offset+2);
968 proto_tree_add_item (rdi_tree, hf_swils_rdi_payload_len, tvb, offset+2, 2, 0);
969 proto_tree_add_string (rdi_tree, hf_swils_rdi_req_sname, tvb, offset+4,
970 8, fcwwn_to_str (tvb_get_ptr (tvb, offset+4, 8)));
972 /* 12 is the length of the initial header and 4 is the size of each
973 * domain request record.
975 numrec = (plen - 12)/4;
977 for (i = 0; i < numrec; i++) {
979 proto_tree_add_text (rdi_tree, tvb, offset+3, 1,
980 "Requested Domain ID: %d",
981 tvb_get_guint8 (tvb, offset+3));
984 proto_tree_add_text (rdi_tree, tvb, offset+3, 1,
985 "Granted Domain ID: %d",
986 tvb_get_guint8 (tvb, offset+3));
994 dissect_swils_fspf_hdr (tvbuff_t *tvb, proto_tree *tree, int offset)
997 proto_tree *fspfh_tree;
1000 /* 20 is the size of FSPF header */
1001 subti = proto_tree_add_text (tree, tvb, offset, 20, "FSPF Header");
1002 fspfh_tree = proto_item_add_subtree (subti, ett_fcswils_fspfhdr);
1004 proto_tree_add_item (fspfh_tree, hf_swils_fspfh_rev, tvb, offset+4,
1006 proto_tree_add_item (fspfh_tree, hf_swils_fspfh_ar_num, tvb,
1008 proto_tree_add_item (fspfh_tree, hf_swils_fspfh_auth_type, tvb,
1010 proto_tree_add_item (fspfh_tree, hf_swils_fspfh_dom_id, tvb, offset+11,
1012 proto_tree_add_item (fspfh_tree, hf_swils_fspfh_auth, tvb, offset+12,
1018 dissect_swils_fspf_lsrechdr (tvbuff_t *tvb, proto_tree *tree, int offset)
1020 proto_tree_add_item (tree, hf_swils_lsrh_lsr_type, tvb, offset, 1, 0);
1021 proto_tree_add_text (tree, tvb, offset+2, 2, "LSR Age: %d secs",
1022 tvb_get_ntohs (tvb, offset+2));
1023 proto_tree_add_text (tree, tvb, offset+4, 4, "Options : 0x%x",
1024 tvb_get_ntohl (tvb, offset+4));
1025 proto_tree_add_item (tree, hf_swils_lsrh_lsid, tvb, offset+11, 1, 0);
1026 proto_tree_add_item (tree, hf_swils_lsrh_adv_domid, tvb, offset+15, 1, 0);
1027 proto_tree_add_item (tree, hf_swils_lsrh_ls_incid, tvb, offset+16, 4, 0);
1028 proto_tree_add_text (tree, tvb, offset+20, 2, "Checksum: 0x%x",
1029 tvb_get_ntohs (tvb, offset+20));
1030 proto_tree_add_text (tree, tvb, offset+22, 2, "LSR Length: %d",
1031 tvb_get_ntohs (tvb, offset+22));
1035 dissect_swils_fspf_ldrec (tvbuff_t *tvb, proto_tree *tree, int offset)
1037 proto_tree_add_string (tree, hf_swils_ldrec_linkid, tvb, offset, 4,
1038 fc_to_str (tvb_get_ptr (tvb, offset+1, 3)));
1039 proto_tree_add_item (tree, hf_swils_ldrec_out_pidx, tvb, offset+5, 3, 0);
1040 proto_tree_add_item (tree, hf_swils_ldrec_nbr_pidx, tvb, offset+9, 3, 0);
1041 proto_tree_add_item (tree, hf_swils_ldrec_link_type, tvb, offset+12, 1, 0);
1042 proto_tree_add_item (tree, hf_swils_ldrec_link_cost, tvb, offset+14, 2, 0);
1046 dissect_swils_fspf_lsrec (tvbuff_t *tvb, proto_tree *tree, int offset,
1049 int i, j, num_ldrec;
1050 proto_item *subti1, *subti;
1051 proto_tree *lsrec_tree, *ldrec_tree, *lsrechdr_tree;
1054 for (j = 0; j < num_lsrec; j++) {
1055 num_ldrec = tvb_get_ntohs (tvb, offset+26);
1056 subti = proto_tree_add_text (tree, tvb, offset, (28+num_ldrec*16),
1057 "Link State Record %d (Domain %d)", j,
1058 tvb_get_guint8 (tvb, offset+15));
1059 lsrec_tree = proto_item_add_subtree (subti, ett_fcswils_lsrec);
1061 subti = proto_tree_add_text (lsrec_tree, tvb, offset, 24,
1062 "Link State Record Header");
1063 lsrechdr_tree = proto_item_add_subtree (subti,
1064 ett_fcswils_lsrechdr);
1066 dissect_swils_fspf_lsrechdr (tvb, lsrechdr_tree, offset);
1067 proto_tree_add_text (tree, tvb, offset+26, 2, "Number of Links: %d",
1071 for (i = 0; i < num_ldrec; i++) {
1072 subti1 = proto_tree_add_text (lsrec_tree, tvb, offset, 16,
1073 "Link Descriptor %d "
1074 "(Neighbor domain %d)", i,
1075 tvb_get_guint8 (tvb, offset+3));
1076 ldrec_tree = proto_item_add_subtree (subti1, ett_fcswils_ldrec);
1077 dissect_swils_fspf_ldrec (tvb, ldrec_tree, offset);
1085 dissect_swils_hello (tvbuff_t *tvb, proto_tree *hlo_tree, guint8 isreq _U_)
1087 /* Set up structures needed to add the protocol subtree and manage it */
1091 dissect_swils_fspf_hdr (tvb, hlo_tree, offset);
1093 proto_tree_add_item (hlo_tree, hf_swils_hlo_options, tvb, offset+20, 4, 0);
1094 proto_tree_add_item (hlo_tree, hf_swils_hlo_hloint, tvb, offset+24, 4, 0);
1095 proto_tree_add_item (hlo_tree, hf_swils_hlo_deadint, tvb, offset+28, 4, 0);
1096 proto_tree_add_item (hlo_tree, hf_swils_hlo_rcv_domid, tvb, offset+35, 1, 0);
1097 proto_tree_add_item (hlo_tree, hf_swils_hlo_orig_pidx, tvb, offset+37, 3, 0);
1102 dissect_swils_lsupdate (tvbuff_t *tvb, proto_tree *lsu_tree, guint8 isreq _U_)
1104 /* Set up structures needed to add the protocol subtree and manage it */
1109 dissect_swils_fspf_hdr (tvb, lsu_tree, offset);
1111 proto_tree_add_text (lsu_tree, tvb, offset+23, 1, "Flags : %s",
1112 val_to_str (tvb_get_guint8 (tvb, offset+23),
1113 fc_swils_fspf_lsrflags_val, "0x%x"));
1114 num_lsrec = tvb_get_ntohl (tvb, offset+24);
1116 proto_tree_add_text (lsu_tree, tvb, offset+24, 4, "Num of LSRs: %d",
1120 dissect_swils_fspf_lsrec (tvb, lsu_tree, offset, num_lsrec);
1125 dissect_swils_lsack (tvbuff_t *tvb, proto_tree *lsa_tree, guint8 isreq _U_)
1127 /* Set up structures needed to add the protocol subtree and manage it */
1129 int num_lsrechdr, i;
1131 proto_tree *lsrechdr_tree;
1134 dissect_swils_fspf_hdr (tvb, lsa_tree, offset);
1136 proto_tree_add_text (lsa_tree, tvb, offset+23, 1, "Flags : %s",
1137 val_to_str (tvb_get_guint8 (tvb, offset+23),
1138 fc_swils_fspf_lsrflags_val, "0x%x"));
1139 num_lsrechdr = tvb_get_ntohl (tvb, offset+24);
1141 proto_tree_add_text (lsa_tree, tvb, offset+24, 4, "Num of LSR Headers: %d",
1146 for (i = 0; i < num_lsrechdr; i++) {
1147 subti = proto_tree_add_text (lsa_tree, tvb, offset, 24,
1148 "Link State Record Header (Domain %d)",
1149 tvb_get_guint8 (tvb, offset+15));
1150 lsrechdr_tree = proto_item_add_subtree (subti,
1151 ett_fcswils_lsrechdr);
1152 dissect_swils_fspf_lsrechdr (tvb, lsrechdr_tree, offset);
1159 dissect_swils_rscn (tvbuff_t *tvb, proto_tree *rscn_tree, guint8 isreq)
1161 /* Set up structures needed to add the protocol subtree and manage it */
1163 proto_tree *dev_tree;
1164 int addrfmt, evtype;
1172 evtype = tvb_get_guint8 (tvb, offset+4);
1173 addrfmt = evtype & 0x0F;
1174 evtype = evtype >> 4;
1176 proto_tree_add_item (rscn_tree, hf_swils_rscn_evtype, tvb, offset+4,
1178 proto_tree_add_item (rscn_tree, hf_swils_rscn_addrfmt, tvb, offset+4,
1180 proto_tree_add_string (rscn_tree, hf_swils_rscn_affectedport, tvb,
1181 offset+5, 3, fc_to_str (tvb_get_ptr (tvb,
1183 proto_tree_add_item (rscn_tree, hf_swils_rscn_detectfn, tvb,
1185 numrec = tvb_get_ntohl (tvb, offset+12);
1187 if (!tvb_bytes_exist (tvb, offset+16, FC_SWILS_RSCN_DEVENTRY_SIZE*numrec)) {
1188 /* Some older devices do not include device entry information. */
1192 proto_tree_add_text (rscn_tree, tvb, offset+12, 4, "Num Entries: %d",
1196 for (i = 0; i < numrec; i++) {
1197 subti = proto_tree_add_text (rscn_tree, tvb, offset, 20,
1198 "Device Entry %d", i);
1199 dev_tree = proto_item_add_subtree (rscn_tree, ett_fcswils_rscn_dev);
1201 proto_tree_add_item (dev_tree, hf_swils_rscn_portstate, tvb, offset, 1, 0);
1202 proto_tree_add_string (dev_tree, hf_swils_rscn_portid, tvb, offset+1, 3,
1203 fc_to_str (tvb_get_ptr (tvb, offset+1, 3)));
1204 proto_tree_add_string (dev_tree, hf_swils_rscn_pwwn, tvb, offset+4, 8,
1205 fcwwn_to_str (tvb_get_ptr (tvb, offset+4, 8)));
1206 proto_tree_add_string (dev_tree, hf_swils_rscn_nwwn, tvb, offset+12, 8,
1207 fcwwn_to_str (tvb_get_ptr (tvb, offset+12, 8)));
1214 * Merge Request contains zoning objects organized in the following format:
1218 * +---------------- Zone Object
1220 * +-- +---------------- Zone Member
1224 * So the decoding of the zone merge request is based on this structure
1228 dissect_swils_zone_mbr (tvbuff_t *tvb, proto_tree *zmbr_tree, int offset)
1235 mbrtype = tvb_get_guint8 (tvb, offset);
1236 proto_tree_add_uint (zmbr_tree, hf_swils_zone_mbrtype, tvb,
1237 offset, 1, mbrtype);
1238 proto_tree_add_text (zmbr_tree, tvb, offset+2, 1, "Flags: 0x%x",
1239 tvb_get_guint8 (tvb, offset+2));
1240 idlen = tvb_get_guint8 (tvb, offset+3);
1241 proto_tree_add_text (zmbr_tree, tvb, offset+3, 1,
1242 "Identifier Length: %u", idlen);
1244 case FC_SWILS_ZONEMBR_WWN:
1245 proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
1247 fcwwn_to_str (tvb_get_ptr (tvb,
1251 case FC_SWILS_ZONEMBR_DP:
1252 g_snprintf(dpbuf, sizeof(dpbuf), "0x%08x", tvb_get_ntohl (tvb, offset+4));
1253 proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
1254 offset+4, 4, dpbuf);
1256 case FC_SWILS_ZONEMBR_FCID:
1257 proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
1259 fc_to_str (tvb_get_ptr (tvb,
1263 case FC_SWILS_ZONEMBR_ALIAS:
1264 str = zonenm_to_str (tvb, offset+4);
1265 proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
1266 offset+4, idlen, str);
1268 case FC_SWILS_ZONEMBR_WWN_LUN:
1269 proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
1271 fcwwn_to_str (tvb_get_ptr (tvb,
1274 proto_tree_add_item (zmbr_tree, hf_swils_zone_mbrid_lun, tvb,
1277 case FC_SWILS_ZONEMBR_DP_LUN:
1278 g_snprintf(dpbuf, sizeof(dpbuf), "0x%08x", tvb_get_ntohl (tvb, offset+4));
1279 proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
1280 offset+4, 4, dpbuf);
1281 proto_tree_add_item (zmbr_tree, hf_swils_zone_mbrid_lun, tvb,
1282 offset+8, 8, FALSE);
1284 case FC_SWILS_ZONEMBR_FCID_LUN:
1285 proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
1287 fc_to_str (tvb_get_ptr (tvb,
1290 proto_tree_add_item (zmbr_tree, hf_swils_zone_mbrid_lun, tvb,
1294 proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
1296 "Unknown member type format");
1302 dissect_swils_zone_obj (tvbuff_t *tvb, proto_tree *zobj_tree, int offset)
1304 proto_tree *zmbr_tree;
1305 int mbrlen, numrec, i, objtype;
1309 objtype = tvb_get_guint8 (tvb, offset);
1311 proto_tree_add_item (zobj_tree, hf_swils_zone_objtype, tvb, offset,
1313 proto_tree_add_item (zobj_tree, hf_swils_zone_protocol, tvb,
1315 str = zonenm_to_str (tvb, offset+4);
1316 proto_tree_add_string (zobj_tree, hf_swils_zone_objname, tvb,
1317 offset+4, ZONENAME_LEN (tvb, offset+4), str);
1319 numrec = tvb_get_ntohl (tvb, offset+4+ZONENAME_LEN (tvb, offset+4));
1320 proto_tree_add_text (zobj_tree, tvb,
1321 offset+4+ZONENAME_LEN (tvb, offset+4), 4,
1322 "Number of Zone Members: %d", numrec);
1324 offset += 8 + ZONENAME_LEN (tvb, offset+4);
1325 for (i = 0; i < numrec; i++) {
1326 if (objtype == FC_SWILS_ZONEOBJ_ZONESET) {
1327 dissect_swils_zone_obj (tvb, zobj_tree, offset);
1328 offset += get_zoneobj_len (tvb, offset);
1331 mbrlen = 4 + tvb_get_guint8 (tvb, offset+3);
1332 subti = proto_tree_add_text (zobj_tree, tvb, offset, mbrlen,
1333 "Zone Member %d", i);
1334 zmbr_tree = proto_item_add_subtree (zobj_tree,
1335 ett_fcswils_zonembr);
1336 dissect_swils_zone_mbr (tvb, zmbr_tree, offset);
1343 dissect_swils_mergereq (tvbuff_t *tvb, proto_tree *mr_tree, guint8 isreq)
1345 /* Set up structures needed to add the protocol subtree and manage it */
1347 proto_tree *zobjlist_tree, *zobj_tree;
1348 int numrec, i, zonesetlen, objlistlen, objlen;
1354 /* zonesetlen is the size of the zoneset including the zone name */
1355 zonesetlen = tvb_get_ntohs (tvb, offset+2);
1356 proto_tree_add_text (mr_tree, tvb, offset+2, 2,
1357 "Active ZoneSet Length: %u", zonesetlen);
1360 str = zonenm_to_str (tvb, offset+4);
1361 proto_tree_add_string (mr_tree, hf_swils_zone_activezonenm, tvb,
1362 offset+4, ZONENAME_LEN (tvb, offset+4),
1365 /* objlistlen gives the size of the active zoneset object list */
1366 objlistlen = zonesetlen - ZONENAME_LEN (tvb, offset+4);
1367 /* Offset = start of the active zoneset zoning object list */
1368 offset = offset + (4 + ZONENAME_LEN (tvb, offset+4));
1369 numrec = tvb_get_ntohl (tvb, offset);
1371 subti = proto_tree_add_text (mr_tree, tvb, offset, objlistlen,
1373 zobjlist_tree = proto_item_add_subtree (subti,
1374 ett_fcswils_zoneobjlist);
1376 proto_tree_add_text (zobjlist_tree, tvb, offset, 4,
1377 "Number of zoning objects: %d", numrec);
1380 for (i = 0; i < numrec; i++) {
1381 objlen = get_zoneobj_len (tvb, offset);
1382 subti = proto_tree_add_text (zobjlist_tree, tvb, offset+4,
1383 objlen, "Zone Object %d", i);
1384 zobj_tree = proto_item_add_subtree (subti, ett_fcswils_zoneobj);
1385 dissect_swils_zone_obj (tvb, zobj_tree, offset);
1393 zonesetlen = tvb_get_ntohl (tvb, offset);
1394 proto_tree_add_text (mr_tree, tvb, offset, 4,
1395 "Full Zone Set Length: %d", zonesetlen);
1398 objlistlen = zonesetlen;
1399 /* Offset = start of the active zoneset zoning object list */
1401 numrec = tvb_get_ntohl (tvb, offset);
1403 subti = proto_tree_add_text (mr_tree, tvb, offset, objlistlen,
1406 zobjlist_tree = proto_item_add_subtree (subti,
1407 ett_fcswils_zoneobjlist);
1408 proto_tree_add_text (zobjlist_tree, tvb, offset, 4,
1409 "Number of zoning objects: %d", numrec);
1411 for (i = 0; i < numrec; i++) {
1412 objlen = get_zoneobj_len (tvb, offset);
1413 subti = proto_tree_add_text (zobjlist_tree, tvb, offset,
1414 objlen, "Zone Object %d", i);
1415 zobj_tree = proto_item_add_subtree (subti, ett_fcswils_zoneobj);
1416 dissect_swils_zone_obj (tvb, zobj_tree, offset);
1422 proto_tree_add_item (mr_tree, hf_swils_zone_status, tvb,
1424 proto_tree_add_item (mr_tree, hf_swils_zone_reason, tvb,
1426 proto_tree_add_text (mr_tree, tvb, offset+7, 1,
1427 "Vendor Unique: 0x%x",
1428 tvb_get_guint8 (tvb, offset+7));
1434 dissect_swils_aca (tvbuff_t *tvb, proto_tree *aca_tree, guint8 isreq)
1436 /* Set up structures needed to add the protocol subtree and manage it */
1438 int numrec, plen, i;
1442 plen = tvb_get_ntohs (tvb, offset+2);
1443 proto_tree_add_text (aca_tree, tvb, offset+2, 2,
1444 "Domain ID List Length: %d", plen);
1448 for (i = 0; i < numrec; i++) {
1449 proto_tree_add_uint_format (aca_tree, hf_swils_aca_domainid,
1451 tvb_get_guint8 (tvb, offset+3),
1452 "Domain ID %d: %d", i,
1453 tvb_get_guint8 (tvb, offset+3));
1458 proto_tree_add_item (aca_tree, hf_swils_zone_status, tvb,
1460 proto_tree_add_item (aca_tree, hf_swils_zone_reason, tvb,
1462 proto_tree_add_text (aca_tree, tvb, offset+7, 1,
1463 "Vendor Unique: 0x%x",
1464 tvb_get_guint8 (tvb, offset+7));
1470 dissect_swils_rca (tvbuff_t *tvb, proto_tree *rca_tree, guint8 isreq)
1472 /* Set up structures needed to add the protocol subtree and manage it */
1477 proto_tree_add_item (rca_tree, hf_swils_zone_status, tvb,
1479 proto_tree_add_item (rca_tree, hf_swils_zone_reason, tvb,
1481 proto_tree_add_text (rca_tree, tvb, offset+7, 1,
1482 "Vendor Unique: 0x%x",
1483 tvb_get_guint8 (tvb, offset+7));
1489 dissect_swils_sfc (tvbuff_t *tvb, proto_tree *sfc_tree, guint8 isreq)
1491 /* Set up structures needed to add the protocol subtree and manage it */
1493 proto_tree *zobjlist_tree, *zobj_tree;
1494 int numrec, i, zonesetlen, objlistlen, objlen;
1500 proto_tree_add_item (sfc_tree, hf_swils_sfc_opcode, tvb, offset+1, 1, 0);
1502 zonesetlen = tvb_get_ntohs (tvb, offset+2);
1503 proto_tree_add_text (sfc_tree, tvb, offset+2, 2,
1504 "ZoneSet Length: %d", zonesetlen);
1507 str = zonenm_to_str (tvb, offset+4);
1508 proto_tree_add_string (sfc_tree, hf_swils_sfc_zonenm, tvb,
1509 offset+4, ZONENAME_LEN (tvb, offset+4),
1512 /* objlistlen gives the size of the active zoneset object list */
1513 objlistlen = zonesetlen - ZONENAME_LEN (tvb, offset+4);
1514 /* Offset = start of the active zoneset zoning object list */
1515 offset = offset + (4 + ZONENAME_LEN (tvb, offset+4));
1516 numrec = tvb_get_ntohl (tvb, offset);
1518 subti = proto_tree_add_text (sfc_tree, tvb, offset, objlistlen,
1520 zobjlist_tree = proto_item_add_subtree (subti,
1521 ett_fcswils_zoneobjlist);
1523 proto_tree_add_text (zobjlist_tree, tvb, offset, 4,
1524 "Number of zoning objects: %d", numrec);
1527 for (i = 0; i < numrec; i++) {
1528 objlen = get_zoneobj_len (tvb, offset);
1529 subti = proto_tree_add_text (zobjlist_tree, tvb, offset,
1530 objlen, "Zone Object %d", i);
1531 zobj_tree = proto_item_add_subtree (subti, ett_fcswils_zoneobj);
1532 dissect_swils_zone_obj (tvb, zobj_tree, offset);
1540 zonesetlen = tvb_get_ntohl (tvb, offset);
1541 proto_tree_add_text (sfc_tree, tvb, offset, 4,
1542 "Full Zone Set Length: %d", zonesetlen);
1545 objlistlen = zonesetlen;
1546 /* Offset = start of the active zoneset zoning object list */
1548 numrec = tvb_get_ntohl (tvb, offset);
1550 subti = proto_tree_add_text (sfc_tree, tvb, offset, objlistlen,
1553 zobjlist_tree = proto_item_add_subtree (subti,
1554 ett_fcswils_zoneobjlist);
1555 proto_tree_add_text (zobjlist_tree, tvb, offset, 4,
1556 "Number of zoning objects: %d", numrec);
1558 for (i = 0; i < numrec; i++) {
1559 objlen = get_zoneobj_len (tvb, offset);
1560 subti = proto_tree_add_text (zobjlist_tree, tvb, offset,
1561 objlen, "Zone Object %d", i);
1562 zobj_tree = proto_item_add_subtree (subti, ett_fcswils_zoneobj);
1563 dissect_swils_zone_obj (tvb, zobj_tree, offset);
1569 proto_tree_add_item (sfc_tree, hf_swils_zone_status, tvb,
1571 proto_tree_add_item (sfc_tree, hf_swils_zone_reason, tvb,
1573 proto_tree_add_text (sfc_tree, tvb, offset+7, 1,
1574 "Vendor Unique: 0x%x",
1575 tvb_get_guint8 (tvb, offset+7));
1581 dissect_swils_ufc (tvbuff_t *tvb, proto_tree *ufc_tree, guint8 isreq)
1583 /* Set up structures needed to add the protocol subtree and manage it */
1588 proto_tree_add_item (ufc_tree, hf_swils_zone_status, tvb,
1590 proto_tree_add_item (ufc_tree, hf_swils_zone_reason, tvb,
1592 proto_tree_add_text (ufc_tree, tvb, offset+7, 1,
1593 "Vendor Unique: 0x%x",
1594 tvb_get_guint8 (tvb, offset+7));
1600 dissect_swils_esc (tvbuff_t *tvb, proto_tree *esc_tree, guint8 isreq)
1602 /* Set up structures needed to add the protocol subtree and manage it */
1604 int i, numrec, plen;
1605 proto_tree *pdesc_tree;
1610 plen = tvb_get_ntohs (tvb, offset+2);
1611 proto_tree_add_text (esc_tree, tvb, offset+2, 2,
1612 "Payload Length: %d", plen);
1613 proto_tree_add_item (esc_tree, hf_swils_esc_swvendorid, tvb,
1615 numrec = (plen - 12)/12;
1618 for (i = 0; i < numrec; i++) {
1619 subti = proto_tree_add_text (esc_tree, tvb, offset, 12,
1620 "Protocol Descriptor %d", i);
1621 pdesc_tree = proto_item_add_subtree (subti,
1622 ett_fcswils_esc_pdesc);
1623 proto_tree_add_item (pdesc_tree, hf_swils_esc_pdesc_vendorid, tvb,
1625 proto_tree_add_item (pdesc_tree, hf_swils_esc_protocolid,
1626 tvb, offset+10, 2, 0);
1631 proto_tree_add_item (esc_tree, hf_swils_esc_swvendorid, tvb,
1633 subti = proto_tree_add_text (esc_tree, tvb, offset+12, 12,
1634 "Accepted Protocol Descriptor");
1635 pdesc_tree = proto_item_add_subtree (subti, ett_fcswils_esc_pdesc);
1637 proto_tree_add_item (pdesc_tree, hf_swils_esc_pdesc_vendorid, tvb,
1639 proto_tree_add_item (pdesc_tree, hf_swils_esc_protocolid,
1640 tvb, offset+22, 2, 0);
1646 dissect_swils_drlir (tvbuff_t *tvb _U_, proto_tree *drlir_tree _U_,
1649 /* Set up structures needed to add the protocol subtree and manage it */
1654 dissect_swils_swrjt (tvbuff_t *tvb, proto_tree *swrjt_tree, guint8 isreq _U_)
1656 /* Set up structures needed to add the protocol subtree and manage it */
1660 proto_tree_add_item (swrjt_tree, hf_swils_rjt, tvb, offset+5, 1, 0);
1661 proto_tree_add_item (swrjt_tree, hf_swils_rjtdet, tvb, offset+6, 1, 0);
1662 proto_tree_add_item (swrjt_tree, hf_swils_rjtvendor, tvb, offset+7,
1668 dissect_swils_ess (tvbuff_t *tvb, proto_tree *ess_tree, guint8 isreq _U_)
1671 gint16 numcapobj = 0;
1674 proto_item *ti = NULL;
1675 proto_tree *ieinfo_tree = NULL;
1681 proto_tree_add_item (ess_tree, hf_swils_ess_rev, tvb, offset+4, 4, 0);
1682 proto_tree_add_item (ess_tree, hf_swils_ess_len, tvb, offset+8, 4, 0);
1683 len = tvb_get_ntohl (tvb, offset+8);
1685 ti = proto_tree_add_text (ess_tree, tvb, offset+12,
1686 MAX_INTERCONNECT_ELEMENT_INFO_LEN+4,
1687 "Interconnect Element Info");
1688 ieinfo_tree = proto_item_add_subtree (ti, ett_fcswils_ieinfo);
1689 dissect_swils_interconnect_element_info (tvb, ieinfo_tree, offset+12);
1690 len -= 256; /* the interconnect obj above is 256 bytes */
1693 proto_tree_add_item (ess_tree, hf_swils_ess_numobj, tvb, offset, 2, 0);
1694 numcapobj = tvb_get_ntohs (tvb, offset);
1696 len -= 4; /* 2B numcapobj + 2B rsvd */
1699 while ((len > 0) && (numcapobj > 0)) {
1700 capobjlen = dissect_swils_ess_capability_obj (tvb, ess_tree, offset);
1703 offset += capobjlen;
1708 dissect_swils_mrra (tvbuff_t *tvb, proto_tree *tree, guint8 isreq)
1718 proto_tree_add_item (tree, hf_swils_mrra_rev, tvb, offset+4, 4, 0);
1719 proto_tree_add_item (tree, hf_swils_mrra_size, tvb, offset+8, 4, 0);
1720 proto_tree_add_item (tree, hf_swils_mrra_vendorid, tvb, offset+12, 8, 0);
1721 proto_tree_add_item (tree, hf_swils_mrra_vendorinfo, tvb, offset+20,
1724 proto_tree_add_item (tree, hf_swils_mrra_vendorid, tvb, offset+4,
1726 proto_tree_add_item (tree, hf_swils_mrra_reply, tvb, offset+12,
1728 proto_tree_add_item (tree, hf_swils_mrra_reply_size, tvb, offset+16,
1730 proto_tree_add_item (tree, hf_swils_mrra_waittime, tvb, offset+20,
1737 static fcswils_func_table_t fcswils_func_table[FC_SWILS_MAXCODE] = {
1739 /* 0x01 */ {dissect_swils_swrjt},
1754 /* 0x10 */ {dissect_swils_elp},
1755 /* 0x11 */ {dissect_swils_efp},
1756 /* 0x12 */ {dissect_swils_dia},
1757 /* 0x13 */ {dissect_swils_rdi},
1758 /* 0x14 */ {dissect_swils_hello},
1759 /* 0x15 */ {dissect_swils_lsupdate},
1760 /* 0x16 */ {dissect_swils_lsack},
1761 /* 0x17 */ {dissect_swils_nullpayload},
1762 /* 0x18 */ {dissect_swils_nullpayload},
1765 /* 0x1b */ {dissect_swils_rscn},
1768 /* 0x1e */ {dissect_swils_drlir},
1770 /* 0x20 */ {NULL /*dissect_swils_dscn*/},
1771 /* 0x21 */ {NULL /*dissect_swils_loopd*/},
1772 /* 0x22 */ {dissect_swils_mergereq},
1773 /* 0x23 */ {dissect_swils_aca},
1774 /* 0x24 */ {dissect_swils_rca},
1775 /* 0x25 */ {dissect_swils_sfc},
1776 /* 0x26 */ {dissect_swils_ufc},
1786 /* 0x30 */ {dissect_swils_esc},
1787 /* 0x31 */ {dissect_swils_ess},
1790 /* 0x34 */ {dissect_swils_mrra}
1793 /* Code to actually dissect the packets */
1795 dissect_fcswils (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1797 proto_item *ti = NULL;
1801 conversation_t *conversation;
1802 fcswils_conv_data_t *cdata;
1803 fcswils_conv_key_t ckey, *req_key;
1804 proto_tree *swils_tree = NULL;
1805 guint8 isreq = FC_SWILS_REQ;
1808 /* Make entries in Protocol column and Info column on summary display */
1809 col_set_str(pinfo->cinfo, COL_PROTOCOL, "SW_ILS");
1811 /* decoding of this is done by each individual opcode handler */
1812 opcode = tvb_get_guint8 (tvb, 0);
1815 ti = proto_tree_add_protocol_format (tree, proto_fcswils, tvb, 0,
1816 tvb_length (tvb), "SW_ILS");
1817 swils_tree = proto_item_add_subtree (ti, ett_fcswils);
1820 /* Register conversation if this is not a response */
1821 if ((opcode != FC_SWILS_SWACC) && (opcode != FC_SWILS_SWRJT)) {
1822 conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst,
1823 pinfo->ptype, pinfo->oxid,
1824 pinfo->rxid, NO_PORT2);
1825 if (!conversation) {
1826 conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst,
1827 pinfo->ptype, pinfo->oxid,
1828 pinfo->rxid, NO_PORT2);
1831 ckey.conv_idx = conversation->index;
1833 cdata = (fcswils_conv_data_t *)g_hash_table_lookup (fcswils_req_hash,
1836 /* Since we never free the memory used by an exchange, this maybe a
1837 * case of another request using the same exchange as a previous
1840 cdata->opcode = opcode;
1843 req_key = se_alloc (sizeof(fcswils_conv_key_t));
1844 req_key->conv_idx = conversation->index;
1846 cdata = se_alloc (sizeof(fcswils_conv_data_t));
1847 cdata->opcode = opcode;
1849 g_hash_table_insert (fcswils_req_hash, req_key, cdata);
1853 /* Opcode is ACC or RJT */
1854 conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst,
1855 pinfo->ptype, pinfo->oxid,
1856 pinfo->rxid, NO_PORT2);
1857 isreq = FC_SWILS_RPLY;
1858 if (!conversation) {
1859 if (tree && (opcode == FC_SWILS_SWACC)) {
1860 /* No record of what this accept is for. Can't decode */
1861 proto_tree_add_text (swils_tree, tvb, 0, tvb_length (tvb),
1862 "No record of Exchg. Unable to decode SW_ACC");
1867 ckey.conv_idx = conversation->index;
1869 cdata = (fcswils_conv_data_t *)g_hash_table_lookup (fcswils_req_hash, &ckey);
1871 if (cdata != NULL) {
1872 if (opcode == FC_SWILS_SWACC)
1873 opcode = cdata->opcode;
1875 failed_opcode = cdata->opcode;
1879 if ((cdata == NULL) && (opcode != FC_SWILS_SWRJT)) {
1880 /* No record of what this accept is for. Can't decode */
1881 proto_tree_add_text (swils_tree, tvb, 0, tvb_length (tvb),
1882 "No record of SW_ILS Req. Unable to decode SW_ACC");
1889 if (check_col (pinfo->cinfo, COL_INFO)) {
1890 if (isreq == FC_SWILS_REQ) {
1891 col_add_str (pinfo->cinfo, COL_INFO,
1892 val_to_str (opcode, fc_swils_opcode_key_val, "0x%x"));
1894 else if (opcode == FC_SWILS_SWRJT) {
1895 col_add_fstr (pinfo->cinfo, COL_INFO, "SW_RJT (%s)",
1896 val_to_str (failed_opcode, fc_swils_opcode_key_val, "0x%x"));
1899 col_add_fstr (pinfo->cinfo, COL_INFO, "SW_ACC (%s)",
1900 val_to_str (opcode, fc_swils_opcode_key_val, "0x%x"));
1905 proto_tree_add_item (swils_tree, hf_swils_opcode, tvb, offset, 1, 0);
1908 if ((opcode < FC_SWILS_MAXCODE) && fcswils_func_table[opcode].func) {
1909 fcswils_func_table[opcode].func (tvb, swils_tree, isreq);
1910 } else if (opcode == FC_SWILS_AUTH_ILS) {
1911 /* This is treated differently */
1912 if (isreq && fcsp_handle)
1913 call_dissector (fcsp_handle, tvb, pinfo, swils_tree);
1915 /* data dissector */
1916 next_tvb = tvb_new_subset_remaining (tvb, offset+4);
1917 call_dissector (data_handle, next_tvb, pinfo, tree);
1922 /* Register the protocol with Wireshark */
1924 /* this format is require because a script is used to build the C function
1925 that calls all the protocol registration.
1929 proto_register_fcswils (void)
1931 /* Setup list of header fields See Section 1.6.1 for details*/
1932 static hf_register_info hf[] = {
1934 {"Cmd Code", "swils.opcode",
1935 FT_UINT8, BASE_HEX, VALS (fc_swils_opcode_key_val), 0x0, NULL, HFILL}},
1936 { &hf_swils_elp_rev,
1937 {"Revision", "swils.elp.rev",
1938 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1939 { &hf_swils_elp_flags,
1940 {"Flag", "swils.elp.flag",
1941 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
1942 { &hf_swils_elp_r_a_tov,
1943 {"R_A_TOV", "swils.elp.ratov",
1944 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1945 { &hf_swils_elp_e_d_tov,
1946 {"E_D_TOV", "swils.elp.edtov",
1947 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1948 { &hf_swils_elp_req_epn,
1949 {"Req Eport Name", "swils.elp.reqepn",
1950 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
1951 { &hf_swils_elp_req_esn,
1952 {"Req Switch Name", "swils.elp.reqesn",
1953 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
1954 { &hf_swils_elp_clsf_svcp,
1955 {"Class F Svc Param", "swils.elp.clsfp",
1956 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
1957 { &hf_swils_elp_clsf_rcvsz,
1958 {"Max Class F Frame Size", "swils.elp.clsfrsz",
1959 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1960 { &hf_swils_elp_clsf_conseq,
1961 {"Class F Max Concurrent Seq", "swils.elp.clsfcs",
1962 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1963 { &hf_swils_elp_clsf_e2e,
1964 {"Class F E2E Credit", "swils.elp.cfe2e",
1965 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1966 { &hf_swils_elp_clsf_openseq,
1967 {"Class F Max Open Seq", "swils.elp.oseq",
1968 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1969 { &hf_swils_elp_cls1_svcp,
1970 {"Class 1 Svc Param", "swils.elp.cls1p",
1971 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
1972 { &hf_swils_elp_cls1_rcvsz,
1973 {"Class 1 Frame Size", "swils.elp.cls1rsz",
1974 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1975 { &hf_swils_elp_cls2_svcp,
1976 {"Class 2 Svc Param", "swils.elp.cls2p",
1977 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
1978 { &hf_swils_elp_cls2_rcvsz,
1979 {"Class 2 Frame Size", "swils.elp.cls1rsz",
1980 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1981 { &hf_swils_elp_cls3_svcp,
1982 {"Class 3 Svc Param", "swils.elp.cls3p",
1983 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
1984 { &hf_swils_elp_cls3_rcvsz,
1985 {"Class 3 Frame Size", "swils.elp.cls1rsz",
1986 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1987 { &hf_swils_elp_isl_fc_mode,
1988 {"ISL Flow Ctrl Mode", "swils.elp.fcmode",
1989 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
1990 { &hf_swils_elp_fcplen,
1991 {"Flow Ctrl Param Len", "swils.elp.fcplen",
1992 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1993 { &hf_swils_elp_b2bcredit,
1994 {"B2B Credit", "swils.elp.b2b",
1995 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1996 { &hf_swils_elp_compat1,
1997 {"Compatibility Param 1", "swils.elp.compat1",
1998 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
1999 { &hf_swils_elp_compat2,
2000 {"Compatibility Param 2", "swils.elp.compat2",
2001 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2002 { &hf_swils_elp_compat3,
2003 {"Compatibility Param 3", "swils.elp.compat3",
2004 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2005 { &hf_swils_elp_compat4,
2006 {"Compatibility Param 4", "swils.elp.compat4",
2007 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2008 { &hf_swils_efp_rec_type,
2009 {"Record Type", "swils.efp.rectype",
2010 FT_UINT8, BASE_HEX, VALS (fcswils_rectype_val), 0x0, NULL, HFILL}},
2011 { &hf_swils_efp_dom_id,
2012 {"Domain ID", "swils.efp.domid",
2013 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2014 { &hf_swils_efp_switch_name,
2015 {"Switch Name", "swils.efp.sname",
2016 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2017 { &hf_swils_efp_mcast_grpno,
2018 {"Mcast Grp#", "swils.efp.mcastno",
2019 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2020 { &hf_swils_efp_alias_token,
2021 {"Alias Token", "swils.efp.aliastok",
2022 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2023 { &hf_swils_efp_record_len,
2024 {"Record Len", "swils.efp.recordlen",
2025 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2026 { &hf_swils_efp_payload_len,
2027 {"Payload Len", "swils.efp.payloadlen",
2028 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2029 { &hf_swils_efp_pswitch_pri,
2030 {"Principal Switch Priority", "swils.efp.psprio",
2031 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2032 { &hf_swils_efp_pswitch_name,
2033 {"Principal Switch Name", "swils.efp.psname",
2034 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2035 { &hf_swils_dia_switch_name,
2036 {"Switch Name", "swils.dia.sname",
2037 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2038 { &hf_swils_rdi_payload_len,
2039 {"Payload Len", "swils.rdi.len",
2040 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2041 { &hf_swils_rdi_req_sname,
2042 {"Req Switch Name", "swils.rdi.reqsn",
2043 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2044 { &hf_swils_fspfh_cmd,
2045 {"Command:", "swils.fspf.cmd",
2046 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2047 { &hf_swils_fspfh_rev,
2048 {"Version", "swils.fspf.ver",
2049 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2050 { &hf_swils_fspfh_ar_num,
2051 {"AR Number", "swils.fspf.arnum",
2052 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2053 { &hf_swils_fspfh_auth_type,
2054 {"Authentication Type", "swils.fspf.authtype",
2055 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2056 { &hf_swils_fspfh_dom_id,
2057 {"Originating Domain ID", "swils.fspf.origdomid",
2058 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2059 { &hf_swils_fspfh_auth,
2060 {"Authentication", "swils.fspf.auth",
2061 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2062 { &hf_swils_hlo_options,
2063 {"Options", "swils.hlo.options",
2064 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2065 { &hf_swils_hlo_hloint,
2066 {"Hello Interval (secs)", "swils.hlo.hloint",
2067 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2068 { &hf_swils_hlo_deadint,
2069 {"Dead Interval (secs)", "swils.hlo.deadint",
2070 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2071 { &hf_swils_hlo_rcv_domid,
2072 {"Recipient Domain ID", "swils.hlo.rcvdomid",
2073 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2074 { &hf_swils_hlo_orig_pidx,
2075 {"Originating Port Idx", "swils.hlo.origpidx",
2076 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2077 { &hf_swils_lsrh_lsr_type,
2078 {"LSR Type", "swils.lsr.type",
2079 FT_UINT8, BASE_HEX, VALS (fc_swils_fspf_linkrec_val), 0x0, NULL, HFILL}},
2080 { &hf_swils_lsrh_lsid,
2081 {"Link State Id", "swils.ls.id",
2082 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2083 { &hf_swils_lsrh_adv_domid,
2084 {"Advertising Domain Id", "swils.lsr.advdomid",
2085 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2086 { &hf_swils_lsrh_ls_incid,
2087 {"LS Incarnation Number", "swils.lsr.incid",
2088 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2089 { &hf_swils_ldrec_linkid,
2090 {"Link ID", "swils.ldr.linkid",
2091 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2092 { &hf_swils_ldrec_out_pidx,
2093 {"Output Port Idx", "swils.ldr.out_portidx",
2094 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2095 { &hf_swils_ldrec_nbr_pidx,
2096 {"Neighbor Port Idx", "swils.ldr.nbr_portidx",
2097 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2098 { &hf_swils_ldrec_link_type,
2099 {"Link Type", "swils.ldr.linktype",
2100 FT_UINT8, BASE_HEX, VALS (fc_swils_link_type_val), 0x0, NULL, HFILL}},
2101 { &hf_swils_ldrec_link_cost,
2102 {"Link Cost", "swils.ldr.linkcost",
2103 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2104 { &hf_swils_rscn_evtype,
2105 {"Event Type", "swils.rscn.evtype",
2106 FT_UINT8, BASE_DEC, VALS (fc_swils_rscn_portstate_val), 0xF0, NULL, HFILL}},
2107 { &hf_swils_rscn_addrfmt,
2108 {"Address Format", "swils.rscn.addrfmt",
2109 FT_UINT8, BASE_DEC, VALS (fc_swils_rscn_addrfmt_val), 0x0F, NULL, HFILL}},
2110 { &hf_swils_rscn_affectedport,
2111 {"Affected Port ID", "swils.rscn.affectedport",
2112 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2113 { &hf_swils_rscn_detectfn,
2114 {"Detection Function", "swils.rscn.detectfn",
2115 FT_UINT32, BASE_HEX, VALS (fc_swils_rscn_detectfn_val), 0x0, NULL, HFILL}},
2116 { &hf_swils_rscn_portstate,
2117 {"Port State", "swils.rscn.portstate",
2118 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2119 { &hf_swils_rscn_portid,
2120 {"Port Id", "swils.rscn.portid",
2121 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2122 { &hf_swils_rscn_pwwn,
2123 {"Port WWN", "swils.rscn.pwwn",
2124 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2125 { &hf_swils_rscn_nwwn,
2126 {"Node WWN", "swils.rscn.nwwn",
2127 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2128 { &hf_swils_esc_swvendorid,
2129 {"Switch Vendor ID", "swils.esc.swvendor",
2130 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2131 { &hf_swils_esc_pdesc_vendorid,
2132 {"Vendor ID", "swils.esc.vendorid",
2133 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2134 { &hf_swils_esc_protocolid,
2135 {"Protocol ID", "swils.esc.protocol",
2136 FT_UINT16, BASE_HEX, VALS (fc_swils_esc_protocol_val), 0x0, NULL, HFILL}},
2137 { &hf_swils_zone_activezonenm,
2138 {"Active Zoneset Name", "swils.mr.activezonesetname",
2139 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2140 { &hf_swils_zone_objname,
2141 {"Zone Object Name", "swils.zone.zoneobjname",
2142 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2143 { &hf_swils_zone_objtype,
2144 {"Zone Object Type", "swils.zone.zoneobjtype",
2145 FT_UINT8, BASE_HEX, VALS (fc_swils_zoneobj_type_val), 0x0, NULL, HFILL}},
2146 { &hf_swils_zone_mbrtype,
2147 {"Zone Member Type", "swils.zone.mbrtype",
2148 FT_UINT8, BASE_HEX, VALS (fc_swils_zonembr_type_val), 0x0, NULL, HFILL}},
2149 { &hf_swils_zone_protocol,
2150 {"Zone Protocol", "swils.zone.protocol",
2151 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2152 { &hf_swils_zone_mbrid,
2153 {"Member Identifier", "swils.zone.mbrid",
2154 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2155 { &hf_swils_zone_status,
2156 {"Zone Command Status", "swils.zone.status",
2157 FT_UINT8, BASE_HEX, VALS (fc_swils_mr_rsp_val), 0x0,
2158 "Applies to MR, ACA, RCA, SFC, UFC", HFILL}},
2159 { &hf_swils_zone_reason,
2160 {"Zone Command Reason Code", "swils.zone.reason",
2161 FT_UINT8, BASE_HEX, VALS (fc_swils_mr_reason_val), 0x0,
2162 "Applies to MR, ACA, RCA, SFC, UFC", HFILL}},
2163 { &hf_swils_aca_domainid,
2164 {"Known Domain ID", "swils.aca.domainid",
2165 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2166 { &hf_swils_sfc_opcode,
2167 {"Operation Request", "swils.sfc.opcode",
2168 FT_UINT8, BASE_HEX, VALS (fc_swils_sfc_op_val), 0x0, NULL, HFILL}},
2169 { &hf_swils_sfc_zonenm,
2170 {"Zone Set Name", "swils.sfc.zonename",
2171 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2173 {"Reason Code", "swils.rjt.reason",
2174 FT_UINT8, BASE_HEX, VALS (fc_swils_rjt_val), 0x0, NULL, HFILL}},
2176 {"Reason Code Explanantion", "swils.rjt.reasonexpl",
2177 FT_UINT8, BASE_HEX, VALS (fc_swils_deterr_val), 0x0, NULL, HFILL}},
2178 { &hf_swils_rjtvendor,
2179 {"Vendor Unique Error Code", "swils.rjt.vendor",
2180 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2181 { &hf_swils_zone_mbrid_lun,
2182 {"LUN", "swils.zone.lun",
2183 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2184 { &hf_swils_ess_rev,
2185 {"Revision", "swils.ess.revision",
2186 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2187 { &hf_swils_ess_len,
2188 {"Payload Length", "swils.ess.leb",
2189 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2190 { &hf_swils_ess_numobj,
2191 {"Number of Capability Objects", "swils.ess.numobj",
2192 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2193 { &hf_swils_interconnect_list_len,
2194 {"List Length", "swils.ess.listlen",
2195 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2196 { &hf_swils_ess_vendorname,
2197 {"Vendor Name", "swils.ess.vendorname",
2198 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2199 { &hf_swils_ess_modelname,
2200 {"Model Name", "swils.ess.modelname",
2201 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2202 { &hf_swils_ess_relcode,
2203 {"Release Code", "swils.ess.relcode",
2204 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2205 { &hf_swils_ess_vendorspecific,
2206 {"Vendor Specific", "swils.ess.vendorspecific",
2207 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2208 { &hf_swils_ess_cap_type,
2209 {"Type", "swils.ess.capability.type",
2210 FT_UINT8, BASE_DEC, VALS (fc_ct_gstype_vals), 0x0, NULL, HFILL}},
2211 { &hf_swils_ess_cap_subtype,
2212 {"Subtype", "swils.ess.capability.subtype",
2213 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2214 { &hf_swils_ess_cap_numentries,
2215 {"Number of Entries", "swils.ess.capability.numentries",
2216 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2217 { &hf_swils_ess_cap_svc,
2218 {"Service Name", "swils.ess.capability.service",
2219 FT_UINT8, BASE_DEC, VALS (fc_ct_gsserver_vals), 0x0, NULL, HFILL}},
2220 { &hf_swils_ess_dns_obj0h,
2221 {"Name Server Entry Object 00h Support", "swils.ess.capability.dns.obj0h",
2222 FT_BOOLEAN, 8, NULL, 0x1, NULL, HFILL}},
2223 { &hf_swils_ess_dns_obj1h,
2224 {"Name Server Entry Object 01h Support", "swils.ess.capability.dns.obj1h",
2225 FT_BOOLEAN, 8, NULL, 0x2, NULL, HFILL}},
2226 { &hf_swils_ess_dns_obj2h,
2227 {"Name Server Entry Object 02h Support", "swils.ess.capability.dns.obj2h",
2228 FT_BOOLEAN, 8, NULL, 0x4, NULL, HFILL}},
2229 { &hf_swils_ess_dns_obj3h,
2230 {"Name Server Entry Object 03h Support", "swils.ess.capability.dns.obj3h",
2231 FT_BOOLEAN, 8, NULL, 0x8, NULL, HFILL}},
2232 { &hf_swils_ess_dns_zlacc,
2233 {"GE_PT Zero Length Accepted", "swils.ess.capability.dns.zlacc",
2234 FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL}},
2235 { &hf_swils_ess_dns_vendor,
2236 {"Vendor Specific Flags", "swils.ess.capability.dns.vendor",
2237 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2238 { &hf_swils_ess_fctlr_rscn,
2239 {"SW_RSCN Supported", "swils.ess.capability.fctlr.rscn",
2240 FT_BOOLEAN, 8, NULL, 0x1, NULL, HFILL}},
2241 { &hf_swils_ess_fctlr_vendor,
2242 {"Vendor Specific Flags", "swils.ess.capability.fctlr.vendor",
2243 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
2244 { &hf_swils_ess_fcs_basic,
2245 {"Basic Configuration Services", "swils.ess.capability.fcs.basic",
2246 FT_BOOLEAN, 8, NULL, 0x1, NULL, HFILL}},
2247 { &hf_swils_ess_fcs_platform,
2248 {"Platform Configuration Services", "swils.ess.capability.fcs.platform",
2249 FT_BOOLEAN, 8, NULL, 0x2, NULL, HFILL}},
2250 { &hf_swils_ess_fcs_topology,
2251 {"Topology Discovery Services", "swils.ess.capability.fcs.topology",
2252 FT_BOOLEAN, 8, NULL, 0x4, NULL, HFILL}},
2253 { &hf_swils_ess_fcs_enhanced,
2254 {"Enhanced Configuration Services", "swils.ess.capability.fcs.enhanced",
2255 FT_BOOLEAN, 8, NULL, 0x8, NULL, HFILL}},
2256 { &hf_swils_ess_fzs_enh_supp,
2257 {"Enhanced Zoning Supported", "swils.ess.capability.fzs.ezonesupp",
2258 FT_BOOLEAN, 8, NULL, 0x1, NULL, HFILL}},
2259 { &hf_swils_ess_fzs_enh_ena,
2260 {"Enhanced Zoning Enabled", "swils.ess.capability.fzs.ezoneena",
2261 FT_BOOLEAN, 8, NULL, 0x2, NULL, HFILL}},
2262 { &hf_swils_ess_fzs_mr,
2263 {"Merge Control Setting", "swils.ess.capability.fzs.mr",
2264 FT_BOOLEAN, 8, NULL, 0x4, NULL, HFILL}},
2265 { &hf_swils_ess_fzs_defzone,
2266 {"Default Zone Setting", "swils.ess.capability.fzs.defzone",
2267 FT_BOOLEAN, 8, NULL, 0x8, NULL, HFILL}},
2268 { &hf_swils_ess_fzs_zsdb_supp,
2269 {"Zoneset Database Supported", "swils.ess.capability.fzs.zsdbsupp",
2270 FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL}},
2271 { &hf_swils_ess_fzs_zsdb_ena,
2272 {"Zoneset Database Enabled", "swils.ess.capability.fzs.zsdbena",
2273 FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL}},
2274 { &hf_swils_ess_fzs_adc_supp,
2275 {"Active Direct Command Supported", "swils.ess.capability.fzs.adcsupp",
2276 FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL}},
2277 { &hf_swils_ess_fzs_hardzone,
2278 {"Hard Zoning Supported", "swils.ess.capability.fzs.hardzone",
2279 FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL}},
2280 { &hf_swils_ess_cap_len,
2281 {"Length", "swils.ess.capability.length",
2282 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2283 { &hf_swils_ess_cap_t10,
2284 {"T10 Vendor ID", "swils.ess.capability.t10id",
2285 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2286 { &hf_swils_ess_cap_vendorobj,
2287 {"Vendor-Specific Info", "swils.ess.capability.vendorobj",
2288 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2289 { &hf_swils_mrra_rev,
2290 {"Revision", "swils.mrra.revision",
2291 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2292 { &hf_swils_mrra_size,
2293 {"Merge Request Size", "swils.mrra.size",
2294 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2295 { &hf_swils_mrra_vendorid,
2296 {"Vendor ID", "swils.mrra.vendorid",
2297 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2298 { &hf_swils_mrra_vendorinfo,
2299 {"Vendor-Specific Info", "swils.mrra.vendorinfo",
2300 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
2301 { &hf_swils_mrra_reply,
2302 {"MRRA Response", "swils.mrra.reply",
2303 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2304 { &hf_swils_mrra_reply_size,
2305 {"Maximum Resources Available", "swils.mrra.replysize",
2306 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2307 { &hf_swils_mrra_waittime,
2308 {"Waiting Period (secs)", "swils.mrra.waittime",
2309 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
2312 /* Setup protocol subtree array */
2313 static gint *ett[] = {
2319 &ett_fcswils_efplist,
2322 &ett_fcswils_fspfhdr,
2325 &ett_fcswils_lsrechdr,
2332 &ett_fcswils_rscn_dev,
2335 &ett_fcswils_zoneobjlist,
2336 &ett_fcswils_zoneobj,
2337 &ett_fcswils_zonembr,
2343 &ett_fcswils_esc_pdesc,
2344 &ett_fcswils_ieinfo,
2345 &ett_fcswils_capinfo
2348 /* Register the protocol name and description */
2349 proto_fcswils = proto_register_protocol("Fibre Channel SW_ILS", "FC-SWILS", "swils");
2351 /* Required function calls to register the header fields and subtrees used */
2352 proto_register_field_array(proto_fcswils, hf, array_length(hf));
2353 proto_register_subtree_array(ett, array_length(ett));
2354 register_init_routine(&fcswils_init_protocol);
2357 /* If this dissector uses sub-dissector registration add a registration routine.
2358 This format is required because a script is used to find these routines and
2359 create the code that calls these routines.
2362 proto_reg_handoff_fcswils (void)
2364 dissector_handle_t swils_handle;
2366 swils_handle = create_dissector_handle (dissect_fcswils, proto_fcswils);
2367 dissector_add("fc.ftype", FC_FTYPE_SWILS, swils_handle);
2369 data_handle = find_dissector ("data");
2370 fcsp_handle = find_dissector ("fcsp");