MSWSP: fix dissect_mswsp_smb()
[wireshark-wip.git] / epan / dissectors / packet-fcswils.h
blob635b45a1c84ee508c3d718c4d6776c6bb5645c08
1 /* packet-fcswils.h
2 * Fibre Channel Switch InterLink Services Definitions
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_FCSWILS_H_
27 #define __PACKET_FCSWILS_H_
29 /* Command codes */
30 #define FC_SWILS_SWRJT 0x01
31 #define FC_SWILS_SWACC 0x02
32 #define FC_SWILS_ELP 0x10
33 #define FC_SWILS_EFP 0x11
34 #define FC_SWILS_DIA 0x12
35 #define FC_SWILS_RDI 0x13
36 #define FC_SWILS_HLO 0x14
37 #define FC_SWILS_LSU 0x15
38 #define FC_SWILS_LSA 0x16
39 #define FC_SWILS_BF 0x17
40 #define FC_SWILS_RCF 0x18
41 #define FC_SWILS_RSCN 0x1B
42 #define FC_SWILS_DRLIR 0x1E
43 #define FC_SWILS_DSCN 0x20
44 #define FC_SWILS_LOOPD 0x21
45 #define FC_SWILS_MR 0x22
46 #define FC_SWILS_ACA 0x23
47 #define FC_SWILS_RCA 0x24
48 #define FC_SWILS_SFC 0x25
49 #define FC_SWILS_UFC 0x26
50 #define FC_SWILS_ESC 0x30
51 #define FC_SWILS_ESS 0x31
52 #define FC_SWILS_MRRA 0x34
53 #define FC_SWILS_AUTH_ILS 0x40
54 #define FC_SWILS_MAXCODE 0x35 /* the dissector jump table is sized to
55 this table */
57 /* Reject reason codes */
59 #define FC_SWILS_RJT_INVCODE 0x01
60 #define FC_SWILS_RJT_INVVER 0x02
61 #define FC_SWILS_RJT_LOGERR 0x03
62 #define FC_SWILS_RJT_INVSIZE 0x04
63 #define FC_SWILS_RJT_LOGBSY 0x05
64 #define FC_SWILS_RJT_PROTERR 0x07
65 #define FC_SWILS_RJT_GENFAIL 0x09
66 #define FC_SWILS_RJT_CMDNOTSUPP 0x0B
67 #define FC_SWILS_RJT_VENDUNIQ 0xFF
69 /* Detailed reason code defines */
70 #define FC_SWILS_RJT_NODET 0x0
71 #define FC_SWILS_RJT_CLSF_ERR 0x1
72 #define FC_SWILS_RJT_CLSN_ERR 0x3
73 #define FC_SWILS_RJT_INVFC_CODE 0x4
74 #define FC_SWILS_RJT_INVFC_PARM 0x5
75 #define FC_SWILS_RJT_INV_PNAME 0xD
76 #define FC_SWILS_RJT_INV_SNAME 0xE
77 #define FC_SWILS_RJT_TOV_MSMTCH 0xF
78 #define FC_SWILS_RJT_INV_DIDLST 0x10
79 #define FC_SWILS_RJT_CMD_INPROG 0x19
80 #define FC_SWILS_RJT_OORSRC 0x29
81 #define FC_SWILS_RJT_NO_DID 0x2A
82 #define FC_SWILS_RJT_INV_DID 0x2B
83 #define FC_SWILS_RJT_NO_REQ 0x2C
84 #define FC_SWILS_RJT_NOLNK_PARM 0x2D
85 #define FC_SWILS_RJT_NO_REQDID 0x2E
86 #define FC_SWILS_RJT_EP_ISOL 0x2F
88 typedef struct _fcswils_elp {
89 guint8 revision;
90 guint8 flags[2];
91 guint8 rsvd1;
92 guint32 r_a_tov;
93 guint32 e_d_tov;
94 guint8 req_epname[8];
95 guint8 req_sname[8];
96 guint8 clsf_svcparm[6];
97 guint16 clsf_rcvsize;
98 guint16 clsf_conseq;
99 guint16 clsf_e2e;
100 guint16 clsf_openseq;
101 guint16 rsvd;
102 guint8 cls1_svcparm[2];
103 guint16 cls1_rcvsize;
104 guint8 cls2_svcparm[2];
105 guint16 cls2_rcvsize;
106 guint8 cls3_svcparm[2];
107 guint16 cls3_rcvsize;
108 guint8 rsvd2[20];
109 guint16 isl_flwctrl_mode;
110 guint16 flw_ctrl_parmlen;
111 guint32 b2b_credit;
112 guint32 compat_p1;
113 guint32 compat_p2;
114 guint32 compat_p3;
115 guint32 compat_p4;
116 } fcswils_elp;
117 #define FC_SWILS_ELP_SIZE 100
119 #define FC_SWILS_ELP_FC_VENDOR 0x1
120 #define FC_SWILS_ELP_FC_RRDY 0x2
122 struct _fcswils_efp_didrec {
123 guint8 rec_type;
124 guint8 dom_id;
125 guint16 rsvd1;
126 guint32 rsvd2;
127 guint8 sname[8];
129 struct _fcswils_efp_mcastrec {
130 guint8 rec_type;
131 guint8 mcast_grpnum;
132 guint8 rsvd[14];
135 typedef union _fcswils_efp_listrec {
136 struct _fcswils_efp_didrec didrec;
137 struct _fcswils_efp_mcastrec mcastrec;
138 } fcswils_efp_listrec;
140 #define FC_SWILS_LRECTYPE_DOMAIN 0x1
141 #define FC_SWILS_LRECTYPE_MCAST 0x2
143 typedef struct _fcswils_efp {
144 guint8 opcode;
145 guint8 reclen;
146 guint16 payload_len;
147 guint8 rsvd1[3];
148 guint8 pswitch_prio;
149 guint8 pswitch_name[8];
150 } fcswils_efp;
151 #define FC_SWILS_EFP_SIZE 16
153 typedef struct _fcswils_dia {
154 guint8 switch_name[8];
155 guint8 rsvd[4];
156 } fcswils_dia;
158 typedef struct _fcswils_rdi_req {
159 guint8 rsvd[3];
160 guint8 domain_id;
161 } fcswils_rdi_req;
162 #define FC_SWILS_RDIREQ_SIZE 4
164 #define FC_SWILS_LSR_SLR 0x1 /* switch link record */
165 #define FC_SWILS_LSR_ARS 0x2 /* AR Summary record */
167 #define FC_SWILS_PDESC_FSPF_BB 0x01
168 #define FC_SWILS_PDESC_FSPF 0x02
170 #define FC_SWILS_ZONEOBJ_ZONESET 1
171 #define FC_SWILS_ZONEOBJ_ZONE 2
172 #define FC_SWILS_ZONEOBJ_ZONEALIAS 3
174 #define FC_SWILS_ZONEMBR_WWN 1
175 #define FC_SWILS_ZONEMBR_DP 2
176 #define FC_SWILS_ZONEMBR_FCID 3
177 #define FC_SWILS_ZONEMBR_ALIAS 4
178 #define FC_SWILS_ZONEMBR_WWN_LUN 0xE1
179 #define FC_SWILS_ZONEMBR_DP_LUN 0xE2
180 #define FC_SWILS_ZONEMBR_FCID_LUN 0xE3
182 extern const value_string fc_swils_zonembr_type_val[];
184 #endif