HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-fcels.h
blobb61054f42a44a02a719181f598a7c15cde9f675a
1 /* packet-fcels.h
2 * Fibre Channel Extended Link Services Definitions (ddutt@cisco.com)
3 * Copyright 2001, Dinesh G Dutt <ddutt@cisco.com>
5 * $Id$
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #ifndef __PACKET_FCELS_H_
27 #define __PACKET_FCELS_H_
29 #define FC_ELS_LSRJT 0x01
30 #define FC_ELS_ACC 0x02
31 #define FC_ELS_PLOGI 0x03
32 #define FC_ELS_FLOGI 0x04
33 #define FC_ELS_LOGOUT 0x05
34 #define FC_ELS_ABTX 0x06
35 #define FC_ELS_RSI 0x0A
36 #define FC_ELS_RTV 0x0E
37 #define FC_ELS_RLS 0x0F
38 #define FC_ELS_ECHO 0x10
39 #define FC_ELS_TEST 0x11
40 #define FC_ELS_RRQ 0x12
41 #define FC_ELS_REC 0x13
42 #define FC_ELS_SRR 0x14
43 #define FC_ELS_PRLI 0x20
44 #define FC_ELS_PRLO 0x21
45 #define FC_ELS_TPRLO 0x24
46 #define FC_ELS_PDISC 0x50
47 #define FC_ELS_FDISC 0x51
48 #define FC_ELS_ADISC 0x52
49 #define FC_ELS_FARP_REQ 0x54
50 #define FC_ELS_FARP_RPLY 0x55
51 #define FC_ELS_RPS 0x56
52 #define FC_ELS_RPL 0x57
53 #define FC_ELS_FAN 0x60
54 #define FC_ELS_RSCN 0x61
55 #define FC_ELS_SCR 0x62
56 #define FC_ELS_RNFT 0x63
57 #define FC_ELS_LINIT 0x70
58 #define FC_ELS_LSTS 0x72
59 #define FC_ELS_RNID 0x78
60 #define FC_ELS_RLIR 0x79
61 #define FC_ELS_LIRR 0x7A
62 #define FC_ELS_SRL 0x7B
63 #define FC_ELS_RPSC 0x7D
64 #define FC_ELS_LKA 0x80
65 #define FC_ELS_AUTH 0x90
66 #define FC_ELS_CBIND 0xE0
67 #define FC_ELS_UNBIND 0xE4
69 static const value_string fc_els_proto_val[] = {
70 {FC_ELS_LSRJT , "LS_RJT"},
71 {FC_ELS_ACC , "ACC"},
72 {FC_ELS_PLOGI , "PLOGI"},
73 {FC_ELS_FLOGI , "FLOGI"},
74 {FC_ELS_LOGOUT , "LOGO"},
75 {FC_ELS_ABTX , "ABTX"},
76 {FC_ELS_RSI , "RSI"},
77 {FC_ELS_RTV , "RTV"},
78 {FC_ELS_RLS , "RLS"},
79 {FC_ELS_ECHO , "ECHO"},
80 {FC_ELS_TEST , "TEST"},
81 {FC_ELS_RRQ , "RRQ"},
82 {FC_ELS_REC , "REC"},
83 {FC_ELS_SRR , "SRR"},
84 {FC_ELS_PRLI , "PRLI"},
85 {FC_ELS_PRLO , "PRLO"},
86 {FC_ELS_TPRLO , "TPRLO"},
87 {FC_ELS_PDISC , "PDISC"},
88 {FC_ELS_FDISC , "FDISC"},
89 {FC_ELS_ADISC , "ADISC"},
90 {FC_ELS_FARP_REQ , "FARP-REQ"},
91 {FC_ELS_FARP_RPLY , "FARP-REPLY"},
92 {FC_ELS_RPS , "RPS"},
93 {FC_ELS_RPL , "RPL"},
94 {FC_ELS_FAN , "FAN"},
95 {FC_ELS_RSCN , "RSCN"},
96 {FC_ELS_SCR , "SCR"},
97 {FC_ELS_RNFT , "RNFT"},
98 {FC_ELS_LINIT , "LINIT"},
99 {FC_ELS_LSTS , "LSTS"},
100 {FC_ELS_RNID , "RNID"},
101 {FC_ELS_RLIR , "RLIR"},
102 {FC_ELS_LIRR , "LIRR"},
103 {FC_ELS_SRL , "SRL"},
104 {FC_ELS_RPSC , "RPSC"},
105 {FC_ELS_LKA , "LKA"},
106 {FC_ELS_AUTH , "AUTH"},
107 {FC_ELS_CBIND , "CBIND"},
108 {FC_ELS_UNBIND , "UNBIND"},
109 {0, NULL}
112 /* Reject Reason Codes */
113 #define FC_ELS_RJT_INVCMDCODE 0x01
114 #define FC_ELS_RJT_LOGERR 0x03
115 #define FC_ELS_RJT_LOGBSY 0x05
116 #define FC_ELS_RJT_PROTERR 0x07
117 #define FC_ELS_RJT_GENFAIL 0x09
118 #define FC_ELS_RJT_CMDNOTSUPP 0x0B
119 #define FC_ELS_RJT_GENFAIL2 0x0D
120 #define FC_ELS_RJT_CMDINPROG 0x0E
121 #define FC_ELS_RJT_FIP 0x20
122 #define FC_ELS_RJT_VENDOR 0xFF
124 static const value_string fc_els_rjt_val[] = {
125 {FC_ELS_RJT_INVCMDCODE, "Invalid Cmd Code"},
126 {FC_ELS_RJT_LOGERR , "Logical Error"},
127 {FC_ELS_RJT_LOGBSY , "Logical Busy"},
128 {FC_ELS_RJT_PROTERR , "Protocol Error"},
129 {FC_ELS_RJT_GENFAIL , "Unable to Perform Cmd"},
130 {FC_ELS_RJT_CMDNOTSUPP, "Command Not Supported"},
131 {FC_ELS_RJT_GENFAIL2 , "Unable to Perform Cmd"},
132 {FC_ELS_RJT_CMDINPROG , "Command in Progress Already"},
133 {FC_ELS_RJT_FIP , "FIP Error"},
134 {FC_ELS_RJT_VENDOR , "Vendor Unique Error"},
135 {0, NULL}
138 #define FC_ELS_RJT_DET_NODET 0x00
139 #define FC_ELS_RJT_DET_SVCPARM_OPT 0x01
140 #define FC_ELS_RJT_DET_SVCPARM_INITCTL 0x03
141 #define FC_ELS_RJT_DET_SVCPARM_RCPTCTL 0x05
142 #define FC_ELS_RJT_DET_SVCPARM_RCVSZE 0x07
143 #define FC_ELS_RJT_DET_SVCPARM_CSEQ 0x09
144 #define FC_ELS_RJT_DET_SVCPARM_CREDIT 0x0B
145 #define FC_ELS_RJT_DET_INV_PFNAME 0x0D
146 #define FC_ELS_RJT_DET_INV_NFNAME 0x0E
147 #define FC_ELS_RJT_DET_INV_CMNSVCPARM 0x0F
148 #define FC_ELS_RJT_DET_INV_ASSOCHDR 0x11
149 #define FC_ELS_RJT_DET_ASSOCHDR_REQD 0x13
150 #define FC_ELS_RJT_DET_INV_OSID 0x15
151 #define FC_ELS_RJT_DET_EXCHG_COMBO 0x17
152 #define FC_ELS_RJT_DET_CMDINPROG 0x19
153 #define FC_ELS_RJT_DET_PLOGI_REQ 0x1E
154 #define FC_ELS_RJT_DET_INV_NPID 0x1F
155 #define FC_ELS_RJT_DET_INV_SEQID 0x21
156 #define FC_ELS_RJT_DET_INV_EXCHG 0x23
157 #define FC_ELS_RJT_DET_INACTIVE_EXCHG 0x25
158 #define FC_ELS_RJT_DET_RQUAL_REQD 0x27
159 #define FC_ELS_RJT_DET_OORSRC 0x29
160 #define FC_ELS_RJT_DET_SUPPLYFAIL 0x2A
161 #define FC_ELS_RJT_DET_REQNOTSUPP 0x2C
162 #define FC_ELS_RJT_DET_INV_PLEN 0x2D
163 #define FC_ELS_RJT_DET_INV_ALIASID 0x30
164 #define FC_ELS_RJT_DET_OORSRC_ALIASID 0x31
165 #define FC_ELS_RJT_DET_INACTIVE_ALIASID 0x32
166 #define FC_ELS_RJT_DET_DEACT_ALIAS_FAIL1 0x33
167 #define FC_ELS_RJT_DET_DEACT_ALIAS_FAIL2 0x34
168 #define FC_ELS_RJT_DET_SVCPARM_CONFLICT 0x35
169 #define FC_ELS_RJT_DET_INV_ALIASTOK 0x36
170 #define FC_ELS_RJT_DET_UNSUPP_ALIASTOK 0x37
171 #define FC_ELS_RJT_DET_GRPFORM_FAIL 0x38
172 #define FC_ELS_RJT_DET_QOSPARM_ERR 0x40
173 #define FC_ELS_RJT_DET_INV_VCID 0x41
174 #define FC_ELS_RJT_DET_OORSRC_C4 0x42
175 #define FC_ELS_RJT_DET_INV_PNNAME 0x44
176 #define FC_ELS_RJT_DET_AUTH_REQD 0x48
177 #define FC_ELS_RJT_DET_NOT_NEIGHBOR 0x62
179 static const value_string fc_els_rjt_det_val[] = {
180 {FC_ELS_RJT_DET_NODET , "No further details"},
181 {FC_ELS_RJT_DET_SVCPARM_OPT , "Svc Param - Options Error"},
182 {FC_ELS_RJT_DET_SVCPARM_INITCTL , "Svc Param - Initiator Ctl Error"},
183 {FC_ELS_RJT_DET_SVCPARM_RCPTCTL , "Svc Param - Recipient Ctl Error"},
184 {FC_ELS_RJT_DET_SVCPARM_RCVSZE , "Svc Param - Recv Size Error"},
185 {FC_ELS_RJT_DET_SVCPARM_CSEQ , "Svc Param - Concurrent Seq Error"},
186 {FC_ELS_RJT_DET_SVCPARM_CREDIT , "Svc Param - Credit Error"},
187 {FC_ELS_RJT_DET_INV_PFNAME , "Invalid N_/F_Port Name"},
188 {FC_ELS_RJT_DET_INV_NFNAME , "Invalid Node/Fabric Name"},
189 {FC_ELS_RJT_DET_INV_CMNSVCPARM , "Invalid Common Svc Param"},
190 {FC_ELS_RJT_DET_INV_ASSOCHDR , "Invalid Association Header"},
191 {FC_ELS_RJT_DET_ASSOCHDR_REQD , "Association Header Reqd"},
192 {FC_ELS_RJT_DET_INV_OSID , "Invalid Orig S_ID"},
193 {FC_ELS_RJT_DET_EXCHG_COMBO , "Invalid OXID-RXID Combo"},
194 {FC_ELS_RJT_DET_CMDINPROG , "Cmd Already in Progress"},
195 {FC_ELS_RJT_DET_PLOGI_REQ , "N_Port Login Required"},
196 {FC_ELS_RJT_DET_INV_NPID , "Invalid N_Port Id"},
197 {FC_ELS_RJT_DET_INV_SEQID , "Invalid SeqID"},
198 {FC_ELS_RJT_DET_INV_EXCHG , "Attempt to Abort Invalid Exchg"},
199 {FC_ELS_RJT_DET_INACTIVE_EXCHG , "Attempt to Abort Inactive Exchg"},
200 {FC_ELS_RJT_DET_RQUAL_REQD , "Resource Qualifier Required"},
201 {FC_ELS_RJT_DET_OORSRC , "Insufficient Resources for Login"},
202 {FC_ELS_RJT_DET_SUPPLYFAIL , "Unable to Supply Req Data"},
203 {FC_ELS_RJT_DET_REQNOTSUPP , "Command Not Supported"},
204 {FC_ELS_RJT_DET_INV_PLEN , "Invalid Payload Length"},
205 {FC_ELS_RJT_DET_INV_ALIASID , "No Alias IDs available"},
206 {FC_ELS_RJT_DET_OORSRC_ALIASID , "Alias_ID Cannot be Activated (Out of Rsrc)"},
207 {FC_ELS_RJT_DET_INACTIVE_ALIASID , "Alias_ID Cannot be Activated (Inv AID)"},
208 {FC_ELS_RJT_DET_DEACT_ALIAS_FAIL1, "Alias_ID Cannot be Deactivated"},
209 {FC_ELS_RJT_DET_DEACT_ALIAS_FAIL2, "Alias_ID Cannot be Deactivated"},
210 {FC_ELS_RJT_DET_SVCPARM_CONFLICT , "Svc Parameter Conflict"},
211 {FC_ELS_RJT_DET_INV_ALIASTOK , "Invalid Alias Token"},
212 {FC_ELS_RJT_DET_UNSUPP_ALIASTOK , "Unsupported Alias Token"},
213 {FC_ELS_RJT_DET_GRPFORM_FAIL , "Alias Grp Cannot be Formed"},
214 {FC_ELS_RJT_DET_QOSPARM_ERR , "QoS Param Error"},
215 {FC_ELS_RJT_DET_INV_VCID , "VC_ID Not Found"},
216 {FC_ELS_RJT_DET_OORSRC_C4 , "No Resources to Support Class 4 Conn"},
217 {FC_ELS_RJT_DET_INV_PNNAME , "Invalid Port/Node Name"},
218 {FC_ELS_RJT_DET_AUTH_REQD , "Authentication Required"},
219 {FC_ELS_RJT_DET_NOT_NEIGHBOR , "VN2VN_Port not in Neighbor Set"},
220 {0, NULL}
223 static const value_string fc_els_flacompliance_val[] = {
224 {1, "FC-FLA Level 1"},
225 {2, "FC-FLA Level 2"},
226 {0, NULL}
229 static const value_string fc_els_loopstate_val[] = {
230 {1, "Online"},
231 {2, "Loop Failure"},
232 {3, "Initialization Failure"},
233 {4, "Initializing"},
234 {0, NULL}
237 static const value_string fc_els_scr_reg_val[] = {
238 {1, "Fabric Detected Regn"},
239 {2, "N_Port Detected Regn"},
240 {3, "Full Regn"},
241 {255, "Clear All Regn"},
242 {0, NULL}
245 static const value_string fc_els_farp_respaction_val[] = {
246 {0, "No Action"},
247 {1, "Login Using Requesting Port ID"},
248 {2, "Respond with FARP-REPLY"},
249 {3, "Login & send FARP-REPLY"},
250 {0, NULL}
253 static const value_string fc_els_portstatus_val[] = {
254 {0x20, "Point-to-Point Connection | No Fabric"},
255 {0x10, "AL Connection | No Fabric"},
256 {0x28, "Point-to-Point Connection | Fabric Detected"},
257 {0x2C, "Point-to-Point Connection | Fabric Detected | Loss of Signal"},
258 {0x24, "Point-to-Point Connection | Loss of Signal"},
259 {0x18, "AL Connection | Fabric Detected"},
260 {0x14, "AL Connection | Loss of Signal"},
261 {0x1C, "AL Connection | Fabric Detected | Loss of Signal"},
262 {0x04, "Loss of Signal"},
263 {0x02, "Loss of Synchronization"},
264 {0x01, "Link Reset Protocol in Progress"},
265 {0, NULL}
268 static const value_string fc_els_portspeed_val[] = {
269 {0x8000, "1 Gb"},
270 {0x4000, "2 Gb"},
271 {0x2000, "4 Gb"},
272 {0x1000, "10 Gb"},
273 {0x0002, "Unknown"},
274 {0x0001, "Speed Not Estd."},
275 {0, NULL}
278 static const value_string fc_els_lirr_regfunc_val[] = {
279 {0x1, "Set Reg: Conditionally Receive"},
280 {0x2, "Set Reg: Always Receive"},
281 {0xFF, "Clear Reg"},
282 {0, NULL}
285 static const value_string fc_els_rscn_evqual_val[] = {
286 {0x00, "Event is not specified"},
287 {0x01, "Changed Name Server Object"},
288 {0x02, "Changed Port Attribute"},
289 {0x03, "Changed Service Object"},
290 {0x04, "Changed Switch Config"},
291 {0, NULL}
294 static const value_string fc_els_rscn_addrfmt_val[] = {
295 {0, "Port Addr (single N/L Port or service)"},
296 {1, "Area Addr Group (area of E/L/N Port addresses)"},
297 {2, "Domain Addr Group"},
298 {3, "Fabric Addr Group"},
299 {0, NULL}
302 static const value_string fc_els_nodeid_val[] = {
303 {0x00, "Common Identification Data Only"},
304 {0x05, "IP Specific Data"},
305 {0x08, "FCP-Specific Data"},
306 {0x20, "FC_CT Specific Data"},
307 {0x22, "SW_ILS Specific Data"},
308 {0x23, "AL Specific Data"},
309 {0x24, "SNMP Specific Data"},
310 {0xDF, "Common ID Data + General Topology Discovery Format"},
311 {0, NULL}
314 static const value_string fc_els_rnid_asstype_val[] = {
315 {0x0, "Reserved"},
316 {0x1, "Unknown"},
317 {0x2, "Other"},
318 {0x3, "Hub"},
319 {0x4, "Switch"},
320 {0x5, "Gateway"},
321 {0x6, "Converter"},
322 {0x7, "HBA"},
323 {0x9, "Storage Device"},
324 {0xA, "Host"},
325 {0xB, "Storage Subsystem"},
326 {0xE, "Storage Access Device"},
327 {0x11, "NAS Device"},
328 {0, NULL}
331 static const value_string fc_els_rnid_mgmt_val[] = {
332 {0, "IP/UDP/SNMP"},
333 {1, "IP/TCP/Telnet"},
334 {2, "IP/TCP/HTTP"},
335 {3, "IP/TCP/HTTPS"},
336 {0, NULL}
339 static const value_string fc_els_rnid_ipvers_val[] = {
340 {0, "None"},
341 {1, "IPv4"},
342 {2, "IPv6"},
343 {0, NULL}
346 #endif