3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifndef __PACKET_FCFCS_H_
11 #define __PACKET_FCFCS_H_
15 #define FCFCS_GTIN 0x100
16 #define FCFCS_GIEL 0x101
17 #define FCFCS_GIET 0x111
18 #define FCFCS_GDID 0x112
19 #define FCFCS_GMID 0x113
20 #define FCFCS_GFN 0x114
21 #define FCFCS_GIELN 0x115
22 #define FCFCS_GMAL 0x116
23 #define FCFCS_GIEIL 0x117
24 #define FCFCS_GPL 0x118
25 #define FCFCS_GPT 0x121
26 #define FCFCS_GPPN 0x122
27 #define FCFCS_GAPNL 0x124
28 #define FCFCS_GPS 0x126
29 #define FCFCS_GATIN 0x128
30 #define FCFCS_GPLNL 0x191
31 #define FCFCS_GPLT 0x192
32 #define FCFCS_GPLML 0x193
33 #define FCFCS_GNPL 0x1A1
34 #define FCFCS_GPNL 0x1A2
35 #define FCFCS_GNID 0x1B1
36 #define FCFCS_RIELN 0x215
37 #define FCFCS_RPL 0x280
38 #define FCFCS_RPLN 0x291
39 #define FCFCS_RPLT 0x292
40 #define FCFCS_RPLM 0x293
41 #define FCFCS_DPL 0x380
42 #define FCFCS_DPLN 0x391
43 #define FCFCS_DPLML 0x393
44 #define FCFCS_GCAP 0xe020
46 /* Used in protocol detail window */
47 static const value_string fc_fcs_opcode_val
[] = {
48 {FCCT_MSG_ACC
, "MSG_ACC"},
49 {FCCT_MSG_RJT
, "MSG_RJT"},
50 {FCFCS_GTIN
, "Get Topology Info"},
51 {FCFCS_GIEL
, "Get Interconnect Element List"},
52 {FCFCS_GIET
, "Get Interconnect Element Type"},
53 {FCFCS_GDID
, "Get Interconnect Element Domain ID"},
54 {FCFCS_GMID
, "Get Interconnect Element Mgmt ID"},
55 {FCFCS_GFN
, "Get Interconnect Element Fabric Name"},
56 {FCFCS_GIELN
, "Get Interconnect Element Logical Name"},
57 {FCFCS_GMAL
, "Get Interconnect Element Mgmt Addr List"},
58 {FCFCS_GIEIL
, "Get Interconnect Element Info List"},
59 {FCFCS_GPL
, "Get Port List"},
60 {FCFCS_GPT
, "Get Port Type"},
61 {FCFCS_GPPN
, "Get Physical Port Number"},
62 {FCFCS_GAPNL
, "Get Physical Port Name List"},
63 {FCFCS_GPS
, "Get Port State"},
64 {FCFCS_GATIN
, "Get Attached Topology Info"},
65 {FCFCS_GPLNL
, "Get Platform Node Name List"},
66 {FCFCS_GPLT
, "Get Platform Type"},
67 {FCFCS_GPLML
, "Get Platform Mgmt Addr List"},
68 {FCFCS_GNPL
, "Get Platform Node Name List"},
69 {FCFCS_GPNL
, "Get Platform Name List"},
70 {FCFCS_GNID
, "Get Node Identification Data"},
71 {FCFCS_RIELN
, "Register Interconnect Element Logical Name"},
72 {FCFCS_RPL
, "Register Platform"},
73 {FCFCS_RPLN
, "Register Platform Node Name"},
74 {FCFCS_RPLT
, "Register Platform Type"},
75 {FCFCS_RPLM
, "Register Platform Mgmt. Address"},
76 {FCFCS_DPL
, "Deregister Platform"},
77 {FCFCS_DPLN
, "Deregister Platform Node Name"},
78 {FCFCS_DPLML
, "Deregister Platform Mgmt. Address List"},
79 {FCFCS_GCAP
, "Get Capabilities"},
83 /* Used in protocol summary window */
84 static const value_string fc_fcs_opcode_abbrev_val
[] = {
85 {FCCT_MSG_ACC
, "MSG_ACC"},
86 {FCCT_MSG_RJT
, "MSG_RJT"},
93 {FCFCS_GIELN
, "GIELN"},
95 {FCFCS_GIEIL
, "GIEIL"},
99 {FCFCS_GAPNL
, "GAPNL"},
101 {FCFCS_GATIN
, "GATIN"},
102 {FCFCS_GPLNL
, "GPLNL"},
103 {FCFCS_GPLT
, "GPLT"},
104 {FCFCS_GPLML
, "GPLML"},
105 {FCFCS_GNPL
, "GNPL"},
106 {FCFCS_GPNL
, "GPNL"},
107 {FCFCS_GNID
, "GNID"},
108 {FCFCS_RIELN
, "RIELN"},
110 {FCFCS_RPLN
, "RPLN"},
111 {FCFCS_RPLT
, "RPLT"},
112 {FCFCS_RPLM
, "RPLM"},
114 {FCFCS_DPLN
, "DPLN"},
115 {FCFCS_DPLML
, "DPLML"},
116 {FCFCS_GCAP
, "GCAP"},
120 static const value_string fc_fcs_ietype_val
[] = {
128 /* Port type definitions, same as in dNS (fcdns.h) */
129 #define FCFCS_PTYPE_UNDEF 0x00
130 #define FCFCS_PTYPE_NPORT 0x01
131 #define FCFCS_PTYPE_NLPORT 0x02
132 #define FCFCS_PTYPE_FNLPORT 0x03
133 #define FCFCS_PTYPE_NXPORT 0x7F
134 #define FCFCS_PTYPE_FPORT 0x81
135 #define FCFCS_PTYPE_FLPORT 0x82
136 #define FCFCS_PTYPE_EPORT 0x84
137 #define FCFCS_PTYPE_BPORT 0x85
139 static const value_string fc_fcs_port_type_val
[] = {
140 {FCFCS_PTYPE_UNDEF
, "Undefined Port Type"},
141 {FCFCS_PTYPE_NPORT
, "N_Port"},
142 {FCFCS_PTYPE_NLPORT
, "NL_Port"},
143 {FCFCS_PTYPE_FNLPORT
, "F/NL_Port"},
144 {FCFCS_PTYPE_NXPORT
, "Nx_Port"},
145 {FCFCS_PTYPE_FPORT
, "F_Port"},
146 {FCFCS_PTYPE_FLPORT
, "FL_Port"},
147 {FCFCS_PTYPE_EPORT
, "E_Port"},
148 {FCFCS_PTYPE_BPORT
, "B_Port"},
152 static const value_string fc_fcs_port_txtype_val
[] = {
154 {2, "Long Wave Laser"},
155 {3, "Short Wave Laser"},
156 {4, "Long Wave Laser Cost Reduced"},
161 static const value_string fc_fcs_port_modtype_val
[] = {
167 {6, "GBIC with Serial ID"},
168 {7, "GBIC without Serial ID"},
169 {8, "SFP with Serial ID"},
170 {9, "SFP without Serial ID"},
174 static const value_string fc_fcs_port_state_val
[] = {
183 static const value_string fc_fcs_plat_type_val
[] = {
189 {8, "Software Proxy Agent"},
190 {9, "Storage Device"},
191 {10, "Host Computer"},
192 {11, "Storage Subsystem"},
194 {13, "Software Driver"},
195 {14, "Storage Access Device"},
199 static const value_string fc_fcs_rjt_code_val
[] = {
200 {0x00, "No Additional Explanation"},
201 {0x01, "Invalid Name_Identifier for Interconnect Element or Port"},
202 {0x10, "Interconnect Element List Not Available"},
203 {0x11, "Interconnect Element Type Not Available"},
204 {0x12, "Domain ID Not Available"},
205 {0x13, "Mgmt. ID Not Available"},
206 {0x14, "Fabric Name Not Available"},
207 {0x15, "Interconnect Element Logical Name Not Available"},
208 {0x16, "Mgmt. Address Not Available"},
209 {0x17, "Interconnect Element Information List Not Available"},
210 {0x30, "Port List Not Available"},
211 {0x31, "Port Type Not Available"},
212 {0x32, "Physical Port Number Not Available"},
213 {0x34, "Attached Port Name List Not Available"},
214 {0x36, "Port State Not Available"},
215 {0x50, "Unable to Register Interconnect Element Logical Name"},
216 {0x60, "Platform Name Does Not Exist"},
217 {0x61, "Platform Name Already Exists"},
218 {0x62, "Platform Node Name Does Not Exist"},
219 {0x63, "Platform Node Name Already Exists"},
223 static const true_false_string fc_fcs_portflags_tfs
= {
224 "RTIN ELS Supported",
225 "RTIN ELS Not Supported",
228 static const value_string fc_fcs_fcsmask_val
[] = {
229 {1, "Basic Configuration Service"},
230 {2, "Platform Configuration Service"},
231 {3, "Basic+Platform Configuration Service"},
232 {4, "Topology Discovery Configuration Service"},
233 {5, "Basic+Topology Discovery Configuration Service"},
234 {6, "Platform+Topology Discovery Configuration Service"},
235 {7, "Basic+Platform+Topology Discovery Configuration Service"},
239 static const value_string fc_fcs_unsmask_val
[] = {
240 {1, "Basic Unzoned Name Service"},