1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
|
/* packet-fcswils.h
* Fibre Channel Switch InterLink Services Definitions
* Copyright 2001 Dinesh G Dutt (ddutt@cisco.com)
*
* $Id: packet-fcswils.h,v 1.1 2002/12/08 02:32:17 gerald Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PACKET_FCSWILS_H_
#define __PACKET_FCSWILS_H_
/* Command codes */
#define FC_SWILS_SWRJT 0x01
#define FC_SWILS_SWACC 0x02
#define FC_SWILS_ELP 0x10
#define FC_SWILS_EFP 0x11
#define FC_SWILS_DIA 0x12
#define FC_SWILS_RDI 0x13
#define FC_SWILS_HLO 0x14
#define FC_SWILS_LSU 0x15
#define FC_SWILS_LSA 0x16
#define FC_SWILS_BF 0x17
#define FC_SWILS_RCF 0x18
#define FC_SWILS_RSCN 0x1B
#define FC_SWILS_DRLIR 0x1E
#define FC_SWILS_DSCN 0x20
#define FC_SWILS_LOOPD 0x21
#define FC_SWILS_MR 0x22
#define FC_SWILS_ACA 0x23
#define FC_SWILS_RCA 0x24
#define FC_SWILS_SFC 0x25
#define FC_SWILS_UFC 0x26
#define FC_SWILS_ESC 0x30
/* Used in filters */
static const value_string fc_swils_opcode_key_val[] = {
{FC_SWILS_SWRJT , "SW_RJT"},
{FC_SWILS_SWACC , "SW_ACC"},
{FC_SWILS_ELP , "ELP"},
{FC_SWILS_EFP , "EFP"},
{FC_SWILS_DIA , "DIA"},
{FC_SWILS_RDI , "RDI"},
{FC_SWILS_HLO , "HLO"},
{FC_SWILS_LSU , "LSU"},
{FC_SWILS_LSA , "LSA"},
{FC_SWILS_BF , "BF"},
{FC_SWILS_RCF , "RCF"},
{FC_SWILS_RSCN , "SW_RSCN"},
{FC_SWILS_DRLIR , "DRLIR"},
{FC_SWILS_DSCN , "DSCN"},
{FC_SWILS_LOOPD , "LOOPD"},
{FC_SWILS_MR , "MR"},
{FC_SWILS_ACA , "ACA"},
{FC_SWILS_RCA , "RCA"},
{FC_SWILS_SFC , "SFC"},
{FC_SWILS_UFC , "UFC"},
{FC_SWILS_ESC , "ESC"},
{0, NULL},
};
/* Used in Info field */
static const value_string fc_swils_opcode_val[] = {
{FC_SWILS_SWRJT , "SW_RJT"},
{FC_SWILS_SWACC , "SW_ACC"},
{FC_SWILS_ELP , "ELP"},
{FC_SWILS_EFP , "EFP"},
{FC_SWILS_DIA , "Domain ID Assigned"},
{FC_SWILS_RDI , "Request Domain ID"},
{FC_SWILS_HLO , "Hello"},
{FC_SWILS_LSU , "Link State Update"},
{FC_SWILS_LSA , "Link State Ack"},
{FC_SWILS_BF , "Build Fabric"},
{FC_SWILS_RCF , "Reconfigure Fabric"},
{FC_SWILS_RSCN , "Interswitch RSCN"},
{FC_SWILS_DRLIR , "DRLIR"},
{FC_SWILS_DSCN , "SW_RSCN"},
{FC_SWILS_LOOPD , "LOOPD"},
{FC_SWILS_MR , "Merge Req"},
{FC_SWILS_ACA , "Acquire Change Auth"},
{FC_SWILS_RCA , "Release Change Auth"},
{FC_SWILS_SFC , "Stage Fabric Conf"},
{FC_SWILS_UFC , "Update Fabric Conf"},
{FC_SWILS_ESC , "ESC"},
{0, NULL},
};
/* Reject reason codes */
#define FC_SWILS_RJT_INVCODE 0x01
#define FC_SWILS_RJT_INVVER 0x02
#define FC_SWILS_RJT_LOGERR 0x03
#define FC_SWILS_RJT_INVSIZE 0x04
#define FC_SWILS_RJT_LOGBSY 0x05
#define FC_SWILS_RJT_PROTERR 0x07
#define FC_SWILS_RJT_GENFAIL 0x09
#define FC_SWILS_RJT_CMDNOTSUPP 0x0B
#define FC_SWILS_RJT_VENDUNIQ 0xFF
static const value_string fc_swils_rjt_val [] = {
{FC_SWILS_RJT_INVCODE , "Invalid Cmd Code"},
{FC_SWILS_RJT_INVVER , "Invalid Revision"},
{FC_SWILS_RJT_LOGERR , "Logical Error"},
{FC_SWILS_RJT_INVSIZE , "Invalid Size"},
{FC_SWILS_RJT_LOGBSY , "Logical Busy"},
{FC_SWILS_RJT_PROTERR , "Protocol Error"},
{FC_SWILS_RJT_GENFAIL , "Unable to Perform"},
{FC_SWILS_RJT_CMDNOTSUPP, "Unsupported Cmd"},
{FC_SWILS_RJT_VENDUNIQ , "Vendor Unique Err"},
{0, NULL},
};
/* Detailed reason code defines */
#define FC_SWILS_RJT_NODET 0x0
#define FC_SWILS_RJT_CLSF_ERR 0x1
#define FC_SWILS_RJT_CLSN_ERR 0x3
#define FC_SWILS_RJT_INVFC_CODE 0x4
#define FC_SWILS_RJT_INVFC_PARM 0x5
#define FC_SWILS_RJT_INV_PNAME 0xD
#define FC_SWILS_RJT_INV_SNAME 0xE
#define FC_SWILS_RJT_TOV_MSMTCH 0xF
#define FC_SWILS_RJT_INV_DIDLST 0x10
#define FC_SWILS_RJT_CMD_INPROG 0x19
#define FC_SWILS_RJT_OORSRC 0x29
#define FC_SWILS_RJT_NO_DID 0x2A
#define FC_SWILS_RJT_INV_DID 0x2B
#define FC_SWILS_RJT_NO_REQ 0x2C
#define FC_SWILS_RJT_NOLNK_PARM 0x2D
#define FC_SWILS_RJT_NO_REQDID 0x2E
#define FC_SWILS_RJT_EP_ISOL 0x2F
static const value_string fc_swils_deterr_val [] = {
{FC_SWILS_RJT_NODET , "No Additional Details"},
{FC_SWILS_RJT_CLSF_ERR , "Class F Svc Param Err"},
{FC_SWILS_RJT_CLSN_ERR , "Class N Svc Param Err"},
{FC_SWILS_RJT_INVFC_CODE , "Unknown Flow Ctrl Code"},
{FC_SWILS_RJT_INVFC_PARM , "Invalid Flow Ctrl Parm"},
{FC_SWILS_RJT_INV_PNAME , "Invalid Port Name"},
{FC_SWILS_RJT_INV_SNAME , "Invalid Switch Name"},
{FC_SWILS_RJT_TOV_MSMTCH , "R_A_/E_D_TOV Mismatch"},
{FC_SWILS_RJT_INV_DIDLST, "Invalid Domain ID List"},
{FC_SWILS_RJT_CMD_INPROG , "Cmd Already in Progress"},
{FC_SWILS_RJT_OORSRC , "Insufficient Resources"},
{FC_SWILS_RJT_NO_DID , "Domain ID Unavailable"},
{FC_SWILS_RJT_INV_DID, "Invalid Domain ID"},
{FC_SWILS_RJT_NO_REQ , "Request Not Supported"},
{FC_SWILS_RJT_NOLNK_PARM , "Link Parm Not Estd."},
{FC_SWILS_RJT_NO_REQDID , "Group of Domain IDs Unavail"},
{FC_SWILS_RJT_EP_ISOL , "E_Port Isolated"},
{0, NULL}
};
typedef struct _fcswils_elp {
guint8 revision;
guint8 flags[2];
guint8 rsvd1;
guint32 r_a_tov;
guint32 e_d_tov;
guint8 req_epname[8];
guint8 req_sname[8];
guint8 clsf_svcparm[6];
guint16 clsf_rcvsize;
guint16 clsf_conseq;
guint16 clsf_e2e;
guint16 clsf_openseq;
guint16 rsvd;
guint8 cls1_svcparm[2];
guint16 cls1_rcvsize;
guint8 cls2_svcparm[2];
guint16 cls2_rcvsize;
guint8 cls3_svcparm[2];
guint16 cls3_rcvsize;
guint8 rsvd2[20];
guint16 isl_flwctrl_mode;
guint16 flw_ctrl_parmlen;
guint32 b2b_credit;
guint32 compat_p1;
guint32 compat_p2;
guint32 compat_p3;
guint32 compat_p4;
} fcswils_elp;
#define FC_SWILS_ELP_SIZE 100
#define FC_SWILS_ELP_FC_VENDOR 0x1
#define FC_SWILS_ELP_FC_RRDY 0x2
static const value_string fcswils_elp_fc_val[] = {
{FC_SWILS_ELP_FC_VENDOR, "Vendor Unique"},
{FC_SWILS_ELP_FC_RRDY, "R_RDY Flow Ctrl"},
{0, NULL},
};
struct _fcswils_efp_didrec {
guint8 rec_type;
guint8 dom_id;
guint16 rsvd1;
guint32 rsvd2;
guint8 sname[8];
};
struct _fcswils_efp_mcastrec {
guint8 rec_type;
guint8 mcast_grpnum;
guint8 rsvd[14];
};
typedef union _fcswils_efp_listrec {
struct _fcswils_efp_didrec didrec;
struct _fcswils_efp_mcastrec mcastrec;
} fcswils_efp_listrec;
#define FC_SWILS_LRECTYPE_DOMAIN 0x1
#define FC_SWILS_LRECTYPE_MCAST 0x2
static const value_string fcswils_rectype_val[] = {
{FC_SWILS_LRECTYPE_DOMAIN, "Domain ID List Rec"},
{FC_SWILS_LRECTYPE_MCAST, "Multicast ID List Rec"},
{0, NULL},
};
typedef struct _fcswils_efp {
guint8 opcode;
guint8 reclen;
guint16 payload_len;
guint8 rsvd1[3];
guint8 pswitch_prio;
guint8 pswitch_name[8];
fcswils_efp_listrec *listrec;
} fcswils_efp;
#define FC_SWILS_EFP_SIZE 16 /* not including listrec */
typedef struct _fcswils_dia {
guint8 switch_name[8];
guint8 rsvd[4];
} fcswils_dia;
typedef struct _fcswils_rdi_req {
guint8 rsvd[3];
guint8 domain_id;
} fcswils_rdi_req;
#define FC_SWILS_RDIREQ_SIZE 4
static const value_string fc_swils_link_type_val[] = {
{0x01, "P2P Link"},
{0xF0, "Vendor Specific"},
{0xF1, "Vendor Specific"},
{0xF2, "Vendor Specific"},
{0xF3, "Vendor Specific"},
{0xF4, "Vendor Specific"},
{0xF5, "Vendor Specific"},
{0xF6, "Vendor Specific"},
{0xF7, "Vendor Specific"},
{0xF8, "Vendor Specific"},
{0xF9, "Vendor Specific"},
{0xFA, "Vendor Specific"},
{0xFB, "Vendor Specific"},
{0xFC, "Vendor Specific"},
{0xFD, "Vendor Specific"},
{0xFE, "Vendor Specific"},
{0xFF, "Vendor Specific"},
{0, NULL},
};
#define FC_SWILS_LSR_SLR 0x1 /* switch link record */
#define FC_SWILS_LSR_ARS 0x2 /* AR Summary record */
static const value_string fc_swils_fspf_linkrec_val[] = {
{FC_SWILS_LSR_SLR, "Switch Link Record"},
{FC_SWILS_LSR_ARS, "AR Summary Record"},
{0, NULL},
};
static const value_string fc_swils_fspf_lsrflags_val[] = {
{0x0, "LSR is for a Topology Update"},
{0x1, "LSR is for Initial DB Sync | Not the last seq in DB sync"},
{0x2, "Last Seq in DB Sync. LSU has no LSRs"},
{0x3, "LSR is for Initial DB Sync | Last Seq in DB Sync"},
{0, NULL},
};
#define FC_SWILS_PDESC_FSPF_BB 0x01
#define FC_SWILS_PDESC_FSPF 0x02
static const value_string fc_swils_rscn_portstate_val[] = {
{0, "No Additional Info"},
{1, "Port is online"},
{2, "Port is offline"},
{0, NULL},
};
static const value_string fc_swils_rscn_addrfmt_val[] = {
{0, "Port Addr Format"},
{1, "Area Addr Format"},
{2, "Domain Addr Format"},
{3, "Fabric Addr Format"},
};
static const value_string fc_swils_rscn_detectfn_val[] = {
{1, "Fabric Detected"},
{2, "N_Port Detected"},
{0, NULL},
};
static const value_string fc_swils_esc_protocol_val[] = {
{0, "Reserved"},
{1, "FSPF-Backbone Protocol"},
{2, "FSPF Protocol"},
{0, NULL},
};
#define FC_SWILS_ZONEOBJ_ZONESET 1
#define FC_SWILS_ZONEOBJ_ZONE 2
#define FC_SWILS_ZONEOBJ_ZONEALIAS 3
static const value_string fc_swils_zoneobj_type_val[] = {
{0, "Reserved"},
{FC_SWILS_ZONEOBJ_ZONESET , "Zone Set"},
{FC_SWILS_ZONEOBJ_ZONE , "Zone"},
{FC_SWILS_ZONEOBJ_ZONEALIAS, "Zone Alias"},
{0, NULL},
};
#define FC_SWILS_ZONEMBR_WWN 1
#define FC_SWILS_ZONEMBR_DP 2
#define FC_SWILS_ZONEMBR_FCID 3
#define FC_SWILS_ZONEMBR_ALIAS 4
#define FC_SWILS_ZONEMBR_WWN_LUN 0xE1
#define FC_SWILS_ZONEMBR_DP_LUN 0xE2
#define FC_SWILS_ZONEMBR_FCID_LUN 0xE3
static const value_string fc_swils_zonembr_type_val[] = {
{0, "Reserved"},
{FC_SWILS_ZONEMBR_WWN, "WWN"},
{FC_SWILS_ZONEMBR_DP, "Domain/Physical Port (0x00ddpppp)"},
{FC_SWILS_ZONEMBR_FCID, "FC Address"},
{FC_SWILS_ZONEMBR_ALIAS, "Zone Alias"},
{FC_SWILS_ZONEMBR_WWN_LUN, "WWN+LUN"},
{FC_SWILS_ZONEMBR_DP_LUN, "Domain/Physical Port+LUN"},
{FC_SWILS_ZONEMBR_FCID_LUN, "FCID+LUN"},
{0, NULL},
};
static const value_string fc_swils_mr_rsp_val[] = {
{0, "Successful"},
{1, "Fabric Busy"},
{2, "Failed"},
{0, NULL},
};
static const value_string fc_swils_mr_reason_val[] = {
{0x0, "No Reason"},
{0x1, "Invalid Data Length"},
{0x2, "Unsupported Command"},
{0x3, "Reserved"},
{0x4, "Not Authorized"},
{0x5, "Invalid Request"},
{0x6, "Fabric Changing"},
{0x7, "Update Not Staged"},
{0x8, "Invalid Zone Set Format"},
{0x9, "Invalid Data"},
{0xA, "Cannot Merge"},
{0, NULL},
};
static const value_string fc_swils_sfc_op_val[] = {
{0, "Reserved"},
{1, "Reserved"},
{2, "Reserved"},
{3, "Activate Zone Set"},
{4, "Deactivate Zone Set"},
{0, NULL},
};
#endif
|