2 * Routines for FC Extended Link Services
3 * Copyright 2001, Dinesh G Dutt <ddutt@cisco.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
13 * TODO Still (Complete compliance with FC-MI):
19 #include <epan/packet.h>
21 #include <epan/expert.h>
22 #include "packet-fc.h"
23 #include "packet-fcels.h"
25 void proto_register_fcels(void);
26 void proto_reg_handoff_fcels(void);
28 static dissector_handle_t els_handle
;
33 /* Initialize the protocol and registered fields */
34 static int proto_fcels
;
35 static int hf_fcels_opcode
;
36 static int hf_fcels_rjtcode
;
37 static int hf_fcels_rjtdetcode
;
38 static int hf_fcels_vnduniq
;
39 static int hf_fcels_b2b
;
40 static int hf_fcels_cmnfeatures
;
41 static int hf_fcels_bbscnum
;
42 static int hf_fcels_rcvsize
;
43 static int hf_fcels_maxconseq
;
44 static int hf_fcels_reloffset
;
45 static int hf_fcels_edtov
;
46 static int hf_fcels_npname
;
47 static int hf_fcels_fnname
;
49 static int hf_fcels_cls1param
;
50 static int hf_fcels_cls2param
;
51 static int hf_fcels_cls3param
;
52 static int hf_fcels_cls4param
;
54 static int hf_fcels_vendorvers
;
55 static int hf_fcels_svcavail
;
56 static int hf_fcels_clsflags
;
57 static int hf_fcels_clsrcvsize
;
58 static int hf_fcels_conseq
;
59 static int hf_fcels_e2e
;
60 static int hf_fcels_openseq
;
61 static int hf_fcels_nportid
;
62 static int hf_fcels_oxid
;
63 static int hf_fcels_rxid
;
64 static int hf_fcels_recovqual
;
65 static int hf_fcels_fabricaddr
;
66 static int hf_fcels_fabricpname
;
67 static int hf_fcels_failedrcvr
;
68 static int hf_fcels_flacompliance
;
69 static int hf_fcels_loopstate
;
70 static int hf_fcels_publicloop_bmap
;
71 static int hf_fcels_pvtloop_bmap
;
72 static int hf_fcels_alpa_map
;
73 static int hf_fcels_scrregn
;
74 static int hf_fcels_farp_matchcodept
;
75 static int hf_fcels_farp_respaction
;
76 static int hf_fcels_resportid
;
77 static int hf_fcels_respname
;
78 static int hf_fcels_respnname
;
79 static int hf_fcels_reqipaddr
;
80 static int hf_fcels_respipaddr
;
81 static int hf_fcels_hardaddr
;
82 static int hf_fcels_rps_flag
;
83 static int hf_fcels_rps_portnum
;
84 static int hf_fcels_rps_portstatus
;
85 static int hf_fcels_rnft_fc4type
;
86 static int hf_fcels_rscn_evqual
;
87 static int hf_fcels_rscn_addrfmt
;
88 static int hf_fcels_rscn_domain
;
89 static int hf_fcels_rscn_area
;
90 static int hf_fcels_rscn_port
;
91 static int hf_fcels_rec_fc4
;
92 static int hf_fcels_estat
;
93 static int hf_fcels_estat_resp
;
94 static int hf_fcels_estat_seq_init
;
95 static int hf_fcels_estat_compl
;
96 static int hf_fcels_nodeidfmt
;
97 static int hf_fcels_spidlen
;
98 static int hf_fcels_vendoruniq
;
99 static int hf_fcels_vendorsp
;
100 static int hf_fcels_asstype
;
101 static int hf_fcels_physport
;
102 static int hf_fcels_attnodes
;
103 static int hf_fcels_nodemgmt
;
104 static int hf_fcels_ipvers
;
105 static int hf_fcels_tcpport
;
106 static int hf_fcels_ip
;
107 static int hf_fcels_cbind_liveness
;
108 static int hf_fcels_cbind_addr_mode
;
109 static int hf_fcels_cbind_ifcp_version
;
110 static int hf_fcels_cbind_userinfo
;
111 static int hf_fcels_cbind_snpname
;
112 static int hf_fcels_cbind_dnpname
;
113 static int hf_fcels_cbind_status
;
114 static int hf_fcels_chandle
;
115 static int hf_fcels_unbind_status
;
116 static int hf_fcels_cmn_cios
;
117 static int hf_fcels_cmn_rro
;
118 static int hf_fcels_cmn_vvv
;
119 static int hf_fcels_cmn_b2b
;
120 static int hf_fcels_cmn_e_d_tov
;
121 static int hf_fcels_cmn_simplex
;
122 static int hf_fcels_cmn_multicast
;
123 static int hf_fcels_cmn_broadcast
;
124 static int hf_fcels_cmn_security
;
125 static int hf_fcels_cmn_clk
;
126 static int hf_fcels_cmn_dhd
;
127 static int hf_fcels_cmn_seqcnt
;
128 static int hf_fcels_cmn_payload
;
129 static int hf_fcels_cls_cns
;
130 static int hf_fcels_cls_sdr
;
131 static int hf_fcels_cls_prio
;
132 static int hf_fcels_cls_nzctl
;
133 static int hf_fcels_initctl
;
134 static int hf_fcels_initctl_initial_pa
;
135 static int hf_fcels_initctl_ack0
;
136 static int hf_fcels_initctl_ackgaa
;
137 static int hf_fcels_initctl_sync
;
138 static int hf_fcels_rcptctl
;
139 static int hf_fcels_rcptctl_ack0
;
140 static int hf_fcels_rcptctl_interlock
;
141 static int hf_fcels_rcptctl_policy
;
142 static int hf_fcels_rcptctl_category
;
143 static int hf_fcels_rcptctl_sync
;
144 static int hf_fcels_fcpflags
;
145 static int hf_fcels_fcpflags_trireq
;
146 static int hf_fcels_fcpflags_trirep
;
147 static int hf_fcels_fcpflags_retry
;
148 static int hf_fcels_fcpflags_ccomp
;
149 static int hf_fcels_fcpflags_datao
;
150 static int hf_fcels_fcpflags_initiator
;
151 static int hf_fcels_fcpflags_target
;
152 static int hf_fcels_fcpflags_rdxr
;
153 static int hf_fcels_fcpflags_wrxr
;
154 static int hf_fcels_prliloflags
;
155 static int hf_fcels_tprloflags_opav
;
156 static int hf_fcels_tprloflags_rpav
;
157 static int hf_fcels_tprloflags_npv
;
158 static int hf_fcels_tprloflags_gprlo
;
159 static int hf_fcels_speedflags
;
160 static int hf_fcels_speedflags_1gb
;
161 static int hf_fcels_speedflags_2gb
;
162 static int hf_fcels_speedflags_4gb
;
163 static int hf_fcels_speedflags_10gb
;
164 static int hf_fcels_prliloflags_opav
;
165 static int hf_fcels_prliloflags_ipe
;
166 static int hf_fcels_prliloflags_eip
;
167 /* Generated from convert_proto_tree_add_text.pl */
168 static int hf_fcels_rnft_index_of_first_rec_in_list
;
169 static int hf_fcels_lip_f7_received_count
;
170 static int hf_fcels_recovery_qualifier_status
;
171 static int hf_fcels_rpl_port_identifier
;
172 static int hf_fcels_rpl_index_of_i_port_block
;
173 static int hf_fcels_lip_f7_initiated_count
;
174 static int hf_fcels_srl_fl_port_addr
;
175 static int hf_fcels_loss_of_signal_count
;
176 static int hf_fcels_lirr_regn_function
;
177 static int hf_fcels_rscn_page_len
;
178 static int hf_fcels_prlilo_service_parameter_response
;
179 static int hf_fcels_prlilo_type_code_extension
;
180 static int hf_fcels_rnft_list_length
;
181 static int hf_fcels_rpl_index
;
182 static int hf_fcels_rpl_physical_port
;
183 static int hf_fcels_prlilo_originator_pa
;
184 static int hf_fcels_rpl_list_length
;
185 static int hf_fcels_common_identification_data_length
;
186 static int hf_fcels_loss_of_sync_count
;
187 static int hf_fcels_lip_reset_received_count
;
188 static int hf_fcels_rpl_max_size
;
189 static int hf_fcels_prlilo_response_code
;
190 static int hf_fcels_invalid_crc_count
;
191 static int hf_fcels_rscn_payload_len
;
192 static int hf_fcels_link_failure_count
;
193 static int hf_fcels_prlilo_3rd_party_n_port_id
;
194 static int hf_fcels_lip_al_ps
;
195 static int hf_fcels_prlilo_type
;
196 static int hf_fcels_lirr_regn_format
;
197 static int hf_fcels_srl_flag
;
198 static int hf_fcels_prlilo_page_length
;
199 static int hf_fcels_rpl_payload_length
;
200 static int hf_fcels_rpsc_port_oper_speed
;
201 static int hf_fcels_lip_reset_initiated_count
;
202 static int hf_fcels_l_port_status
;
203 static int hf_fcels_primitive_seq_protocol_err
;
204 static int hf_fcels_rnft_max_size
;
205 static int hf_fcels_lip_f8_received_count
;
206 static int hf_fcels_rnft_index
;
207 static int hf_fcels_rnft_payload_len
;
208 static int hf_fcels_prlilo_payload_length
;
209 static int hf_fcels_prlilo_responder_pa
;
210 static int hf_fcels_rpsc_number_of_entries
;
211 static int hf_fcels_prlilo_3rd_party_originator_pa
;
212 static int hf_fcels_invalid_xmission_word
;
213 static int hf_fcels_rnft_fc4_qualifier
;
214 static int hf_fcels_lip_f8_initiated_count
;
215 static int hf_fcels_rpl_port_name
;
217 static int ett_fcels
;
218 static int ett_fcels_lsrjt
;
219 static int ett_fcels_acc
;
220 static int ett_fcels_logi
;
221 static int ett_fcels_logi_cmnsvc
;
222 static int ett_fcels_logi_clssvc
;
223 static int ett_fcels_logo
;
224 static int ett_fcels_abtx
;
225 static int ett_fcels_rsi
;
226 static int ett_fcels_rrq
;
227 static int ett_fcels_rec
;
228 static int ett_fcels_prli
;
229 static int ett_fcels_prli_svcpg
;
230 static int ett_fcels_adisc
;
231 static int ett_fcels_farp
;
232 static int ett_fcels_rps
;
233 static int ett_fcels_rpl
;
234 static int ett_fcels_rplpb
;
235 static int ett_fcels_fan
;
236 static int ett_fcels_rscn
;
237 static int ett_fcels_rscn_rec
;
238 static int ett_fcels_estat
;
239 static int ett_fcels_scr
;
240 static int ett_fcels_rnft
;
241 static int ett_fcels_rnft_fc4
;
242 static int ett_fcels_lsts
;
243 static int ett_fcels_rnid
;
244 static int ett_fcels_rlir
;
245 static int ett_fcels_lirr
;
246 static int ett_fcels_srl
;
247 static int ett_fcels_rpsc
;
248 static int ett_fcels_cbind
;
249 static int ett_fcels_cmnfeatures
;
250 static int ett_fcels_clsflags
;
251 static int ett_fcels_initctl
;
252 static int ett_fcels_rcptctl
;
253 static int ett_fcels_fcpflags
;
254 static int ett_fcels_prliloflags
;
255 static int ett_fcels_speedflags
;
257 static expert_field ei_fcels_src_unknown
;
258 static expert_field ei_fcels_dst_unknown
;
259 static expert_field ei_fcels_no_record_of_els_req
;
260 static expert_field ei_fcels_no_record_of_exchange
;
262 static int * const hf_fcels_estat_fields
[] = {
263 &hf_fcels_estat_resp
,
264 &hf_fcels_estat_seq_init
,
265 &hf_fcels_estat_compl
,
269 static const true_false_string tfs_fcels_estat_resp
= {
270 "Responding to Exchange",
271 "Originator of Exchange"
274 static const true_false_string tfs_fcels_estat_seq_init
= {
275 "Seq Initiative held by REC responder",
276 "Seq Initiative not held by REC responder"
280 #define FC_ESB_ST_RESP (1U << 31) /* responder to exchange */
281 #define FC_ESB_ST_SEQ_INIT (1U << 30) /* holds sequence initiative */
282 #define FC_ESB_ST_COMPLETE (1U << 29) /* exchange is complete */
284 static const value_string fc_els_proto_val
[] = {
285 {FC_ELS_LSRJT
, "LS_RJT"},
286 {FC_ELS_ACC
, "ACC"},
287 {FC_ELS_PLOGI
, "PLOGI"},
288 {FC_ELS_FLOGI
, "FLOGI"},
289 {FC_ELS_LOGOUT
, "LOGO"},
290 {FC_ELS_ABTX
, "ABTX"},
291 {FC_ELS_RSI
, "RSI"},
292 {FC_ELS_RTV
, "RTV"},
293 {FC_ELS_RLS
, "RLS"},
294 {FC_ELS_ECHO
, "ECHO"},
295 {FC_ELS_TEST
, "TEST"},
296 {FC_ELS_RRQ
, "RRQ"},
297 {FC_ELS_REC
, "REC"},
298 {FC_ELS_SRR
, "SRR"},
299 {FC_ELS_PRLI
, "PRLI"},
300 {FC_ELS_PRLO
, "PRLO"},
301 {FC_ELS_TPRLO
, "TPRLO"},
302 {FC_ELS_PDISC
, "PDISC"},
303 {FC_ELS_FDISC
, "FDISC"},
304 {FC_ELS_ADISC
, "ADISC"},
305 {FC_ELS_FARP_REQ
, "FARP-REQ"},
306 {FC_ELS_FARP_RPLY
, "FARP-REPLY"},
307 {FC_ELS_RPS
, "RPS"},
308 {FC_ELS_RPL
, "RPL"},
309 {FC_ELS_FAN
, "FAN"},
310 {FC_ELS_RSCN
, "RSCN"},
311 {FC_ELS_SCR
, "SCR"},
312 {FC_ELS_RNFT
, "RNFT"},
313 {FC_ELS_LINIT
, "LINIT"},
314 {FC_ELS_LSTS
, "LSTS"},
315 {FC_ELS_RNID
, "RNID"},
316 {FC_ELS_RLIR
, "RLIR"},
317 {FC_ELS_LIRR
, "LIRR"},
318 {FC_ELS_SRL
, "SRL"},
319 {FC_ELS_RPSC
, "RPSC"},
320 {FC_ELS_LKA
, "LKA"},
321 {FC_ELS_AUTH
, "AUTH"},
322 {FC_ELS_CBIND
, "CBIND"},
323 {FC_ELS_UNBIND
, "UNBIND"},
326 value_string_ext fc_els_proto_val_ext
= VALUE_STRING_EXT_INIT(fc_els_proto_val
);
328 /* Reject Reason Codes */
329 #define FC_ELS_RJT_INVCMDCODE 0x01
330 #define FC_ELS_RJT_LOGERR 0x03
331 #define FC_ELS_RJT_LOGBSY 0x05
332 #define FC_ELS_RJT_PROTERR 0x07
333 #define FC_ELS_RJT_GENFAIL 0x09
334 #define FC_ELS_RJT_CMDNOTSUPP 0x0B
335 #define FC_ELS_RJT_GENFAIL2 0x0D
336 #define FC_ELS_RJT_CMDINPROG 0x0E
337 #define FC_ELS_RJT_FIP 0x20
338 #define FC_ELS_RJT_VENDOR 0xFF
340 static const value_string fc_els_rjt_val
[] = {
341 {FC_ELS_RJT_INVCMDCODE
, "Invalid Cmd Code"},
342 {FC_ELS_RJT_LOGERR
, "Logical Error"},
343 {FC_ELS_RJT_LOGBSY
, "Logical Busy"},
344 {FC_ELS_RJT_PROTERR
, "Protocol Error"},
345 {FC_ELS_RJT_GENFAIL
, "Unable to Perform Cmd"},
346 {FC_ELS_RJT_CMDNOTSUPP
, "Command Not Supported"},
347 {FC_ELS_RJT_GENFAIL2
, "Unable to Perform Cmd"},
348 {FC_ELS_RJT_CMDINPROG
, "Command in Progress Already"},
349 {FC_ELS_RJT_FIP
, "FIP Error"},
350 {FC_ELS_RJT_VENDOR
, "Vendor Unique Error"},
353 static value_string_ext fc_els_rjt_val_ext
= VALUE_STRING_EXT_INIT(fc_els_rjt_val
);
355 #define FC_ELS_RJT_DET_NODET 0x00
356 #define FC_ELS_RJT_DET_SVCPARM_OPT 0x01
357 #define FC_ELS_RJT_DET_SVCPARM_INITCTL 0x03
358 #define FC_ELS_RJT_DET_SVCPARM_RCPTCTL 0x05
359 #define FC_ELS_RJT_DET_SVCPARM_RCVSZE 0x07
360 #define FC_ELS_RJT_DET_SVCPARM_CSEQ 0x09
361 #define FC_ELS_RJT_DET_SVCPARM_CREDIT 0x0B
362 #define FC_ELS_RJT_DET_INV_PFNAME 0x0D
363 #define FC_ELS_RJT_DET_INV_NFNAME 0x0E
364 #define FC_ELS_RJT_DET_INV_CMNSVCPARM 0x0F
365 #define FC_ELS_RJT_DET_INV_ASSOCHDR 0x11
366 #define FC_ELS_RJT_DET_ASSOCHDR_REQD 0x13
367 #define FC_ELS_RJT_DET_INV_OSID 0x15
368 #define FC_ELS_RJT_DET_EXCHG_COMBO 0x17
369 #define FC_ELS_RJT_DET_CMDINPROG 0x19
370 #define FC_ELS_RJT_DET_PLOGI_REQ 0x1E
371 #define FC_ELS_RJT_DET_INV_NPID 0x1F
372 #define FC_ELS_RJT_DET_INV_SEQID 0x21
373 #define FC_ELS_RJT_DET_INV_EXCHG 0x23
374 #define FC_ELS_RJT_DET_INACTIVE_EXCHG 0x25
375 #define FC_ELS_RJT_DET_RQUAL_REQD 0x27
376 #define FC_ELS_RJT_DET_OORSRC 0x29
377 #define FC_ELS_RJT_DET_SUPPLYFAIL 0x2A
378 #define FC_ELS_RJT_DET_REQNOTSUPP 0x2C
379 #define FC_ELS_RJT_DET_INV_PLEN 0x2D
380 #define FC_ELS_RJT_DET_INV_ALIASID 0x30
381 #define FC_ELS_RJT_DET_OORSRC_ALIASID 0x31
382 #define FC_ELS_RJT_DET_INACTIVE_ALIASID 0x32
383 #define FC_ELS_RJT_DET_DEACT_ALIAS_FAIL1 0x33
384 #define FC_ELS_RJT_DET_DEACT_ALIAS_FAIL2 0x34
385 #define FC_ELS_RJT_DET_SVCPARM_CONFLICT 0x35
386 #define FC_ELS_RJT_DET_INV_ALIASTOK 0x36
387 #define FC_ELS_RJT_DET_UNSUPP_ALIASTOK 0x37
388 #define FC_ELS_RJT_DET_GRPFORM_FAIL 0x38
389 #define FC_ELS_RJT_DET_QOSPARM_ERR 0x40
390 #define FC_ELS_RJT_DET_INV_VCID 0x41
391 #define FC_ELS_RJT_DET_OORSRC_C4 0x42
392 #define FC_ELS_RJT_DET_INV_PNNAME 0x44
393 #define FC_ELS_RJT_DET_AUTH_REQD 0x48
394 #define FC_ELS_RJT_DET_NOT_NEIGHBOR 0x62
396 static const value_string fc_els_rjt_det_val
[] = {
397 {FC_ELS_RJT_DET_NODET
, "No further details"},
398 {FC_ELS_RJT_DET_SVCPARM_OPT
, "Svc Param - Options Error"},
399 {FC_ELS_RJT_DET_SVCPARM_INITCTL
, "Svc Param - Initiator Ctl Error"},
400 {FC_ELS_RJT_DET_SVCPARM_RCPTCTL
, "Svc Param - Recipient Ctl Error"},
401 {FC_ELS_RJT_DET_SVCPARM_RCVSZE
, "Svc Param - Recv Size Error"},
402 {FC_ELS_RJT_DET_SVCPARM_CSEQ
, "Svc Param - Concurrent Seq Error"},
403 {FC_ELS_RJT_DET_SVCPARM_CREDIT
, "Svc Param - Credit Error"},
404 {FC_ELS_RJT_DET_INV_PFNAME
, "Invalid N_/F_Port Name"},
405 {FC_ELS_RJT_DET_INV_NFNAME
, "Invalid Node/Fabric Name"},
406 {FC_ELS_RJT_DET_INV_CMNSVCPARM
, "Invalid Common Svc Param"},
407 {FC_ELS_RJT_DET_INV_ASSOCHDR
, "Invalid Association Header"},
408 {FC_ELS_RJT_DET_ASSOCHDR_REQD
, "Association Header Reqd"},
409 {FC_ELS_RJT_DET_INV_OSID
, "Invalid Orig S_ID"},
410 {FC_ELS_RJT_DET_EXCHG_COMBO
, "Invalid OXID-RXID Combo"},
411 {FC_ELS_RJT_DET_CMDINPROG
, "Cmd Already in Progress"},
412 {FC_ELS_RJT_DET_PLOGI_REQ
, "N_Port Login Required"},
413 {FC_ELS_RJT_DET_INV_NPID
, "Invalid N_Port Id"},
414 {FC_ELS_RJT_DET_INV_SEQID
, "Invalid SeqID"},
415 {FC_ELS_RJT_DET_INV_EXCHG
, "Attempt to Abort Invalid Exchg"},
416 {FC_ELS_RJT_DET_INACTIVE_EXCHG
, "Attempt to Abort Inactive Exchg"},
417 {FC_ELS_RJT_DET_RQUAL_REQD
, "Resource Qualifier Required"},
418 {FC_ELS_RJT_DET_OORSRC
, "Insufficient Resources for Login"},
419 {FC_ELS_RJT_DET_SUPPLYFAIL
, "Unable to Supply Req Data"},
420 {FC_ELS_RJT_DET_REQNOTSUPP
, "Command Not Supported"},
421 {FC_ELS_RJT_DET_INV_PLEN
, "Invalid Payload Length"},
422 {FC_ELS_RJT_DET_INV_ALIASID
, "No Alias IDs available"},
423 {FC_ELS_RJT_DET_OORSRC_ALIASID
, "Alias_ID Cannot be Activated (Out of Rsrc)"},
424 {FC_ELS_RJT_DET_INACTIVE_ALIASID
, "Alias_ID Cannot be Activated (Inv AID)"},
425 {FC_ELS_RJT_DET_DEACT_ALIAS_FAIL1
, "Alias_ID Cannot be Deactivated"},
426 {FC_ELS_RJT_DET_DEACT_ALIAS_FAIL2
, "Alias_ID Cannot be Deactivated"},
427 {FC_ELS_RJT_DET_SVCPARM_CONFLICT
, "Svc Parameter Conflict"},
428 {FC_ELS_RJT_DET_INV_ALIASTOK
, "Invalid Alias Token"},
429 {FC_ELS_RJT_DET_UNSUPP_ALIASTOK
, "Unsupported Alias Token"},
430 {FC_ELS_RJT_DET_GRPFORM_FAIL
, "Alias Grp Cannot be Formed"},
431 {FC_ELS_RJT_DET_QOSPARM_ERR
, "QoS Param Error"},
432 {FC_ELS_RJT_DET_INV_VCID
, "VC_ID Not Found"},
433 {FC_ELS_RJT_DET_OORSRC_C4
, "No Resources to Support Class 4 Conn"},
434 {FC_ELS_RJT_DET_INV_PNNAME
, "Invalid Port/Node Name"},
435 {FC_ELS_RJT_DET_AUTH_REQD
, "Authentication Required"},
436 {FC_ELS_RJT_DET_NOT_NEIGHBOR
, "VN2VN_Port not in Neighbor Set"},
439 static value_string_ext fc_els_rjt_det_val_ext
= VALUE_STRING_EXT_INIT(fc_els_rjt_det_val
);
441 static const value_string fc_els_flacompliance_val
[] = {
442 {1, "FC-FLA Level 1"},
443 {2, "FC-FLA Level 2"},
447 static const value_string fc_els_loopstate_val
[] = {
450 {3, "Initialization Failure"},
455 static const value_string fc_els_scr_reg_val
[] = {
456 {1, "Fabric Detected Regn"},
457 {2, "N_Port Detected Regn"},
459 {255, "Clear All Regn"},
463 static const value_string fc_els_farp_respaction_val
[] = {
465 {1, "Login Using Requesting Port ID"},
466 {2, "Respond with FARP-REPLY"},
467 {3, "Login & send FARP-REPLY"},
471 static const value_string fc_els_portstatus_val
[] = {
472 {0x01, "Link Reset Protocol in Progress"},
473 {0x02, "Loss of Synchronization"},
474 {0x04, "Loss of Signal"},
475 {0x10, "AL Connection | No Fabric"},
476 {0x14, "AL Connection | Loss of Signal"},
477 {0x18, "AL Connection | Fabric Detected"},
478 {0x1C, "AL Connection | Fabric Detected | Loss of Signal"},
479 {0x20, "Point-to-Point Connection | No Fabric"},
480 {0x24, "Point-to-Point Connection | Loss of Signal"},
481 {0x28, "Point-to-Point Connection | Fabric Detected"},
482 {0x2C, "Point-to-Point Connection | Fabric Detected | Loss of Signal"},
485 static value_string_ext fc_els_portstatus_val_ext
= VALUE_STRING_EXT_INIT(fc_els_portstatus_val
);
487 static const value_string fc_els_portspeed_val
[] = {
493 {0x0001, "Speed Not Estd."},
497 static const value_string fc_els_lirr_regfunc_val
[] = {
498 {0x1, "Set Reg: Conditionally Receive"},
499 {0x2, "Set Reg: Always Receive"},
504 static const value_string fc_els_rscn_evqual_val
[] = {
505 {0x00, "Event is not specified"},
506 {0x01, "Changed Name Server Object"},
507 {0x02, "Changed Port Attribute"},
508 {0x03, "Changed Service Object"},
509 {0x04, "Changed Switch Config"},
513 static const value_string fc_els_rscn_addrfmt_val
[] = {
514 {0, "Port Addr (single N/L Port or service)"},
515 {1, "Area Addr Group (area of E/L/N Port addresses)"},
516 {2, "Domain Addr Group"},
517 {3, "Fabric Addr Group"},
521 static const value_string fc_els_nodeid_val
[] = {
522 {0x00, "Common Identification Data Only"},
523 {0x05, "IP Specific Data"},
524 {0x08, "FCP-Specific Data"},
525 {0x20, "FC_CT Specific Data"},
526 {0x22, "SW_ILS Specific Data"},
527 {0x23, "AL Specific Data"},
528 {0x24, "SNMP Specific Data"},
529 {0xDF, "Common ID Data + General Topology Discovery Format"},
533 static const value_string fc_els_rnid_asstype_val
[] = {
542 {0x9, "Storage Device"},
544 {0xB, "Storage Subsystem"},
545 {0xE, "Storage Access Device"},
546 {0x11, "NAS Device"},
549 static value_string_ext fc_els_rnid_asstype_val_ext
= VALUE_STRING_EXT_INIT(fc_els_rnid_asstype_val
);
551 static const value_string fc_els_rnid_mgmt_val
[] = {
553 {1, "IP/TCP/Telnet"},
559 static const value_string fc_els_rnid_ipvers_val
[] = {
566 static const value_string fc_prli_fc4_val
[] = {
567 {FC_TYPE_SCSI
, "FCP"},
568 {FC_TYPE_IP
, "IP/FC"},
569 {FC_TYPE_LLCSNAP
, "LLC_SNAP"},
570 {FC_TYPE_ELS
, "Ext Link Svc"},
571 {FC_TYPE_FCCT
, "FC_CT"},
572 {FC_TYPE_SWILS
, "SW_ILS"},
574 {FC_TYPE_SNMP
, "SNMP"},
575 {FC_TYPE_CMNSVC
, "Common to all FC-4 Types"},
579 static const value_string cbind_addr_mode_vals
[] = {
580 {0, "Address Translation mode"},
581 {1, "Address Transparent Mode"},
585 static const value_string cbind_status_vals
[] = {
587 {16, "Failed - Unspecified Reason"},
588 {18, "Failed - Connection ID invalid"},
592 static const value_string unbind_status_vals
[] = {
594 {16, "Failed - Unspecified Reason"},
595 {17, "Failed - No such device"},
596 {18, "Failed - iFCP session already exists"},
597 {19, "Failed - Lack of resources"},
598 {20, "Failed - Incompatible address translation mode"},
599 {21, "Failed - Incorrect protocol version"},
600 {22, "Failed - Gateway not synchronized"},
604 typedef struct _fcels_conv_key
{
608 typedef struct _fcels_conv_data
{
612 static wmem_map_t
*fcels_req_hash
;
614 static dissector_handle_t fcsp_handle
;
620 fcels_equal(const void *v
, const void *w
)
622 const fcels_conv_key_t
*v1
= (const fcels_conv_key_t
*)v
;
623 const fcels_conv_key_t
*v2
= (const fcels_conv_key_t
*)w
;
625 return (v1
->conv_idx
== v2
->conv_idx
);
629 fcels_hash (const void *v
)
631 const fcels_conv_key_t
*key
= (const fcels_conv_key_t
*)v
;
639 static const true_false_string tfs_fc_fcels_cmn_b2b
= {
640 "Alt B2B Credit Mgmt",
641 "Normal B2B Credit Mgmt"
643 static const true_false_string tfs_fc_fcels_cmn_e_d_tov
= {
644 "E_D_TOV Resolution in ns",
645 "E_D_TOV Resolution in ms"
647 static const true_false_string tfs_fc_fcels_cmn_seqcnt
= {
648 "Cont. Incr SEQCNT rules",
649 "Normal SEQCNT rules"
651 static const true_false_string tfs_fc_fcels_cmn_payload
= {
652 "Payload Len=256 bytes",
653 "Payload Len=116 bytes"
657 dissect_cmnsvc (proto_tree
*parent_tree
, tvbuff_t
*tvb
, int offset
, uint16_t flags
, uint8_t opcode
)
659 static int * const common_flags
[] = {
664 &hf_fcels_cmn_multicast
,
665 &hf_fcels_cmn_broadcast
,
666 &hf_fcels_cmn_security
,
669 &hf_fcels_cmn_payload
,
673 static int * const pflags
[] = {
678 &hf_fcels_cmn_e_d_tov
,
679 &hf_fcels_cmn_simplex
,
680 &hf_fcels_cmn_multicast
,
681 &hf_fcels_cmn_broadcast
,
682 &hf_fcels_cmn_security
,
685 &hf_fcels_cmn_seqcnt
,
686 &hf_fcels_cmn_payload
,
691 if ((opcode
== FC_ELS_PLOGI
) || (opcode
== FC_ELS_PDISC
)) {
692 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_cmnfeatures
,
693 ett_fcels_cmnfeatures
, pflags
, flags
, BMT_NO_FLAGS
);
695 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_cmnfeatures
,
696 ett_fcels_cmnfeatures
, common_flags
, flags
, BMT_NO_FLAGS
);
701 static const true_false_string tfs_fc_fcels_cls_sdr
= {
702 "Seq Delivery Requested",
703 "Out of Order Delivery Requested"
705 static const true_false_string tfs_fc_fcels_cls_nzctl
= {
706 "Non-zero CS_CTL Tolerated",
707 "Non-zero CS_CTL Maybe Tolerated"
710 /* The next 3 routines decode only Class 2 & Class 3 relevant bits */
712 dissect_clssvc_flags (proto_tree
*parent_tree
, tvbuff_t
*tvb
, int offset
, uint16_t flags
, uint8_t opcode
)
714 static int * const common_flags
[] = {
720 static int * const pflags
[] = {
728 if ((opcode
== FC_ELS_FLOGI
) || (opcode
== FC_ELS_FDISC
)) {
729 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_clsflags
,
730 ett_fcels_clsflags
, pflags
, flags
, BMT_NO_FLAGS
);
732 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_clsflags
,
733 ett_fcels_clsflags
, common_flags
, flags
, BMT_NO_FLAGS
);
737 static const true_false_string tfs_fc_fcels_fcpflags_retry
= {
741 static const true_false_string tfs_fc_fcels_fcpflags_ccomp
= {
745 static const true_false_string tfs_fc_fcels_fcpflags_datao
= {
749 static const true_false_string tfs_fc_fcels_fcpflags_initiator
= {
753 static const true_false_string tfs_fc_fcels_fcpflags_target
= {
757 static const true_false_string tfs_fc_fcels_fcpflags_rdxr
= {
761 static const true_false_string tfs_fc_fcels_fcpflags_wrxr
= {
767 dissect_fcp_flags (proto_tree
*parent_tree
, tvbuff_t
*tvb
, int offset
, uint32_t flags
, uint8_t isreq
)
769 static int * const req_flags
[] = {
770 &hf_fcels_fcpflags_trireq
,
771 &hf_fcels_fcpflags_retry
,
772 &hf_fcels_fcpflags_ccomp
,
773 &hf_fcels_fcpflags_datao
,
774 &hf_fcels_fcpflags_initiator
,
775 &hf_fcels_fcpflags_target
,
776 &hf_fcels_fcpflags_rdxr
,
777 &hf_fcels_fcpflags_wrxr
,
781 static int * const rep_flags
[] = {
782 &hf_fcels_fcpflags_trirep
,
783 &hf_fcels_fcpflags_retry
,
784 &hf_fcels_fcpflags_ccomp
,
785 &hf_fcels_fcpflags_datao
,
786 &hf_fcels_fcpflags_initiator
,
787 &hf_fcels_fcpflags_target
,
788 &hf_fcels_fcpflags_rdxr
,
789 &hf_fcels_fcpflags_wrxr
,
794 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_fcpflags
,
795 ett_fcels_fcpflags
, req_flags
, flags
, BMT_NO_FALSE
);
797 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_fcpflags
,
798 ett_fcels_fcpflags
, rep_flags
, flags
, BMT_NO_FALSE
);
804 dissect_speed_flags (proto_tree
*parent_tree
, tvbuff_t
*tvb
, int offset
, uint32_t flags
, int port
)
807 static int * const speed_flags
[] = {
808 &hf_fcels_speedflags_1gb
,
809 &hf_fcels_speedflags_2gb
,
810 &hf_fcels_speedflags_4gb
,
811 &hf_fcels_speedflags_10gb
,
815 item
= proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_speedflags
,
816 ett_fcels_speedflags
, speed_flags
, flags
, BMT_NO_FALSE
|BMT_NO_TFS
);
817 proto_item_set_text(item
, "Port Speed Capabilities (Port %u): 0x%04x", port
, flags
);
820 static const true_false_string tfs_fc_fcels_tprloflags_gprlo
= {
824 static const true_false_string tfs_fc_fcels_prliloflags_ipe
= {
826 "Image pair NOT estd"
828 static const true_false_string tfs_fc_fcels_prliloflags_eip
= {
829 "Est Image Pair & Exchg Svc Param",
830 "Exchange Svc Param Only"
834 dissect_prlilo_flags (proto_tree
*parent_tree
, tvbuff_t
*tvb
, int offset
, int flags
, uint8_t opcode
)
836 static int * const tprlo_flags
[] = {
837 &hf_fcels_tprloflags_opav
,
838 &hf_fcels_tprloflags_rpav
,
839 &hf_fcels_tprloflags_npv
,
840 &hf_fcels_tprloflags_gprlo
,
844 static int * const prli_flags
[] = {
845 &hf_fcels_prliloflags_opav
,
846 &hf_fcels_tprloflags_rpav
,
847 &hf_fcels_prliloflags_ipe
,
851 static int * const not_prli_flags
[] = {
852 &hf_fcels_prliloflags_opav
,
853 &hf_fcels_tprloflags_rpav
,
854 &hf_fcels_prliloflags_eip
,
858 if (opcode
== FC_ELS_TPRLO
) {
859 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_prliloflags
,
860 ett_fcels_prliloflags
, tprlo_flags
, flags
, BMT_NO_FALSE
|BMT_NO_TFS
);
862 } else { /* opcode != TPRLO */
863 if (opcode
== FC_ELS_PRLI
) {
864 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_prliloflags
,
865 ett_fcels_prliloflags
, prli_flags
, flags
, BMT_NO_FALSE
);
867 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_prliloflags
,
868 ett_fcels_prliloflags
, not_prli_flags
, flags
, BMT_NO_FALSE
);
873 static const value_string initial_pa_vals
[] = {
874 { 0, "Initial P_A Not Supported" },
875 { 1, "Initial P_A Supported" },
876 { 3, "Initial P_A Required & Supported" },
879 static const true_false_string tfs_fc_fcels_initctl_ackgaa
= {
880 "ACK Generation Assistance Avail",
881 "NO ack generation assistance"
885 dissect_initctl_flags (proto_tree
*parent_tree
, tvbuff_t
*tvb
, int offset
, uint16_t flags
, uint8_t opcode
)
887 static int * const plogi_flags
[] = {
888 &hf_fcels_initctl_initial_pa
,
889 &hf_fcels_initctl_ack0
,
890 &hf_fcels_initctl_ackgaa
,
891 &hf_fcels_initctl_sync
,
895 static int * const not_plogi_flags
[] = {
896 &hf_fcels_initctl_sync
,
900 if ((opcode
== FC_ELS_PLOGI
) || (opcode
== FC_ELS_PDISC
)) {
901 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_initctl
,
902 ett_fcels_initctl
, plogi_flags
, flags
, BMT_NO_FALSE
);
904 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_initctl
,
905 ett_fcels_initctl
, not_plogi_flags
, flags
, BMT_NO_FALSE
);
910 static const value_string rcptctl_policy_vals
[] = {
911 { 0, "Error Policy: Discard Policy only" },
912 { 1, "Error Policy: Reserved" },
913 { 2, "Error Policy: Both discard and process policies supported" },
914 { 3, "Error Policy: Reserved" },
917 static const value_string rcptctl_category_vals
[] = {
918 { 0, "1 Category/Seq" },
919 { 1, "2 Categories/Seq" },
920 { 3, "More than 2 Categories/Seq" },
925 dissect_rcptctl_flags (proto_tree
*parent_tree
, tvbuff_t
*tvb
, int offset
, uint16_t flags
, uint8_t opcode
)
927 static int * const plogi_flags
[] = {
928 &hf_fcels_rcptctl_ack0
,
929 &hf_fcels_rcptctl_interlock
,
930 &hf_fcels_rcptctl_policy
,
931 &hf_fcels_rcptctl_category
,
932 &hf_fcels_rcptctl_sync
,
936 static int * const not_plogi_flags
[] = {
937 &hf_fcels_rcptctl_sync
,
941 if ((opcode
== FC_ELS_PLOGI
) || (opcode
== FC_ELS_PDISC
)) {
942 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_rcptctl
,
943 ett_fcels_rcptctl
, plogi_flags
, flags
, BMT_NO_FALSE
);
945 proto_tree_add_bitmask_value_with_flags(parent_tree
, tvb
, offset
, hf_fcels_rcptctl
,
946 ett_fcels_rcptctl
, not_plogi_flags
, flags
, BMT_NO_FALSE
);
950 /* Maximum length of possible string from, construct_*_string
951 * 296 bytes, FIX possible buffer overflow */
952 #define FCELS_LOGI_MAXSTRINGLEN 512
955 dissect_fcels_logi (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
956 proto_item
*ti
, uint8_t opcode
)
958 /* Set up structures needed to add the protocol subtree and manage it */
962 proto_tree
*logi_tree
, *cmnsvc_tree
;
966 logi_tree
= proto_item_add_subtree (ti
, ett_fcels_logi
);
967 proto_tree_add_item (logi_tree
, hf_fcels_opcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
969 cmnsvc_tree
= proto_tree_add_subtree(logi_tree
, tvb
, offset
+4, 16, ett_fcels_logi_cmnsvc
, NULL
, "Common Svc Parameters");
970 proto_tree_add_item (cmnsvc_tree
, hf_fcels_b2b
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
971 flag
= tvb_get_ntohs (tvb
, offset
+8);
977 dissect_cmnsvc (cmnsvc_tree
, tvb
, offset
+8, flag
, opcode
);
979 proto_tree_add_item (cmnsvc_tree
, hf_fcels_bbscnum
, tvb
, offset
+10, 1, ENC_BIG_ENDIAN
);
980 proto_tree_add_item (cmnsvc_tree
, hf_fcels_rcvsize
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
981 proto_tree_add_item (cmnsvc_tree
, hf_fcels_maxconseq
, tvb
, offset
+12, 2, ENC_BIG_ENDIAN
);
982 proto_tree_add_item (cmnsvc_tree
, hf_fcels_reloffset
, tvb
, offset
+14, 2, ENC_BIG_ENDIAN
);
983 proto_tree_add_item (cmnsvc_tree
, hf_fcels_edtov
, tvb
, offset
+16, 4, ENC_BIG_ENDIAN
);
984 proto_tree_add_item (cmnsvc_tree
, hf_fcels_npname
, tvb
, offset
+20, 8, ENC_NA
);
985 proto_tree_add_item (cmnsvc_tree
, hf_fcels_fnname
, tvb
, offset
+28, 8, ENC_NA
);
987 /* Add subtree for class paramters */
989 for (svcclass
= 1; svcclass
< 5; svcclass
++) {
990 cmnsvc_tree
= proto_tree_add_subtree_format(logi_tree
, tvb
, offset
, 16,
991 ett_fcels_logi_cmnsvc
, NULL
, "Class %d Svc Parameters", svcclass
);
993 flag
= tvb_get_ntohs (tvb
, offset
);
994 dissect_clssvc_flags (cmnsvc_tree
, tvb
, offset
, flag
, opcode
);
996 flag
= tvb_get_ntohs (tvb
, offset
+2);
997 dissect_initctl_flags (cmnsvc_tree
, tvb
, offset
+2, flag
, opcode
);
999 flag
= tvb_get_ntohs (tvb
, offset
+4);
1000 dissect_rcptctl_flags (cmnsvc_tree
, tvb
, offset
+4, flag
, opcode
);
1002 proto_tree_add_item (cmnsvc_tree
, hf_fcels_clsrcvsize
, tvb
,
1003 offset
+6, 2, ENC_BIG_ENDIAN
);
1004 proto_tree_add_item (cmnsvc_tree
, hf_fcels_conseq
, tvb
,
1005 offset
+8, 2, ENC_BIG_ENDIAN
);
1006 proto_tree_add_item (cmnsvc_tree
, hf_fcels_e2e
, tvb
,
1007 offset
+10, 2, ENC_BIG_ENDIAN
);
1008 proto_tree_add_item (cmnsvc_tree
, hf_fcels_openseq
, tvb
,
1009 offset
+12, 2, ENC_BIG_ENDIAN
);
1013 proto_tree_add_item (logi_tree
, hf_fcels_vendorvers
, tvb
, offset
, 16, ENC_NA
);
1015 proto_tree_add_item (logi_tree
, hf_fcels_svcavail
, tvb
, offset
+32, 8, ENC_NA
);
1021 dissect_fcels_plogi (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1022 uint8_t isreq _U_
, proto_item
*ti
)
1024 dissect_fcels_logi (tvb
, pinfo
, tree
, ti
, FC_ELS_PLOGI
);
1028 dissect_fcels_flogi (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1029 uint8_t isreq _U_
, proto_item
*ti
)
1031 dissect_fcels_logi (tvb
, pinfo
, tree
, ti
, FC_ELS_FLOGI
);
1035 dissect_fcels_logout (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1036 uint8_t isreq
, proto_item
*ti
)
1038 /* Set up structures needed to add the protocol subtree and manage it */
1039 int offset
= 5; /* bypass opcode+rsvd field */
1040 proto_tree
*logo_tree
;
1043 logo_tree
= proto_item_add_subtree (ti
, ett_fcels_logo
);
1045 proto_tree_add_item (logo_tree
, hf_fcels_opcode
, tvb
, offset
-5, 1, ENC_BIG_ENDIAN
);
1048 /* Accept has no payload */
1052 proto_tree_add_item (logo_tree
, hf_fcels_nportid
, tvb
, offset
, 3, ENC_NA
);
1053 proto_tree_add_item (logo_tree
, hf_fcels_npname
, tvb
, offset
+3, 8, ENC_NA
);
1058 dissect_fcels_abtx (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1059 uint8_t isreq
, proto_item
*ti
)
1061 /* Set up structures needed to add the protocol subtree and manage it */
1063 proto_tree
*abtx_tree
;
1066 abtx_tree
= proto_item_add_subtree (ti
, ett_fcels_abtx
);
1068 proto_tree_add_item (abtx_tree
, hf_fcels_opcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1074 proto_tree_add_item(abtx_tree
, hf_fcels_recovery_qualifier_status
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1075 proto_tree_add_item (abtx_tree
, hf_fcels_nportid
, tvb
, offset
+5, 3, ENC_NA
);
1076 proto_tree_add_item (abtx_tree
, hf_fcels_oxid
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
1077 proto_tree_add_item (abtx_tree
, hf_fcels_rxid
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
1082 dissect_fcels_rsi (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1083 uint8_t isreq
, proto_item
*ti
)
1085 /* Set up structures needed to add the protocol subtree and manage it */
1087 proto_tree
*rsi_tree
;
1090 rsi_tree
= proto_item_add_subtree (ti
, ett_fcels_rsi
);
1092 proto_tree_add_item (rsi_tree
, hf_fcels_opcode
, tvb
, offset
-4, 1, ENC_BIG_ENDIAN
);
1096 proto_tree_add_item (rsi_tree
, hf_fcels_recovqual
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1097 proto_tree_add_item (rsi_tree
, hf_fcels_nportid
, tvb
, offset
+1, 3, ENC_NA
);
1098 proto_tree_add_item (rsi_tree
, hf_fcels_rxid
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
1099 proto_tree_add_item (rsi_tree
, hf_fcels_oxid
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
1104 dissect_fcels_rrq (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1105 uint8_t isreq
, proto_item
*ti
)
1107 /* Set up structures needed to add the protocol subtree and manage it */
1109 proto_tree
*rrq_tree
;
1112 rrq_tree
= proto_item_add_subtree (ti
, ett_fcels_rrq
);
1114 proto_tree_add_item (rrq_tree
, hf_fcels_opcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1118 proto_tree_add_item (rrq_tree
, hf_fcels_nportid
, tvb
, offset
+5, 3, ENC_NA
);
1119 proto_tree_add_item (rrq_tree
, hf_fcels_oxid
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
1120 proto_tree_add_item (rrq_tree
, hf_fcels_rxid
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
1125 dissect_fcels_rec (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1126 uint8_t isreq
, proto_item
*ti
)
1128 /* Set up structures needed to add the protocol subtree and manage it */
1130 proto_tree
*rec_tree
;
1133 rec_tree
= proto_item_add_subtree (ti
, ett_fcels_rec
);
1135 proto_tree_add_item (rec_tree
, hf_fcels_opcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1138 proto_tree_add_item (rec_tree
, hf_fcels_nportid
, tvb
,
1139 offset
+5, 3, ENC_NA
);
1140 proto_tree_add_item (rec_tree
, hf_fcels_oxid
, tvb
,
1141 offset
+8, 2, ENC_BIG_ENDIAN
);
1142 proto_tree_add_item (rec_tree
, hf_fcels_rxid
, tvb
,
1143 offset
+10, 2, ENC_BIG_ENDIAN
);
1145 proto_tree_add_item (rec_tree
, hf_fcels_oxid
, tvb
,
1146 offset
+4, 2, ENC_BIG_ENDIAN
);
1147 proto_tree_add_item (rec_tree
, hf_fcels_rxid
, tvb
,
1148 offset
+6, 2, ENC_BIG_ENDIAN
);
1149 proto_tree_add_item (rec_tree
, hf_fcels_nportid
, tvb
,
1150 offset
+9, 3, ENC_NA
);
1151 proto_tree_add_item (rec_tree
, hf_fcels_resportid
, tvb
,
1152 offset
+13, 3, ENC_NA
);
1153 proto_tree_add_item (rec_tree
, hf_fcels_rec_fc4
, tvb
,
1154 offset
+16, 4, ENC_BIG_ENDIAN
);
1155 proto_tree_add_bitmask (rec_tree
, tvb
, offset
+20, hf_fcels_estat
,
1156 ett_fcels_estat
, hf_fcels_estat_fields
,
1163 dissect_fcels_pdisc (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1164 uint8_t isreq _U_
, proto_item
*ti
)
1166 dissect_fcels_logi (tvb
, pinfo
, tree
, ti
, FC_ELS_PDISC
);
1170 dissect_fcels_fdisc (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1171 uint8_t isreq _U_
, proto_item
*ti
)
1173 dissect_fcels_logi (tvb
, pinfo
, tree
, ti
, FC_ELS_FDISC
);
1177 dissect_fcels_adisc (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1178 uint8_t isreq _U_
, proto_item
*ti
)
1180 /* Set up structures needed to add the protocol subtree and manage it */
1182 proto_tree
*adisc_tree
;
1185 adisc_tree
= proto_item_add_subtree (ti
, ett_fcels_adisc
);
1187 proto_tree_add_item (adisc_tree
, hf_fcels_opcode
, tvb
, offset
-5, 1, ENC_BIG_ENDIAN
);
1189 proto_tree_add_item (adisc_tree
, hf_fcels_hardaddr
, tvb
, offset
, 3, ENC_NA
);
1190 proto_tree_add_item (adisc_tree
, hf_fcels_npname
, tvb
, offset
+3, 8, ENC_NA
);
1191 proto_tree_add_item (adisc_tree
, hf_fcels_fnname
, tvb
, offset
+11, 8, ENC_NA
);
1192 proto_tree_add_item (adisc_tree
, hf_fcels_nportid
, tvb
, offset
+20, 3, ENC_NA
);
1198 dissect_fcels_farp (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1202 proto_tree
*farp_tree
;
1205 farp_tree
= proto_item_add_subtree (ti
, ett_fcels_farp
);
1207 proto_tree_add_item (farp_tree
, hf_fcels_opcode
, tvb
, offset
-4, 1, ENC_BIG_ENDIAN
);
1209 proto_tree_add_item (farp_tree
, hf_fcels_farp_matchcodept
,
1210 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1211 proto_tree_add_item (farp_tree
, hf_fcels_nportid
, tvb
, offset
+1,
1213 proto_tree_add_item (farp_tree
, hf_fcels_farp_respaction
, tvb
,
1214 offset
+4, 1, ENC_BIG_ENDIAN
);
1215 proto_tree_add_item (farp_tree
, hf_fcels_resportid
, tvb
, offset
+5,
1217 proto_tree_add_item (farp_tree
, hf_fcels_npname
, tvb
, offset
+8, 8, ENC_NA
);
1218 proto_tree_add_item (farp_tree
, hf_fcels_fnname
, tvb
, offset
+16, 8, ENC_NA
);
1219 proto_tree_add_item (farp_tree
, hf_fcels_respname
, tvb
, offset
+24,
1221 proto_tree_add_item (farp_tree
, hf_fcels_respnname
, tvb
, offset
+32,
1223 proto_tree_add_item (farp_tree
, hf_fcels_reqipaddr
, tvb
, offset
+40,
1225 proto_tree_add_item (farp_tree
, hf_fcels_respipaddr
, tvb
, offset
+56,
1231 dissect_fcels_farp_req (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1232 uint8_t isreq _U_
, proto_item
*ti
)
1234 dissect_fcels_farp (tvb
, pinfo
, tree
, ti
);
1238 dissect_fcels_farp_rply (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1239 uint8_t isreq _U_
, proto_item
*ti
)
1241 dissect_fcels_farp (tvb
, pinfo
, tree
, ti
);
1245 dissect_fcels_rps (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1246 uint8_t isreq
, proto_item
*ti
)
1248 /* Set up structures needed to add the protocol subtree and manage it */
1251 proto_tree
*rps_tree
;
1253 flag
= tvb_get_uint8 (tvb
, offset
);
1256 rps_tree
= proto_item_add_subtree (ti
, ett_fcels_rps
);
1259 proto_tree_add_item (rps_tree
, hf_fcels_rps_flag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1261 proto_tree_add_item (rps_tree
, hf_fcels_opcode
, tvb
, offset
-3, 1, ENC_BIG_ENDIAN
);
1264 proto_tree_add_item (rps_tree
, hf_fcels_npname
, tvb
, offset
+1, 8, ENC_NA
);
1266 else if (flag
& 0x1) {
1267 proto_tree_add_item (rps_tree
, hf_fcels_rps_portnum
, tvb
,
1268 offset
+5, 3, ENC_BIG_ENDIAN
);
1272 proto_tree_add_item (rps_tree
, hf_fcels_rps_flag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1273 proto_tree_add_item (rps_tree
, hf_fcels_rps_portstatus
, tvb
,
1274 offset
+3, 2, ENC_BIG_ENDIAN
);
1275 /* Next 6 fields are from Link Error Status Block (LESB) */
1276 proto_tree_add_item(rps_tree
, hf_fcels_link_failure_count
, tvb
, offset
+5, 4, ENC_BIG_ENDIAN
);
1277 proto_tree_add_item(rps_tree
, hf_fcels_loss_of_sync_count
, tvb
, offset
+9, 4, ENC_BIG_ENDIAN
);
1278 proto_tree_add_item(rps_tree
, hf_fcels_loss_of_signal_count
, tvb
, offset
+13, 4, ENC_BIG_ENDIAN
);
1279 proto_tree_add_item(rps_tree
, hf_fcels_primitive_seq_protocol_err
, tvb
, offset
+17, 4, ENC_BIG_ENDIAN
);
1280 proto_tree_add_item(rps_tree
, hf_fcels_invalid_xmission_word
, tvb
, offset
+21, 4, ENC_BIG_ENDIAN
);
1281 proto_tree_add_item(rps_tree
, hf_fcels_invalid_crc_count
, tvb
, offset
+25, 4, ENC_BIG_ENDIAN
);
1283 /* Next 6 fields are from L_Port Extension field */
1284 proto_tree_add_item(rps_tree
, hf_fcels_l_port_status
, tvb
, offset
+31, 2, ENC_BIG_ENDIAN
);
1285 proto_tree_add_item(rps_tree
, hf_fcels_lip_al_ps
, tvb
, offset
+36, 1, ENC_BIG_ENDIAN
);
1286 proto_tree_add_item(rps_tree
, hf_fcels_lip_f7_initiated_count
, tvb
, offset
+37, 4, ENC_BIG_ENDIAN
);
1287 proto_tree_add_item(rps_tree
, hf_fcels_lip_f7_received_count
, tvb
, offset
+41, 4, ENC_BIG_ENDIAN
);
1288 proto_tree_add_item(rps_tree
, hf_fcels_lip_f8_initiated_count
, tvb
, offset
+45, 4, ENC_BIG_ENDIAN
);
1289 proto_tree_add_item(rps_tree
, hf_fcels_lip_f8_received_count
, tvb
, offset
+49, 4, ENC_BIG_ENDIAN
);
1290 proto_tree_add_item(rps_tree
, hf_fcels_lip_reset_initiated_count
, tvb
, offset
+53, 4, ENC_BIG_ENDIAN
);
1291 proto_tree_add_item(rps_tree
, hf_fcels_lip_reset_received_count
, tvb
, offset
+57, 4, ENC_BIG_ENDIAN
);
1298 dissect_fcels_rpl (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1299 uint8_t isreq
, proto_item
*ti
)
1301 /* Set up structures needed to add the protocol subtree and manage it */
1303 proto_tree
*rpl_tree
, *pb_tree
;
1307 rpl_tree
= proto_item_add_subtree (ti
, ett_fcels_rpl
);
1309 proto_tree_add_item (rpl_tree
, hf_fcels_opcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1312 proto_tree_add_item(rpl_tree
, hf_fcels_rpl_max_size
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
1313 proto_tree_add_item(rpl_tree
, hf_fcels_rpl_index
, tvb
, offset
+9, 3, ENC_BIG_ENDIAN
);
1316 /* Reply consists of a header and a number of port blocks */
1317 proto_tree_add_item(rpl_tree
, hf_fcels_rpl_payload_length
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
1318 proto_tree_add_item(rpl_tree
, hf_fcels_rpl_list_length
, tvb
, offset
+5, 3, ENC_BIG_ENDIAN
);
1319 proto_tree_add_item(rpl_tree
, hf_fcels_rpl_index_of_i_port_block
, tvb
, offset
+9, 3, ENC_BIG_ENDIAN
);
1321 /* The following loop is for dissecting the port blocks */
1322 for (loop
= tvb_get_ntoh24 (tvb
, 5); loop
> 0; loop
--) {
1323 pb_tree
= proto_tree_add_subtree_format(rpl_tree
, tvb
, offset
+12, 16,
1324 ett_fcels_rplpb
, NULL
, "Port Block %u", loop
);
1326 proto_tree_add_item(pb_tree
, hf_fcels_rpl_physical_port
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1327 proto_tree_add_item(pb_tree
, hf_fcels_rpl_port_identifier
, tvb
, offset
+5, 3, ENC_NA
);
1328 proto_tree_add_item(pb_tree
, hf_fcels_rpl_port_name
, tvb
, offset
+8, 8, ENC_NA
);
1336 dissect_fcels_fan (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1337 uint8_t isreq _U_
, proto_item
*ti
)
1339 /* Set up structures needed to add the protocol subtree and manage it */
1341 proto_tree
*fan_tree
;
1344 fan_tree
= proto_item_add_subtree (ti
, ett_fcels_fan
);
1346 proto_tree_add_item (fan_tree
, hf_fcels_opcode
, tvb
, offset
-5, 1, ENC_BIG_ENDIAN
);
1348 proto_tree_add_item (fan_tree
, hf_fcels_fabricaddr
, tvb
, offset
, 3, ENC_NA
);
1349 proto_tree_add_item (fan_tree
, hf_fcels_fabricpname
, tvb
, offset
+3,
1351 proto_tree_add_item (fan_tree
, hf_fcels_fnname
, tvb
, offset
+11, 8, ENC_NA
);
1356 dissect_fcels_rscn (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1357 uint8_t isreq
, proto_item
*ti
)
1359 /* Set up structures needed to add the protocol subtree and manage it */
1361 proto_tree
*rscn_tree
, *rectree
;
1362 int numrec
, plen
, i
;
1365 rscn_tree
= proto_item_add_subtree (ti
, ett_fcels_rscn
);
1367 proto_tree_add_item (rscn_tree
, hf_fcels_opcode
, tvb
, offset
-1, 1, ENC_BIG_ENDIAN
);
1371 proto_tree_add_item(rscn_tree
, hf_fcels_rscn_page_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1372 plen
= tvb_get_ntohs (tvb
, offset
+1);
1373 proto_tree_add_item(rscn_tree
, hf_fcels_rscn_payload_len
, tvb
, offset
+1, 2, ENC_BIG_ENDIAN
);
1374 numrec
= (plen
- 4)/4;
1377 for (i
= 0; i
< numrec
; i
++) {
1378 rectree
= proto_tree_add_subtree_format(rscn_tree
, tvb
, offset
, 4,
1379 ett_fcels_rscn_rec
, NULL
, "Affected N_Port Page %u", i
);
1381 proto_tree_add_item (rectree
, hf_fcels_rscn_evqual
, tvb
, offset
,
1383 proto_tree_add_item (rectree
, hf_fcels_rscn_addrfmt
, tvb
, offset
,
1385 proto_tree_add_item (rectree
, hf_fcels_rscn_domain
, tvb
, offset
+1,
1387 proto_tree_add_item (rectree
, hf_fcels_rscn_area
, tvb
, offset
+2,
1389 proto_tree_add_item (rectree
, hf_fcels_rscn_port
, tvb
, offset
+3,
1397 dissect_fcels_scr (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1398 uint8_t isreq
, proto_item
*ti
)
1400 /* Set up structures needed to add the protocol subtree and manage it */
1402 proto_tree
*scr_tree
;
1405 scr_tree
= proto_item_add_subtree (ti
, ett_fcels_scr
);
1406 proto_tree_add_item (scr_tree
, hf_fcels_opcode
, tvb
, offset
-7, 1, ENC_BIG_ENDIAN
);
1408 proto_tree_add_item (scr_tree
, hf_fcels_scrregn
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1413 dissect_fcels_rnft (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1414 uint8_t isreq
, proto_item
*ti
)
1418 proto_tree
*rnft_tree
, *fc4_tree
;
1421 rnft_tree
= proto_item_add_subtree (ti
, ett_fcels_rnft
);
1423 proto_tree_add_item (rnft_tree
, hf_fcels_opcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1426 proto_tree_add_item(rnft_tree
, hf_fcels_rnft_max_size
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
1427 proto_tree_add_item(rnft_tree
, hf_fcels_rnft_index
, tvb
, offset
+7, 1, ENC_BIG_ENDIAN
);
1430 proto_tree_add_item(rnft_tree
, hf_fcels_rnft_payload_len
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
1431 numrec
= tvb_get_uint8 (tvb
, offset
+5);
1432 proto_tree_add_item(rnft_tree
, hf_fcels_rnft_list_length
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
1433 proto_tree_add_item(rnft_tree
, hf_fcels_rnft_index_of_first_rec_in_list
, tvb
, offset
+7, 1, ENC_BIG_ENDIAN
);
1435 for (i
= 0; i
< numrec
; i
++) {
1436 fc4_tree
= proto_tree_add_subtree_format(rnft_tree
, tvb
, offset
, 4,
1437 ett_fcels_rnft_fc4
, NULL
, "FC-4 Entry #%u", i
);
1439 proto_tree_add_item (fc4_tree
, hf_fcels_rnft_fc4type
, tvb
,
1440 offset
, 1, ENC_BIG_ENDIAN
);
1441 proto_tree_add_item(fc4_tree
, hf_fcels_rnft_fc4_qualifier
, tvb
, offset
+1, 3, ENC_BIG_ENDIAN
);
1449 dissect_fcels_lsts (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1450 uint8_t isreq
, proto_item
*ti
)
1452 /* Set up structures needed to add the protocol subtree and manage it */
1454 proto_tree
*lsts_tree
;
1457 lsts_tree
= proto_item_add_subtree (ti
, ett_fcels_lsts
);
1459 proto_tree_add_item (lsts_tree
, hf_fcels_opcode
, tvb
, offset
-5, 1, ENC_BIG_ENDIAN
);
1461 /* In case of LSTS, the reply has the meat */
1464 proto_tree_add_item (lsts_tree
, hf_fcels_failedrcvr
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1465 proto_tree_add_item (lsts_tree
, hf_fcels_flacompliance
, tvb
, offset
+1,
1467 proto_tree_add_item (lsts_tree
, hf_fcels_loopstate
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
1468 proto_tree_add_item (lsts_tree
, hf_fcels_publicloop_bmap
, tvb
, offset
+3,
1470 proto_tree_add_item (lsts_tree
, hf_fcels_pvtloop_bmap
, tvb
, offset
+19,
1472 proto_tree_add_item (lsts_tree
, hf_fcels_alpa_map
, tvb
, offset
+35,
1477 /* Maximum length of possible string from, dissect_fcels_prlilo_payload
1478 * 119 bytes, FIX possible buffer overflow */
1479 #define FCELS_PRLILO_MAXSTRINGLEN 256
1482 dissect_fcels_prlilo_payload (tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
1483 uint8_t isreq
, proto_item
*ti
, uint8_t opcode
)
1487 proto_tree
*prli_tree
, *svcpg_tree
;
1488 int num_svcpg
, payload_len
, i
, flag
;
1490 /* We're assuming that we're invoked only if tree is not NULL i.e.
1491 * we don't do the usual "if (tree)" check here, the caller must.
1493 prli_tree
= proto_item_add_subtree (ti
, ett_fcels_prli
);
1495 proto_tree_add_item (prli_tree
, hf_fcels_opcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1497 proto_tree_add_item(prli_tree
, hf_fcels_prlilo_page_length
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
1498 payload_len
= tvb_get_ntohs (tvb
, offset
+2);
1499 proto_tree_add_item(prli_tree
, hf_fcels_prlilo_payload_length
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
1500 num_svcpg
= payload_len
/16;
1503 for (i
= 0; i
< num_svcpg
; i
++) {
1504 svcpg_tree
= proto_tree_add_subtree_format(prli_tree
, tvb
, offset
, 16,
1505 ett_fcels_prli_svcpg
, NULL
, "Service Parameter Page %u", i
);
1507 type
= tvb_get_uint8 (tvb
, offset
);
1508 proto_tree_add_item(svcpg_tree
, hf_fcels_prlilo_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1509 proto_tree_add_item(svcpg_tree
, hf_fcels_prlilo_type_code_extension
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
1511 flag
= tvb_get_uint8 (tvb
, offset
+2);
1512 dissect_prlilo_flags (svcpg_tree
, tvb
, offset
+2, flag
, opcode
);
1514 if (!isreq
&& (opcode
!= FC_ELS_TPRLO
)) {
1515 /* This is valid only for ACC */
1516 proto_tree_add_item(svcpg_tree
, hf_fcels_prlilo_response_code
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
1518 if (opcode
!= FC_ELS_TPRLO
) {
1519 proto_tree_add_item(svcpg_tree
, hf_fcels_prlilo_originator_pa
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1522 proto_tree_add_item(svcpg_tree
, hf_fcels_prlilo_3rd_party_originator_pa
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1524 proto_tree_add_item(svcpg_tree
, hf_fcels_prlilo_responder_pa
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
1526 if (type
== FC_TYPE_SCSI
) {
1527 flag
= tvb_get_ntohs (tvb
, offset
+14);
1528 dissect_fcp_flags (svcpg_tree
, tvb
, offset
+12, flag
, isreq
);
1530 else if ((opcode
== FC_ELS_PRLI
) && !isreq
) {
1531 proto_tree_add_item(svcpg_tree
, hf_fcels_prlilo_service_parameter_response
, tvb
, offset
+12, 4, ENC_BIG_ENDIAN
);
1533 else if (opcode
== FC_ELS_TPRLO
) {
1534 proto_tree_add_item(svcpg_tree
, hf_fcels_prlilo_3rd_party_n_port_id
, tvb
, offset
+13, 3, ENC_NA
);
1540 dissect_fcels_prli (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1541 uint8_t isreq
, proto_item
*ti
)
1544 dissect_fcels_prlilo_payload (tvb
, pinfo
, isreq
, ti
, FC_ELS_PRLI
);
1549 dissect_fcels_prlo (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1550 uint8_t isreq
, proto_item
*ti
)
1552 /* Set up structures needed to add the protocol subtree and manage it */
1554 dissect_fcels_prlilo_payload (tvb
, pinfo
, isreq
, ti
, FC_ELS_PRLO
);
1559 dissect_fcels_tprlo (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1560 uint8_t isreq
, proto_item
*ti
)
1562 /* Set up structures needed to add the protocol subtree and manage it */
1565 dissect_fcels_prlilo_payload (tvb
, pinfo
, isreq
, ti
, FC_ELS_TPRLO
);
1570 dissect_fcels_lirr (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1571 uint8_t isreq _U_
, proto_item
*ti
)
1573 /* Set up structures needed to add the protocol subtree and manage it */
1575 proto_tree
*lirr_tree
;
1579 lirr_tree
= proto_item_add_subtree (ti
, ett_fcels_lirr
);
1581 proto_tree_add_item (lirr_tree
, hf_fcels_opcode
, tvb
, offset
-4, 1, ENC_BIG_ENDIAN
);
1583 proto_tree_add_item(lirr_tree
, hf_fcels_lirr_regn_function
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1584 lirr_fmt
= tvb_get_uint8 (tvb
, offset
+1);
1586 /* This scheme is resorted to because the value 0 has a string in
1587 * the value_string that is not what we want displayed here.
1589 proto_tree_add_uint_format_value(lirr_tree
, hf_fcels_lirr_regn_format
, tvb
, offset
, 1, 0, "Common Format");
1592 proto_tree_add_item(lirr_tree
, hf_fcels_lirr_regn_format
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1597 static const true_false_string tfs_srl_flag
= { "Scan only specified FL Port", "Scan all loops in domain" };
1600 dissect_fcels_srl (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1601 uint8_t isreq
, proto_item
*ti
)
1603 /* Set up structures needed to add the protocol subtree and manage it */
1605 proto_tree
*srl_tree
;
1608 srl_tree
= proto_item_add_subtree (ti
, ett_fcels_srl
);
1610 proto_tree_add_item (srl_tree
, hf_fcels_opcode
, tvb
, offset
-4, 1, ENC_BIG_ENDIAN
);
1614 proto_tree_add_item(srl_tree
, hf_fcels_srl_flag
, tvb
, offset
, 1, ENC_NA
);
1615 proto_tree_add_item(srl_tree
, hf_fcels_srl_fl_port_addr
, tvb
, offset
+1, 3, ENC_NA
);
1620 dissect_fcels_rpsc (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1621 uint8_t isreq
, proto_item
*ti
)
1623 /* Set up structures needed to add the protocol subtree and manage it */
1625 int num_entries
, i
, cap
;
1626 proto_tree
*rpsc_tree
;
1629 rpsc_tree
= proto_item_add_subtree (ti
, ett_fcels_rpsc
);
1631 proto_tree_add_item (rpsc_tree
, hf_fcels_opcode
, tvb
, offset
-2, 1, ENC_BIG_ENDIAN
);
1635 num_entries
= tvb_get_ntohs (tvb
, offset
);
1636 proto_tree_add_item(rpsc_tree
, hf_fcels_rpsc_number_of_entries
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1638 for (i
= 0; i
< num_entries
; i
++, offset
+=4) {
1639 cap
= tvb_get_ntohs (tvb
, offset
);
1640 dissect_speed_flags (rpsc_tree
, tvb
, offset
, cap
, i
);
1642 proto_tree_add_item(rpsc_tree
, hf_fcels_rpsc_port_oper_speed
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
1649 dissect_fcels_cbind (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1653 proto_tree
*cbind_tree
=NULL
;
1656 cbind_tree
= proto_item_add_subtree (ti
, ett_fcels_cbind
);
1658 proto_tree_add_item (cbind_tree
, hf_fcels_opcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1660 col_set_str(pinfo
->cinfo
, COL_INFO
, "CBIND ");
1662 proto_tree_add_item (cbind_tree
, hf_fcels_cbind_liveness
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
1663 proto_tree_add_item (cbind_tree
, hf_fcels_cbind_addr_mode
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
1664 proto_tree_add_item (cbind_tree
, hf_fcels_cbind_ifcp_version
, tvb
, offset
+7, 1, ENC_BIG_ENDIAN
);
1665 proto_tree_add_item (cbind_tree
, hf_fcels_cbind_userinfo
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
1667 proto_tree_add_item (cbind_tree
, hf_fcels_cbind_snpname
, tvb
, offset
+12, 8, ENC_NA
);
1668 proto_tree_add_item (cbind_tree
, hf_fcels_cbind_dnpname
, tvb
, offset
+20, 8, ENC_NA
);
1670 switch(tvb_reported_length(tvb
)){
1671 case 32: /* 28 byte Request + 4 bytes FC CRC */
1672 col_append_str (pinfo
->cinfo
, COL_INFO
, "Request");
1674 case 40: /* 36 byte Response + 4 bytes FC CRC */
1675 col_append_str (pinfo
->cinfo
, COL_INFO
, "Response");
1676 proto_tree_add_item (cbind_tree
, hf_fcels_cbind_status
, tvb
, offset
+30, 2, ENC_BIG_ENDIAN
);
1677 proto_tree_add_item (cbind_tree
, hf_fcels_chandle
, tvb
, offset
+34, 2, ENC_BIG_ENDIAN
);
1684 dissect_fcels_unbind (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1688 proto_tree
*cbind_tree
=NULL
;
1691 cbind_tree
= proto_item_add_subtree (ti
, ett_fcels_cbind
);
1693 proto_tree_add_item (cbind_tree
, hf_fcels_opcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1695 col_set_str(pinfo
->cinfo
, COL_INFO
, "UNBIND ");
1697 proto_tree_add_item (cbind_tree
, hf_fcels_cbind_userinfo
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1698 proto_tree_add_item (cbind_tree
, hf_fcels_chandle
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
1701 switch(tvb_reported_length(tvb
)){
1702 case 24: /* 20 byte Request + 4 bytes FC CRC */
1703 col_append_str (pinfo
->cinfo
, COL_INFO
, "Request");
1705 case 28: /* 24 byte Response + 4 bytes FC CRC */
1706 col_append_str (pinfo
->cinfo
, COL_INFO
, "Response");
1707 proto_tree_add_item (cbind_tree
, hf_fcels_unbind_status
, tvb
, offset
+22, 2, ENC_BIG_ENDIAN
);
1714 dissect_fcels_rnid (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1715 uint8_t isreq
, proto_item
*ti
)
1717 /* Set up structures needed to add the protocol subtree and manage it */
1720 proto_tree
*rnid_tree
;
1723 rnid_tree
= proto_item_add_subtree (ti
, ett_fcels_rnid
);
1725 proto_tree_add_item (rnid_tree
, hf_fcels_opcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1727 proto_tree_add_item (rnid_tree
, hf_fcels_nodeidfmt
, tvb
, offset
+4,
1731 /* We only decode responses to nodeid fmt DF */
1732 proto_tree_add_item (rnid_tree
, hf_fcels_nodeidfmt
, tvb
, offset
+4,
1734 clen
= tvb_get_uint8 (tvb
, offset
+5);
1735 proto_tree_add_item(rnid_tree
, hf_fcels_common_identification_data_length
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
1736 proto_tree_add_item (rnid_tree
, hf_fcels_spidlen
, tvb
, offset
+7,
1739 proto_tree_add_item (rnid_tree
, hf_fcels_npname
, tvb
,
1740 offset
+8, 8, ENC_NA
);
1741 proto_tree_add_item (rnid_tree
, hf_fcels_fnname
, tvb
,
1742 offset
+16, 8, ENC_NA
);
1744 if (tvb_get_uint8 (tvb
, offset
+4) == 0xDF) {
1745 /* Decode the Specific Node ID Format as this is known */
1746 proto_tree_add_item (rnid_tree
, hf_fcels_vendoruniq
, tvb
,
1747 offset
+24, 16, ENC_NA
);
1748 proto_tree_add_item (rnid_tree
, hf_fcels_asstype
, tvb
,
1749 offset
+40, 4, ENC_BIG_ENDIAN
);
1750 proto_tree_add_item (rnid_tree
, hf_fcels_physport
, tvb
,
1751 offset
+44, 4, ENC_BIG_ENDIAN
);
1752 proto_tree_add_item (rnid_tree
, hf_fcels_attnodes
, tvb
,
1753 offset
+48, 4, ENC_BIG_ENDIAN
);
1754 proto_tree_add_item (rnid_tree
, hf_fcels_nodemgmt
, tvb
,
1755 offset
+52, 1, ENC_BIG_ENDIAN
);
1756 proto_tree_add_item (rnid_tree
, hf_fcels_ipvers
, tvb
,
1757 offset
+53, 1, ENC_BIG_ENDIAN
);
1758 proto_tree_add_item (rnid_tree
, hf_fcels_tcpport
, tvb
,
1759 offset
+54, 2, ENC_BIG_ENDIAN
);
1760 proto_tree_add_item (rnid_tree
, hf_fcels_ip
, tvb
, offset
+56,
1762 proto_tree_add_item (rnid_tree
, hf_fcels_vendorsp
, tvb
,
1763 offset
+74, 2, ENC_BIG_ENDIAN
);
1770 dissect_fcels_rlir (tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
,
1771 proto_tree
*tree
, uint8_t isreq _U_
,
1774 /* Set up structures needed to add the protocol subtree and manage it */
1781 dissect_fcels_lsrjt (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1782 uint8_t isreq _U_
, proto_item
*ti
)
1784 /* Set up structures needed to add the protocol subtree and manage it */
1786 proto_tree
*lsrjt_tree
;
1789 lsrjt_tree
= proto_item_add_subtree (ti
, ett_fcels_lsrjt
);
1791 proto_tree_add_item (lsrjt_tree
, hf_fcels_opcode
, tvb
, offset
-5, 1, ENC_BIG_ENDIAN
);
1793 proto_tree_add_item (lsrjt_tree
, hf_fcels_rjtcode
, tvb
, offset
++, 1, ENC_BIG_ENDIAN
);
1794 proto_tree_add_item (lsrjt_tree
, hf_fcels_rjtdetcode
, tvb
, offset
++, 1, ENC_BIG_ENDIAN
);
1795 proto_tree_add_item (lsrjt_tree
, hf_fcels_vnduniq
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1800 dissect_fcels (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1803 /* Set up structures needed to add the protocol subtree and manage it */
1804 proto_item
*ti
= NULL
;
1805 proto_tree
*acc_tree
;
1806 uint8_t isreq
= FC_ELS_REQ
;
1810 conversation_t
*conversation
;
1811 fcels_conv_data_t
*cdata
;
1812 fcels_conv_key_t ckey
, *req_key
;
1813 unsigned find_options
, new_options
;
1815 uint8_t addrdata
[3];
1818 /* Reject the packet if data is NULL */
1821 fchdr
= (fc_hdr
*)data
;
1823 /* Make entries in Protocol column and Info column on summary display */
1824 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "FC ELS");
1825 /* col_clear(pinfo->cinfo, COL_INFO); XXX: It seems to me that COL_INFO should be cleared here ?? */
1827 /* decoding of this is done by each individual opcode handler */
1828 opcode
= tvb_get_uint8 (tvb
, 0);
1831 ti
= proto_tree_add_protocol_format (tree
, proto_fcels
, tvb
, 0,
1835 /* Register conversation in case this is not a response */
1836 if ((opcode
!= FC_ELS_LSRJT
) && (opcode
!= FC_ELS_ACC
)) {
1837 if (opcode
== FC_ELS_FLOGI
) {
1838 const uint8_t *srcfc
;
1840 /* Check that the source address is, in fact, an FC address */
1841 if (pinfo
->src
.type
!= AT_FC
) {
1842 expert_add_info_format(pinfo
, ti
, &ei_fcels_src_unknown
,
1843 "Unknown source address type: %u",
1848 srcfc
= (const uint8_t *)pinfo
->src
.data
;
1850 /* If it is a loop port, we'll need to remember the ALPA */
1851 find_options
= NO_PORT_B
;
1852 new_options
= NO_PORT2
;
1855 find_options
= NO_PORT_B
| NO_ADDR_B
;
1856 new_options
= NO_PORT2
| NO_ADDR2
;
1860 find_options
= NO_PORT_B
;
1861 new_options
= NO_PORT2
;
1863 conversation
= find_conversation (pinfo
->num
, &pinfo
->dst
, &pinfo
->src
,
1864 conversation_pt_to_conversation_type(pinfo
->ptype
), fchdr
->oxid
,
1865 fchdr
->rxid
, find_options
);
1867 if (!conversation
) {
1868 conversation
= conversation_new (pinfo
->num
, &pinfo
->dst
, &pinfo
->src
,
1869 conversation_pt_to_conversation_type(pinfo
->ptype
), fchdr
->oxid
,
1870 fchdr
->rxid
, new_options
);
1873 ckey
.conv_idx
= conversation
->conv_index
;
1875 cdata
= (fcels_conv_data_t
*)wmem_map_lookup (fcels_req_hash
,
1878 /* Since we never free the memory used by an exchange, this maybe a
1879 * case of another request using the same exchange as a previous
1882 cdata
->opcode
= opcode
;
1885 req_key
= wmem_new(wmem_file_scope(), fcels_conv_key_t
);
1886 req_key
->conv_idx
= conversation
->conv_index
;
1888 cdata
= wmem_new(wmem_file_scope(), fcels_conv_data_t
);
1889 cdata
->opcode
= opcode
;
1891 wmem_map_insert (fcels_req_hash
, req_key
, cdata
);
1895 isreq
= FC_ELS_RPLY
;
1897 find_options
= NO_PORT_B
;
1898 conversation
= find_conversation (pinfo
->num
, &pinfo
->dst
, &pinfo
->src
,
1899 conversation_pt_to_conversation_type(pinfo
->ptype
), fchdr
->oxid
,
1900 fchdr
->rxid
, find_options
);
1901 if (!conversation
) {
1902 /* FLOGI has two ways to save state: without the src and using just
1903 * the port (ALPA) part of the address. Try both.
1905 const uint8_t *dstfc
;
1907 /* Check that the source address is, in fact, an FC address */
1908 if (pinfo
->dst
.type
!= AT_FC
) {
1909 expert_add_info_format(pinfo
, ti
, &ei_fcels_dst_unknown
,
1910 "Unknown destination address type: %u",
1915 dstfc
= (const uint8_t *)pinfo
->dst
.data
;
1917 addrdata
[0] = addrdata
[1] = 0;
1918 addrdata
[2] = dstfc
[2];
1919 set_address (&dstaddr
, AT_FC
, 3, addrdata
);
1920 conversation
= find_conversation (pinfo
->num
, &dstaddr
, &pinfo
->src
,
1921 conversation_pt_to_conversation_type(pinfo
->ptype
), fchdr
->oxid
,
1922 fchdr
->rxid
, find_options
);
1925 if (!conversation
) {
1926 /* Finally check for FLOGI with both NO_PORT2 and NO_ADDR2 set */
1927 find_options
= NO_ADDR_B
| NO_PORT_B
;
1928 conversation
= find_conversation (pinfo
->num
, &pinfo
->src
, &pinfo
->dst
,
1929 conversation_pt_to_conversation_type(pinfo
->ptype
), fchdr
->oxid
,
1930 fchdr
->rxid
, find_options
);
1931 if (!conversation
) {
1932 if (tree
&& (opcode
== FC_ELS_ACC
)) {
1933 /* No record of what this accept is for. Can't decode */
1934 acc_tree
= proto_item_add_subtree (ti
, ett_fcels_acc
);
1935 proto_tree_add_expert(acc_tree
, pinfo
, &ei_fcels_no_record_of_exchange
, tvb
, offset
, -1);
1943 ckey
.conv_idx
= conversation
->conv_index
;
1945 cdata
= (fcels_conv_data_t
*)wmem_map_lookup (fcels_req_hash
, &ckey
);
1947 if (cdata
!= NULL
) {
1948 if ((find_options
& NO_ADDR_B
) && (cdata
->opcode
!= FC_ELS_FLOGI
)) {
1949 /* only FLOGI can have this special check */
1950 if (tree
&& (opcode
== FC_ELS_ACC
)) {
1951 /* No record of what this accept is for. Can't decode */
1952 acc_tree
= proto_item_add_subtree (ti
,
1954 proto_tree_add_expert(acc_tree
, pinfo
, &ei_fcels_no_record_of_exchange
, tvb
, offset
, -1);
1958 if (opcode
== FC_ELS_ACC
)
1959 opcode
= cdata
->opcode
;
1961 failed_opcode
= cdata
->opcode
;
1965 if ((cdata
== NULL
) && (opcode
!= FC_ELS_LSRJT
)) {
1966 /* No record of what this accept is for. Can't decode */
1967 acc_tree
= proto_item_add_subtree (ti
, ett_fcels_acc
);
1968 proto_tree_add_expert(acc_tree
, pinfo
, &ei_fcels_no_record_of_els_req
, tvb
, offset
, -1);
1975 if (isreq
== FC_ELS_REQ
) {
1976 col_add_str (pinfo
->cinfo
, COL_INFO
,
1977 val_to_str_ext (opcode
, &fc_els_proto_val_ext
, "0x%x"));
1979 else if (opcode
== FC_ELS_LSRJT
) {
1980 col_add_fstr (pinfo
->cinfo
, COL_INFO
, "LS_RJT (%s)",
1981 val_to_str_ext (failed_opcode
, &fc_els_proto_val_ext
, "0x%x"));
1984 col_add_fstr (pinfo
->cinfo
, COL_INFO
, "ACC (%s)",
1985 val_to_str_ext (opcode
, &fc_els_proto_val_ext
, "0x%x"));
1990 dissect_fcels_lsrjt (tvb
, pinfo
, tree
, isreq
, ti
);
1993 dissect_fcels_plogi (tvb
, pinfo
, tree
, isreq
, ti
);
1996 dissect_fcels_flogi (tvb
, pinfo
, tree
, isreq
, ti
);
1999 dissect_fcels_logout (tvb
, pinfo
, tree
, isreq
, ti
);
2002 dissect_fcels_abtx (tvb
, pinfo
, tree
, isreq
, ti
);
2005 dissect_fcels_rsi (tvb
, pinfo
, tree
, isreq
, ti
);
2008 dissect_fcels_rrq (tvb
, pinfo
, tree
, isreq
, ti
);
2011 dissect_fcels_rec (tvb
, pinfo
, tree
, isreq
, ti
);
2014 dissect_fcels_prli (tvb
, pinfo
, tree
, isreq
, ti
);
2017 dissect_fcels_prlo (tvb
, pinfo
, tree
, isreq
, ti
);
2020 dissect_fcels_tprlo (tvb
, pinfo
, tree
, isreq
, ti
);
2023 dissect_fcels_pdisc (tvb
, pinfo
, tree
, isreq
, ti
);
2026 dissect_fcels_fdisc (tvb
, pinfo
, tree
, isreq
, ti
);
2029 dissect_fcels_adisc (tvb
, pinfo
, tree
, isreq
, ti
);
2031 case FC_ELS_FARP_REQ
:
2032 dissect_fcels_farp_req (tvb
, pinfo
, tree
, isreq
, ti
);
2034 case FC_ELS_FARP_RPLY
:
2035 dissect_fcels_farp_rply (tvb
, pinfo
, tree
, isreq
, ti
);
2038 dissect_fcels_rps (tvb
, pinfo
, tree
, isreq
, ti
);
2041 dissect_fcels_rpl (tvb
, pinfo
, tree
, isreq
, ti
);
2044 dissect_fcels_fan (tvb
, pinfo
, tree
, isreq
, ti
);
2047 dissect_fcels_rscn (tvb
, pinfo
, tree
, isreq
, ti
);
2050 dissect_fcels_scr (tvb
, pinfo
, tree
, isreq
, ti
);
2053 dissect_fcels_rnft (tvb
, pinfo
, tree
, isreq
, ti
);
2056 dissect_fcels_lsts (tvb
, pinfo
, tree
, isreq
, ti
);
2059 dissect_fcels_rnid (tvb
, pinfo
, tree
, isreq
, ti
);
2062 dissect_fcels_rlir (tvb
, pinfo
, tree
, isreq
, ti
);
2065 dissect_fcels_lirr (tvb
, pinfo
, tree
, isreq
, ti
);
2068 dissect_fcels_srl (tvb
, pinfo
, tree
, isreq
, ti
);
2071 dissect_fcels_rpsc (tvb
, pinfo
, tree
, isreq
, ti
);
2074 if (isreq
&& fcsp_handle
)
2075 call_dissector (fcsp_handle
, tvb
, pinfo
, tree
);
2078 dissect_fcels_cbind (tvb
, pinfo
, tree
, ti
);
2081 dissect_fcels_unbind (tvb
, pinfo
, tree
, ti
);
2084 call_data_dissector(tvb
, pinfo
, tree
);
2088 return tvb_reported_length(tvb
);
2092 proto_register_fcels (void)
2094 static hf_register_info hf
[] = {
2096 {"Cmd Code", "fcels.opcode", FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
,
2097 &fc_els_proto_val_ext
, 0x0, NULL
, HFILL
}},
2098 { &hf_fcels_rjtcode
,
2099 {"Reason Code", "fcels.rjt.reason", FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
,
2100 &fc_els_rjt_val_ext
, 0x0, NULL
, HFILL
}},
2101 { &hf_fcels_rjtdetcode
,
2102 {"Reason Explanation", "fcels.rjt.detail", FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
,
2103 &fc_els_rjt_det_val_ext
, 0x0, NULL
, HFILL
}},
2104 { &hf_fcels_vnduniq
,
2105 {"Vendor Unique", "fcels.rjt.vnduniq", FT_UINT8
, BASE_HEX
, NULL
,
2108 {"B2B Credit", "fcels.logi.b2b", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
,
2110 { &hf_fcels_cmnfeatures
,
2111 {"Common Svc Parameters", "fcels.logi.cmnfeatures", FT_UINT16
, BASE_HEX
, NULL
,
2113 { &hf_fcels_bbscnum
,
2114 {"BB_SC Number", "fcels.logi.bbscnum", FT_UINT8
, BASE_DEC
, NULL
, 0xF0, NULL
,
2116 { &hf_fcels_rcvsize
,
2117 {"Receive Size", "fcels.logi.rcvsize", FT_UINT16
, BASE_DEC
, NULL
, 0x0FFF, NULL
,
2119 { &hf_fcels_maxconseq
,
2120 {"Max Concurrent Seq", "fcels.logi.maxconseq", FT_UINT16
, BASE_DEC
, NULL
,
2122 { &hf_fcels_reloffset
,
2123 {"Relative Offset By Info Cat", "fcels.logi.reloff", FT_UINT16
, BASE_DEC
,
2124 NULL
, 0x0, NULL
, HFILL
}},
2126 {"E_D_TOV", "fcels.edtov", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2128 {"N_Port Port_Name", "fcels.npname", FT_FCWWN
, BASE_NONE
, NULL
, 0x0,
2131 {"Fabric/Node Name", "fcels.fnname", FT_FCWWN
, BASE_NONE
, NULL
, 0x0,
2134 { &hf_fcels_cls1param
,
2135 {"Class 1 Svc Param", "fcels.logi.cls1param", FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2137 { &hf_fcels_cls2param
,
2138 {"Class 2 Svc Param", "fcels.logi.cls2param", FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2140 { &hf_fcels_cls3param
,
2141 {"Class 3 Svc Param", "fcels.logi.cls3param", FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2143 { &hf_fcels_cls4param
,
2144 {"Class 4 Svc Param", "fcels.logi.cls4param", FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2147 { &hf_fcels_vendorvers
,
2148 {"Vendor Version", "fcels.logi.vendvers", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
,
2150 { &hf_fcels_svcavail
,
2151 {"Services Availability", "fcels.logi.svcavail", FT_BYTES
, BASE_NONE
, NULL
,
2153 { &hf_fcels_clsflags
,
2154 {"Service Options", "fcels.logi.clsflags", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
,
2156 { &hf_fcels_clsrcvsize
,
2157 {"Class Recv Size", "fcels.logi.clsrcvsize", FT_UINT16
, BASE_DEC
, NULL
,
2160 {"Total Concurrent Seq", "fcels.logi.totconseq", FT_UINT16
, BASE_DEC
, NULL
,
2163 {"End2End Credit", "fcels.logi.e2e", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
,
2165 { &hf_fcels_openseq
,
2166 {"Open Seq Per Exchg", "fcels.logi.openseq", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2168 { &hf_fcels_nportid
,
2169 {"Originator S_ID", "fcels.portid", FT_BYTES
, SEP_DOT
, NULL
, 0x0,
2172 {"OXID", "fcels.oxid", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2174 {"RXID", "fcels.rxid", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2175 { &hf_fcels_recovqual
,
2176 {"Recovery Qualifier", "fcels.rcovqual", FT_UINT8
, BASE_HEX
, NULL
,
2178 { &hf_fcels_fabricaddr
,
2179 {"Fabric Address", "fcels.faddr", FT_BYTES
, SEP_DOT
, NULL
, 0x0, NULL
,
2181 { &hf_fcels_fabricpname
,
2182 {"Fabric Port Name", "fcels.fpname", FT_FCWWN
, BASE_NONE
, NULL
, 0x0,
2184 { &hf_fcels_failedrcvr
,
2185 {"Failed Receiver AL_PA", "fcels.faildrcvr", FT_UINT8
, BASE_HEX
, NULL
,
2187 { &hf_fcels_flacompliance
,
2188 {"FC-FLA Compliance", "fcels.flacompliance", FT_UINT8
, BASE_HEX
,
2189 VALS (fc_els_flacompliance_val
), 0x0, NULL
, HFILL
}},
2190 { &hf_fcels_loopstate
,
2191 {"Loop State", "fcels.loopstate", FT_UINT8
, BASE_HEX
,
2192 VALS (fc_els_loopstate_val
), 0x0, NULL
, HFILL
}},
2193 { &hf_fcels_publicloop_bmap
,
2194 {"Public Loop Device Bitmap", "fcels.pubdev_bmap", FT_BYTES
, BASE_NONE
,
2195 NULL
, 0x0, NULL
, HFILL
}},
2196 { &hf_fcels_pvtloop_bmap
,
2197 {"Private Loop Device Bitmap", "fcels.pvtdev_bmap", FT_BYTES
,
2198 BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2199 { &hf_fcels_alpa_map
,
2200 {"AL_PA Map", "fcels.alpa", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
,
2202 { &hf_fcels_scrregn
,
2203 {"Registration Function", "fcels.scr.regn", FT_UINT8
, BASE_HEX
,
2204 VALS (fc_els_scr_reg_val
), 0x0, NULL
, HFILL
}},
2205 { &hf_fcels_farp_matchcodept
,
2206 {"Match Address Code Points", "fcels.matchcp", FT_UINT8
, BASE_DEC
,
2207 NULL
, 0x0, NULL
, HFILL
}},
2208 { &hf_fcels_farp_respaction
,
2209 {"Responder Action", "fcels.respaction", FT_UINT8
, BASE_HEX
,
2210 VALS (fc_els_farp_respaction_val
), 0x0, NULL
, HFILL
}},
2211 { &hf_fcels_resportid
,
2212 {"Responding Port ID", "fcels.resportid", FT_BYTES
, SEP_DOT
,
2213 NULL
, 0x0, NULL
, HFILL
}},
2214 { &hf_fcels_respname
,
2215 {"Responding Port Name", "fcels.respname", FT_FCWWN
, BASE_NONE
,
2216 NULL
, 0x0, NULL
, HFILL
}},
2217 { &hf_fcels_respnname
,
2218 {"Responding Node Name", "fcels.respnname", FT_FCWWN
, BASE_NONE
,
2219 NULL
, 0x0, NULL
, HFILL
}},
2220 { &hf_fcels_reqipaddr
,
2221 {"Requesting IP Address", "fcels.reqipaddr", FT_IPv6
, BASE_NONE
,
2222 NULL
, 0x0, NULL
, HFILL
}},
2223 { &hf_fcels_respipaddr
,
2224 {"Responding IP Address", "fcels.respipaddr", FT_IPv6
, BASE_NONE
,
2225 NULL
, 0x0, NULL
, HFILL
}},
2226 { &hf_fcels_hardaddr
,
2227 {"Hard Address of Originator", "fcels.hrdaddr", FT_BYTES
, SEP_DOT
,
2228 NULL
, 0x0, NULL
, HFILL
}},
2229 { &hf_fcels_rps_flag
,
2230 {"Flag", "fcels.flag", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2231 { &hf_fcels_rps_portnum
,
2232 {"Physical Port Number", "fcels.portnum", FT_UINT32
, BASE_HEX
, NULL
,
2234 { &hf_fcels_rps_portstatus
,
2235 {"Port Status", "fcels.portstatus", FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
,
2236 &fc_els_portstatus_val_ext
, 0x0, NULL
, HFILL
}},
2237 { &hf_fcels_rnft_fc4type
,
2238 {"FC-4 Type", "fcels.rnft.fc4type", FT_UINT8
, BASE_HEX
,
2239 VALS (fc_fc4_val
), 0x0, NULL
, HFILL
}},
2240 { &hf_fcels_rscn_evqual
,
2241 {"Event Qualifier", "fcels.rscn.evqual", FT_UINT8
, BASE_HEX
,
2242 VALS (fc_els_rscn_evqual_val
), 0x3C, NULL
, HFILL
}},
2243 { &hf_fcels_rscn_addrfmt
,
2244 {"Address Format", "fcels.rscn.addrfmt", FT_UINT8
, BASE_HEX
,
2245 VALS (fc_els_rscn_addrfmt_val
), 0x03, NULL
, HFILL
}},
2246 { &hf_fcels_rscn_domain
,
2247 {"Affected Domain", "fcels.rscn.domain", FT_UINT8
, BASE_HEX
,
2248 NULL
, 0x0, NULL
, HFILL
}},
2249 { &hf_fcels_rscn_area
,
2250 {"Affected Area", "fcels.rscn.area", FT_UINT8
, BASE_HEX
,
2251 NULL
, 0x0, NULL
, HFILL
}},
2252 { &hf_fcels_rscn_port
,
2253 {"Affected Port", "fcels.rscn.port", FT_UINT8
, BASE_HEX
,
2254 NULL
, 0x0, NULL
, HFILL
}},
2255 { &hf_fcels_rec_fc4
,
2256 {"FC4 value", "fcels.rec.fc4value", FT_UINT32
, BASE_HEX
,
2257 NULL
, 0x0, NULL
, HFILL
}},
2259 {"Exchange Status", "fcels.estat", FT_UINT32
, BASE_HEX
,
2260 NULL
, 0x0, NULL
, HFILL
}},
2261 { &hf_fcels_estat_resp
,
2262 {"Sequence Responder", "fcels.estat.resp", FT_BOOLEAN
, 32,
2263 TFS(&tfs_fcels_estat_resp
),
2264 FC_ESB_ST_RESP
, "Seq responder?", HFILL
}},
2265 { &hf_fcels_estat_seq_init
,
2266 {"Sequence Initiative", "fcels.estat.seq_init", FT_BOOLEAN
, 32,
2267 TFS(&tfs_fcels_estat_seq_init
),
2268 FC_ESB_ST_SEQ_INIT
, "Responder has Sequence Initiative?", HFILL
}},
2269 { &hf_fcels_estat_compl
,
2270 {"Exchange Complete", "fcels.estat.complete", FT_BOOLEAN
, 32,
2271 TFS(&tfs_complete_incomplete
),
2272 FC_ESB_ST_COMPLETE
, "Exchange complete?", HFILL
}},
2273 { &hf_fcels_nodeidfmt
,
2274 {"Node Identification Format", "fcels.rnid.nodeidfmt", FT_UINT8
,
2275 BASE_HEX
, VALS (fc_els_nodeid_val
), 0x0, NULL
, HFILL
}},
2276 { &hf_fcels_spidlen
,
2277 {"Specific Id Length", "fcels.rnid.spidlen", FT_UINT8
, BASE_DEC
, NULL
,
2279 { &hf_fcels_vendoruniq
,
2280 {"Vendor Unique", "fcels.rnid.vendoruniq", FT_BYTES
, BASE_NONE
, NULL
,
2282 { &hf_fcels_vendorsp
,
2283 {"Vendor Specific", "fcels.rnid.vendorsp", FT_UINT16
, BASE_HEX
, NULL
,
2285 { &hf_fcels_asstype
,
2286 {"Associated Type", "fcels.rnid.asstype", FT_UINT32
, BASE_HEX
| BASE_EXT_STRING
,
2287 &fc_els_rnid_asstype_val_ext
, 0x0, NULL
, HFILL
}},
2288 { &hf_fcels_physport
,
2289 {"Physical Port Number", "fcels.rnid.physport", FT_UINT32
, BASE_HEX
,
2290 NULL
, 0x0, NULL
, HFILL
}},
2291 { &hf_fcels_attnodes
,
2292 {"Number of Attached Nodes", "fcels.rnid.attnodes", FT_UINT32
,
2293 BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2294 { &hf_fcels_nodemgmt
,
2295 {"Node Management", "fcels.rnid.nodemgmt", FT_UINT8
, BASE_HEX
,
2296 VALS (fc_els_rnid_mgmt_val
), 0x0, NULL
, HFILL
}},
2298 {"IP Version", "fcels.rnid.ipvers", FT_UINT8
, BASE_HEX
,
2299 VALS (fc_els_rnid_ipvers_val
), 0x0, NULL
, HFILL
}},
2300 { &hf_fcels_tcpport
,
2301 {"TCP/UDP Port Number", "fcels.rnid.tcpport", FT_UINT16
, BASE_DEC
,
2302 NULL
, 0x0, NULL
, HFILL
}},
2304 {"IP Address", "fcels.rnid.ip", FT_IPv6
, BASE_NONE
, NULL
, 0x0, NULL
,
2306 { &hf_fcels_cbind_liveness
,
2307 {"Liveness Test Interval", "fcels.cbind.liveness", FT_UINT16
, BASE_DEC
,
2308 NULL
, 0x0, "Liveness Test Interval in seconds", HFILL
}},
2309 { &hf_fcels_cbind_addr_mode
,
2310 {"Addressing Mode", "fcels.cbind.addr_mode", FT_UINT8
, BASE_HEX
,
2311 VALS (cbind_addr_mode_vals
), 0x0, NULL
, HFILL
}},
2312 { &hf_fcels_cbind_ifcp_version
,
2313 {"iFCP version", "fcels.cbind.ifcp_version", FT_UINT8
, BASE_DEC
,
2314 NULL
, 0x0, "Version of iFCP protocol", HFILL
}},
2315 { &hf_fcels_cbind_userinfo
,
2316 {"UserInfo", "fcels.cbind.userinfo", FT_UINT32
, BASE_HEX
,
2317 NULL
, 0x0, "Userinfo token", HFILL
}},
2318 { &hf_fcels_cbind_snpname
,
2319 {"Source N_Port Port_Name", "fcels.cbind.snpname", FT_FCWWN
, BASE_NONE
, NULL
, 0x0,
2321 { &hf_fcels_cbind_dnpname
,
2322 {"Destination N_Port Port_Name", "fcels.cbind.dnpname", FT_FCWWN
, BASE_NONE
, NULL
, 0x0,
2324 { &hf_fcels_cbind_status
,
2325 {"Status", "fcels.cbind.status", FT_UINT16
, BASE_DEC
,
2326 VALS (cbind_status_vals
), 0x0, "Cbind status", HFILL
}},
2327 { &hf_fcels_chandle
,
2328 {"Connection Handle", "fcels.cbind.handle", FT_UINT16
, BASE_HEX
,
2329 NULL
, 0x0, "Cbind/Unbind connection handle", HFILL
}},
2330 { &hf_fcels_unbind_status
,
2331 {"Status", "fcels.unbind.status", FT_UINT16
, BASE_DEC
,
2332 VALS (unbind_status_vals
), 0x0, "Unbind status", HFILL
}},
2333 { &hf_fcels_cmn_cios
,
2334 {"Cont. Incr. Offset Supported", "fcels.cmn.cios", FT_BOOLEAN
, 16,
2335 TFS(&tfs_supported_not_supported
), 0x8000, NULL
, HFILL
}},
2336 { &hf_fcels_cmn_rro
,
2337 {"RRO Supported", "fcels.cmn.rro", FT_BOOLEAN
, 16,
2338 TFS(&tfs_supported_not_supported
), 0x4000, NULL
, HFILL
}},
2339 { &hf_fcels_cmn_vvv
,
2340 {"Valid Vendor Version", "fcels.cmn.vvv", FT_BOOLEAN
, 16,
2341 TFS(&tfs_valid_invalid
), 0x2000, NULL
, HFILL
}},
2342 { &hf_fcels_cmn_b2b
,
2343 {"B2B Credit Mgmt", "fcels.cmn.bbb", FT_BOOLEAN
, 16,
2344 TFS(&tfs_fc_fcels_cmn_b2b
), 0x0800, NULL
, HFILL
}},
2345 { &hf_fcels_cmn_e_d_tov
,
2346 {"E_D_TOV", "fcels.cmn.e_d_tov", FT_BOOLEAN
, 16,
2347 TFS(&tfs_fc_fcels_cmn_e_d_tov
), 0x0400, NULL
, HFILL
}},
2348 { &hf_fcels_cmn_simplex
,
2349 {"Simplex", "fcels.cmn.simplex", FT_BOOLEAN
, 16,
2350 TFS(&tfs_supported_not_supported
), 0x0040, NULL
, HFILL
}},
2351 { &hf_fcels_cmn_multicast
,
2352 {"Multicast", "fcels.cmn.multicast", FT_BOOLEAN
, 16,
2353 TFS(&tfs_supported_not_supported
), 0x0200, NULL
, HFILL
}},
2354 { &hf_fcels_cmn_broadcast
,
2355 {"Broadcast", "fcels.cmn.broadcast", FT_BOOLEAN
, 16,
2356 TFS(&tfs_supported_not_supported
), 0x0100, NULL
, HFILL
}},
2357 { &hf_fcels_cmn_security
,
2358 {"Security", "fcels.cmn.security", FT_BOOLEAN
, 16,
2359 TFS(&tfs_set_notset
), 0x0020, NULL
, HFILL
}},
2360 { &hf_fcels_cmn_clk
,
2361 {"Clk Sync", "fcels.cmn.clk", FT_BOOLEAN
, 16,
2362 TFS(&tfs_capable_not_capable
), 0x0010, NULL
, HFILL
}},
2363 { &hf_fcels_cmn_dhd
,
2364 {"DHD Capable", "fcels.cmn.dhd", FT_BOOLEAN
, 16,
2365 TFS(&tfs_capable_not_capable
), 0x0004, NULL
, HFILL
}},
2366 { &hf_fcels_cmn_seqcnt
,
2367 {"SEQCNT", "fcels.cmn.seqcnt", FT_BOOLEAN
, 16,
2368 TFS(&tfs_fc_fcels_cmn_seqcnt
), 0x0002, NULL
, HFILL
}},
2369 { &hf_fcels_cmn_payload
,
2370 {"Payload Len", "fcels.cmn.payload", FT_BOOLEAN
, 16,
2371 TFS(&tfs_fc_fcels_cmn_payload
), 0x0001, NULL
, HFILL
}},
2372 { &hf_fcels_cls_cns
,
2373 {"Class Supported", "fcels.cls.cns", FT_BOOLEAN
, 16,
2374 TFS(&tfs_supported_not_supported
), 0x8000, NULL
, HFILL
}},
2375 { &hf_fcels_cls_sdr
,
2376 {"Delivery Mode", "fcels.cls.sdr", FT_BOOLEAN
, 16,
2377 TFS(&tfs_fc_fcels_cls_sdr
), 0x0800, NULL
, HFILL
}},
2378 { &hf_fcels_cls_prio
,
2379 {"Priority", "fcels.cls.prio", FT_BOOLEAN
, 16,
2380 TFS(&tfs_supported_not_supported
), 0x0080, NULL
, HFILL
}},
2381 { &hf_fcels_cls_nzctl
,
2382 {"Non-zero CS_CTL", "fcels.cls.nzctl", FT_BOOLEAN
, 16,
2383 TFS(&tfs_fc_fcels_cls_nzctl
), 0x0040, NULL
, HFILL
}},
2384 { &hf_fcels_initctl
,
2385 {"Initiator Ctl", "fcels.logi.initctl", FT_UINT16
, BASE_HEX
,
2386 NULL
, 0x0, NULL
, HFILL
}},
2387 { &hf_fcels_initctl_initial_pa
,
2388 {"Initial P_A", "fcels.logi.initctl.initial_pa", FT_UINT16
, BASE_HEX
,
2389 VALS (initial_pa_vals
), 0x3000, NULL
, HFILL
}},
2390 { &hf_fcels_initctl_ack0
,
2391 {"ACK0 Capable", "fcels.logi.initctl.ack0", FT_BOOLEAN
, 16,
2392 TFS(&tfs_capable_not_capable
), 0x0800, NULL
, HFILL
}},
2393 { &hf_fcels_initctl_ackgaa
,
2394 {"ACK GAA", "fcels.logi.initctl.ackgaa", FT_BOOLEAN
, 16,
2395 TFS(&tfs_fc_fcels_initctl_ackgaa
), 0x0200, NULL
, HFILL
}},
2396 { &hf_fcels_initctl_sync
,
2397 {"Clock Sync", "fcels.logi.initctl.sync", FT_BOOLEAN
, 16,
2398 TFS(&tfs_supported_not_supported
), 0x0010, NULL
, HFILL
}},
2399 { &hf_fcels_rcptctl
,
2400 {"Recipient Ctl", "fcels.logi.rcptctl", FT_UINT16
, BASE_HEX
,
2401 NULL
, 0x0, NULL
, HFILL
}},
2402 { &hf_fcels_rcptctl_ack0
,
2403 {"ACK0", "fcels.logi.rcptctl.ack", FT_BOOLEAN
, 16,
2404 TFS(&tfs_supported_not_supported
), 0x8000, NULL
, HFILL
}},
2405 { &hf_fcels_rcptctl_interlock
,
2406 {"X_ID Interlock", "fcels.logi.rcptctl.interlock", FT_BOOLEAN
, 16,
2407 TFS(&tfs_requested_not_requested
), 0x2000, NULL
, HFILL
}},
2408 { &hf_fcels_rcptctl_policy
,
2409 {"Policy", "fcels.logi.rcptctl.policy", FT_UINT16
, BASE_HEX
,
2410 VALS (rcptctl_policy_vals
), 0x1800, NULL
, HFILL
}},
2411 { &hf_fcels_rcptctl_category
,
2412 {"Category", "fcels.logi.rcptctl.category", FT_UINT16
, BASE_HEX
,
2413 VALS (rcptctl_category_vals
), 0x0030, NULL
, HFILL
}},
2414 { &hf_fcels_rcptctl_sync
,
2415 {"Clock Sync", "fcels.logi.rcptctl.sync", FT_BOOLEAN
, 16,
2416 TFS(&tfs_supported_not_supported
), 0x0008, NULL
, HFILL
}},
2417 { &hf_fcels_fcpflags
,
2418 {"FCP Flags", "fcels.fcpflags", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
,
2420 { &hf_fcels_fcpflags_trireq
,
2421 {"Task Retry Ident", "fcels.fcpflags.trireq", FT_BOOLEAN
, 32,
2422 TFS(&tfs_requested_not_requested
), 1 << 9, NULL
, HFILL
}},
2423 { &hf_fcels_fcpflags_trirep
,
2424 {"Task Retry Ident", "fcels.fcpflags.trirep", FT_BOOLEAN
, 32,
2425 TFS(&tfs_accepted_not_accepted
), 1 << 9, NULL
, HFILL
}},
2426 { &hf_fcels_fcpflags_retry
,
2427 {"Retry", "fcels.fcpflags.retry", FT_BOOLEAN
, 32,
2428 TFS(&tfs_fc_fcels_fcpflags_retry
), 1 << 8, NULL
, HFILL
}},
2429 { &hf_fcels_fcpflags_ccomp
,
2430 {"Comp", "fcels.fcpflags.ccomp", FT_BOOLEAN
, 32,
2431 TFS(&tfs_fc_fcels_fcpflags_ccomp
), 0x00000080, NULL
, HFILL
}},
2432 { &hf_fcels_fcpflags_datao
,
2433 {"Data Overlay", "fcels.fcpflags.datao", FT_BOOLEAN
, 32,
2434 TFS(&tfs_fc_fcels_fcpflags_datao
), 0x00000040, NULL
, HFILL
}},
2435 { &hf_fcels_fcpflags_initiator
,
2436 {"Initiator", "fcels.fcpflags.initiator", FT_BOOLEAN
, 32,
2437 TFS(&tfs_fc_fcels_fcpflags_initiator
), 0x00000020, NULL
, HFILL
}},
2438 { &hf_fcels_fcpflags_target
,
2439 {"Target", "fcels.fcpflags.target", FT_BOOLEAN
, 32,
2440 TFS(&tfs_fc_fcels_fcpflags_target
), 0x00000010, NULL
, HFILL
}},
2441 { &hf_fcels_fcpflags_rdxr
,
2442 {"Rd Xfer_Rdy Dis", "fcels.fcpflags.rdxr", FT_BOOLEAN
, 32,
2443 TFS(&tfs_fc_fcels_fcpflags_rdxr
), 0x00000002, NULL
, HFILL
}},
2444 { &hf_fcels_fcpflags_wrxr
,
2445 {"Wr Xfer_Rdy Dis", "fcels.fcpflags.wrxr", FT_BOOLEAN
, 32,
2446 TFS(&tfs_fc_fcels_fcpflags_wrxr
), 0x00000001, NULL
, HFILL
}},
2447 { &hf_fcels_prliloflags
,
2448 {"PRLILO Flags", "fcels.prliloflags", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
,
2450 { &hf_fcels_tprloflags_opav
,
2451 {"3rd Party Orig PA Valid", "fcels.tprloflags.opav", FT_BOOLEAN
, 8,
2452 TFS(&tfs_valid_not_valid
), 0x80, NULL
, HFILL
}},
2453 { &hf_fcels_tprloflags_rpav
,
2454 {"Resp PA Valid", "fcels.tprloflags.rpav", FT_BOOLEAN
, 8,
2455 TFS(&tfs_valid_not_valid
), 0x40, NULL
, HFILL
}},
2456 { &hf_fcels_tprloflags_npv
,
2457 {"3rd Party N_Port Valid", "fcels.tprloflags.npv", FT_BOOLEAN
, 8,
2458 TFS(&tfs_valid_not_valid
), 0x20, NULL
, HFILL
}},
2459 { &hf_fcels_tprloflags_gprlo
,
2460 {"Global PRLO", "fcels.tprloflags.gprlo", FT_BOOLEAN
, 8,
2461 TFS(&tfs_fc_fcels_tprloflags_gprlo
), 0x10, NULL
, HFILL
}},
2462 { &hf_fcels_speedflags
,
2463 {"Port Speed Capabilities", "fcels.speedflags", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
,
2465 { &hf_fcels_speedflags_1gb
,
2466 {"1Gb Support", "fcels.speedflags.1gb", FT_BOOLEAN
, 16,
2467 TFS(&tfs_supported_not_supported
), 0x8000, NULL
, HFILL
}},
2468 { &hf_fcels_speedflags_2gb
,
2469 {"2Gb Support", "fcels.speedflags.2gb", FT_BOOLEAN
, 16,
2470 TFS(&tfs_supported_not_supported
), 0x4000, NULL
, HFILL
}},
2471 { &hf_fcels_speedflags_4gb
,
2472 {"4Gb Support", "fcels.speedflags.4gb", FT_BOOLEAN
, 16,
2473 TFS(&tfs_supported_not_supported
), 0x2000, NULL
, HFILL
}},
2474 { &hf_fcels_speedflags_10gb
,
2475 {"10Gb Support", "fcels.speedflags.10gb", FT_BOOLEAN
, 16,
2476 TFS(&tfs_supported_not_supported
), 0x1000, NULL
, HFILL
}},
2477 { &hf_fcels_prliloflags_opav
,
2478 {"Orig PA Valid", "fcels.prliloflags.opav", FT_BOOLEAN
, 8,
2479 TFS(&tfs_valid_not_valid
), 0x80, NULL
, HFILL
}},
2480 { &hf_fcels_prliloflags_ipe
,
2481 {"Image Pair Estd", "fcels.prliloflags.ipe", FT_BOOLEAN
, 8,
2482 TFS(&tfs_fc_fcels_prliloflags_ipe
), 0x20, NULL
, HFILL
}},
2483 { &hf_fcels_prliloflags_eip
,
2484 {"Est Image Pair", "fcels.prliloflags.eip", FT_BOOLEAN
, 8,
2485 TFS(&tfs_fc_fcels_prliloflags_eip
), 0x20, NULL
, HFILL
}},
2487 /* Generated from convert_proto_tree_add_text.pl */
2488 { &hf_fcels_recovery_qualifier_status
, { "Recovery Qualifier Status", "fcels.recovery_qualifier_status", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2489 { &hf_fcels_link_failure_count
, { "Link Failure Count", "fcels.link_failure_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2490 { &hf_fcels_loss_of_sync_count
, { "Loss of Sync Count", "fcels.loss_of_sync_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2491 { &hf_fcels_loss_of_signal_count
, { "Loss of Signal Count", "fcels.loss_of_signal_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2492 { &hf_fcels_primitive_seq_protocol_err
, { "Primitive Seq Protocol Err", "fcels.primitive_seq_protocol_err", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2493 { &hf_fcels_invalid_xmission_word
, { "Invalid Xmission Word", "fcels.invalid_xmission_word", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2494 { &hf_fcels_invalid_crc_count
, { "Invalid CRC Count", "fcels.invalid_crc_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2495 { &hf_fcels_l_port_status
, { "L_Port Status", "fcels.l_port_status", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2496 { &hf_fcels_lip_al_ps
, { "LIP AL_PS", "fcels.lip.al_ps", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2497 { &hf_fcels_lip_f7_initiated_count
, { "LIP F7 Initiated Count", "fcels.lip.f7_initiated_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2498 { &hf_fcels_lip_f7_received_count
, { "LIP F7 Received Count", "fcels.lip.f7_received_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2499 { &hf_fcels_lip_f8_initiated_count
, { "LIP F8 Initiated Count", "fcels.lip.f8_initiated_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2500 { &hf_fcels_lip_f8_received_count
, { "LIP F8 Received Count", "fcels.lip.f8_received_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2501 { &hf_fcels_lip_reset_initiated_count
, { "LIP Reset Initiated Count", "fcels.lip.reset_initiated_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2502 { &hf_fcels_lip_reset_received_count
, { "LIP Reset Received Count", "fcels.lip.reset_received_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2503 { &hf_fcels_rpl_max_size
, { "Max Size", "fcels.rpl.max_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2504 { &hf_fcels_rpl_index
, { "Index", "fcels.rpl.index", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2505 { &hf_fcels_rpl_payload_length
, { "Payload Length", "fcels.rpl.payload_length", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2506 { &hf_fcels_rpl_list_length
, { "List Length", "fcels.rpl.list_length", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2507 { &hf_fcels_rpl_index_of_i_port_block
, { "Index of I Port Block", "fcels.rpl.index_of_i_port_block", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2508 { &hf_fcels_rpl_physical_port
, { "Physical Port #", "fcels.rpl.physical_port", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2509 { &hf_fcels_rpl_port_identifier
, { "Port Identifier", "fcels.rpl.port_identifier", FT_BYTES
, SEP_DOT
, NULL
, 0x0, NULL
, HFILL
}},
2510 { &hf_fcels_rpl_port_name
, { "Port Name", "fcels.rpl.port_name", FT_FCWWN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2511 { &hf_fcels_rscn_page_len
, { "Page Len", "fcels.rscn.page_len", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2512 { &hf_fcels_rscn_payload_len
, { "Payload Len", "fcels.rscn.payload_len", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2513 { &hf_fcels_rnft_max_size
, { "Max Size", "fcels.rnft.max_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2514 { &hf_fcels_rnft_index
, { "Index", "fcels.rnft.index", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2515 { &hf_fcels_rnft_payload_len
, { "Payload Len", "fcels.rnft.payload_len", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2516 { &hf_fcels_rnft_list_length
, { "List Length", "fcels.rnft.list_length", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2517 { &hf_fcels_rnft_index_of_first_rec_in_list
, { "Index of First Rec in List", "fcels.rnft.index_of_first_rec_in_list", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2518 { &hf_fcels_rnft_fc4_qualifier
, { "FC-4 Qualifier", "fcels.rnft.fc_4_qualifier", FT_UINT24
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2519 { &hf_fcels_prlilo_page_length
, { "Page Length", "fcels.prlilo.page_length", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2520 { &hf_fcels_prlilo_payload_length
, { "Payload Length", "fcels.prlilo.payload_length", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2521 { &hf_fcels_prlilo_type
, { "TYPE", "fcels.prlilo.type", FT_UINT8
, BASE_DEC
, VALS(fc_prli_fc4_val
), 0x0, NULL
, HFILL
}},
2522 { &hf_fcels_prlilo_type_code_extension
, { "TYPE Code Extension", "fcels.prlilo.type_code_extension", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2523 { &hf_fcels_prlilo_response_code
, { "Response Code", "fcels.prlilo.response_code", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2524 { &hf_fcels_prlilo_originator_pa
, { "Originator PA", "fcels.prlilo.originator_pa", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2525 { &hf_fcels_prlilo_3rd_party_originator_pa
, { "3rd Party Originator PA", "fcels.prlilo.3rd_party_originator_pa", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2526 { &hf_fcels_prlilo_responder_pa
, { "Responder PA", "fcels.prlilo.responder_pa", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2527 { &hf_fcels_prlilo_service_parameter_response
, { "Service Parameter Response", "fcels.prlilo.service_parameter_response", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2528 { &hf_fcels_prlilo_3rd_party_n_port_id
, { "3rd Party N_Port Id", "fcels.prlilo.3rd_party_n_port_id", FT_BYTES
, SEP_DOT
, NULL
, 0x0, NULL
, HFILL
}},
2529 { &hf_fcels_lirr_regn_function
, { "Regn. Function", "fcels.lirr.regn_function", FT_UINT8
, BASE_HEX
, VALS(fc_els_lirr_regfunc_val
), 0x0, NULL
, HFILL
}},
2530 { &hf_fcels_lirr_regn_format
, { "Regn. Format", "fcels.lirr.regn_format", FT_UINT8
, BASE_HEX
, VALS(fc_fc4_val
), 0x0, NULL
, HFILL
}},
2531 { &hf_fcels_srl_flag
, { "Flag", "fcels.srl.flag", FT_BOOLEAN
, 8, TFS(&tfs_srl_flag
), 0x01, NULL
, HFILL
}},
2532 { &hf_fcels_srl_fl_port_addr
, { "FL_Port Addr", "fcels.srl.fl_port_addr", FT_BYTES
, SEP_DOT
, NULL
, 0x0, NULL
, HFILL
}},
2533 { &hf_fcels_rpsc_number_of_entries
, { "Number of Entries", "fcels.rpsc.number_of_entries", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2534 { &hf_fcels_rpsc_port_oper_speed
, { "Port Oper Speed", "fcels.rpsc.port_oper_speed", FT_UINT16
, BASE_HEX
, VALS(fc_els_portspeed_val
), 0x0, NULL
, HFILL
}},
2535 { &hf_fcels_common_identification_data_length
, { "Common Identification Data Length", "fcels.common_identification_data_length", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2538 static int *ett
[] = {
2543 &ett_fcels_logi_cmnsvc
,
2544 &ett_fcels_logi_clssvc
,
2551 &ett_fcels_prli_svcpg
,
2559 &ett_fcels_rscn_rec
,
2563 &ett_fcels_rnft_fc4
,
2571 &ett_fcels_cmnfeatures
,
2572 &ett_fcels_clsflags
,
2575 &ett_fcels_fcpflags
,
2576 &ett_fcels_prliloflags
,
2577 &ett_fcels_speedflags
,
2581 static ei_register_info ei
[] = {
2582 { &ei_fcels_src_unknown
, { "fcels.src.type.unknown", PI_PROTOCOL
, PI_WARN
, "Unknown source address type", EXPFILL
}},
2583 { &ei_fcels_dst_unknown
, { "fcels.dst.type.unknown", PI_PROTOCOL
, PI_WARN
, "Unknown destination address type", EXPFILL
}},
2584 { &ei_fcels_no_record_of_exchange
, { "fcels.no_record_of_exchange", PI_UNDECODED
, PI_WARN
, "No record of Exchange. Unable to decode ACC", EXPFILL
}},
2585 { &ei_fcels_no_record_of_els_req
, { "fcels.no_record_of_els_req", PI_UNDECODED
, PI_WARN
, "No record of ELS Req. Unable to decode ACC", EXPFILL
}},
2588 expert_module_t
* expert_fcels
;
2590 proto_fcels
= proto_register_protocol("FC Extended Link Svc", "FC ELS", "fcels");
2592 proto_register_field_array(proto_fcels
, hf
, array_length(hf
));
2593 proto_register_subtree_array(ett
, array_length(ett
));
2594 expert_fcels
= expert_register_protocol(proto_fcels
);
2595 expert_register_field_array(expert_fcels
, ei
, array_length(ei
));
2596 fcels_req_hash
= wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), fcels_hash
, fcels_equal
);
2598 els_handle
= register_dissector("fcels", dissect_fcels
, proto_fcels
);
2602 proto_reg_handoff_fcels (void)
2604 dissector_add_uint("fc.ftype", FC_FTYPE_ELS
, els_handle
);
2606 fcsp_handle
= find_dissector_add_dependency ("fcsp", proto_fcels
);
2611 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2616 * indent-tabs-mode: nil
2619 * vi: set shiftwidth=4 tabstop=8 expandtab:
2620 * :indentSize=4:tabSize=8:noTabs=true: