connectionless cancel PDU's don't have a dg_server_accepting_cancels field
[obnox/wireshark/wip.git] / packet-fcswils.h
1 /* packet-fcswils.h
2  * Fibre Channel Switch InterLink Services Definitions
3  * Copyright 2001 Dinesh G Dutt (ddutt@cisco.com)
4  *
5  * $Id: packet-fcswils.h,v 1.3 2003/10/30 02:06:12 guy Exp $
6  *
7  * Ethereal - Network traffic analyzer
8  * By Gerald Combs <gerald@ethereal.com>
9  * Copyright 1998 Gerald Combs
10  * 
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.
15  * 
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.
20  * 
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #ifndef __PACKET_FCSWILS_H_
27 #define __PACKET_FCSWILS_H_
28
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_AUTH_ILS       0x40
52
53 /* Reject reason codes */
54
55 #define FC_SWILS_RJT_INVCODE       0x01
56 #define FC_SWILS_RJT_INVVER        0x02
57 #define FC_SWILS_RJT_LOGERR        0x03
58 #define FC_SWILS_RJT_INVSIZE       0x04
59 #define FC_SWILS_RJT_LOGBSY        0x05
60 #define FC_SWILS_RJT_PROTERR       0x07
61 #define FC_SWILS_RJT_GENFAIL       0x09
62 #define FC_SWILS_RJT_CMDNOTSUPP    0x0B
63 #define FC_SWILS_RJT_VENDUNIQ      0xFF
64
65 /* Detailed reason code defines */
66 #define FC_SWILS_RJT_NODET         0x0
67 #define FC_SWILS_RJT_CLSF_ERR      0x1
68 #define FC_SWILS_RJT_CLSN_ERR      0x3
69 #define FC_SWILS_RJT_INVFC_CODE    0x4
70 #define FC_SWILS_RJT_INVFC_PARM    0x5
71 #define FC_SWILS_RJT_INV_PNAME     0xD
72 #define FC_SWILS_RJT_INV_SNAME     0xE
73 #define FC_SWILS_RJT_TOV_MSMTCH    0xF
74 #define FC_SWILS_RJT_INV_DIDLST    0x10
75 #define FC_SWILS_RJT_CMD_INPROG    0x19
76 #define FC_SWILS_RJT_OORSRC        0x29
77 #define FC_SWILS_RJT_NO_DID        0x2A
78 #define FC_SWILS_RJT_INV_DID       0x2B
79 #define FC_SWILS_RJT_NO_REQ        0x2C
80 #define FC_SWILS_RJT_NOLNK_PARM    0x2D
81 #define FC_SWILS_RJT_NO_REQDID     0x2E
82 #define FC_SWILS_RJT_EP_ISOL       0x2F
83
84 typedef struct _fcswils_elp {
85     guint8 revision;
86     guint8 flags[2];
87     guint8 rsvd1;
88     guint32 r_a_tov;
89     guint32 e_d_tov;
90     guint8  req_epname[8];
91     guint8  req_sname[8];
92     guint8  clsf_svcparm[6];
93     guint16 clsf_rcvsize;
94     guint16 clsf_conseq;
95     guint16 clsf_e2e;
96     guint16 clsf_openseq;
97     guint16 rsvd;
98     guint8  cls1_svcparm[2];
99     guint16 cls1_rcvsize;
100     guint8  cls2_svcparm[2];
101     guint16 cls2_rcvsize;
102     guint8  cls3_svcparm[2];
103     guint16 cls3_rcvsize;
104     guint8  rsvd2[20];
105     guint16 isl_flwctrl_mode;
106     guint16 flw_ctrl_parmlen;
107     guint32 b2b_credit;
108     guint32 compat_p1;
109     guint32 compat_p2;
110     guint32 compat_p3;
111     guint32 compat_p4;
112 } fcswils_elp;
113 #define FC_SWILS_ELP_SIZE 100
114
115 #define FC_SWILS_ELP_FC_VENDOR   0x1
116 #define FC_SWILS_ELP_FC_RRDY     0x2
117
118 struct _fcswils_efp_didrec {
119     guint8 rec_type;
120     guint8 dom_id;
121     guint16 rsvd1;
122     guint32 rsvd2;
123     guint8  sname[8];
124 };
125 struct _fcswils_efp_mcastrec {
126     guint8 rec_type;
127     guint8 mcast_grpnum;
128     guint8 rsvd[14];
129 };
130
131 typedef union _fcswils_efp_listrec {
132     struct _fcswils_efp_didrec didrec;
133     struct _fcswils_efp_mcastrec mcastrec;
134 } fcswils_efp_listrec;
135
136 #define FC_SWILS_LRECTYPE_DOMAIN 0x1
137 #define FC_SWILS_LRECTYPE_MCAST  0x2
138
139 typedef struct _fcswils_efp {
140     guint8  opcode;
141     guint8  reclen;
142     guint16 payload_len;
143     guint8  rsvd1[3];
144     guint8  pswitch_prio;
145     guint8  pswitch_name[8];
146     fcswils_efp_listrec *listrec;
147 } fcswils_efp;
148 #define FC_SWILS_EFP_SIZE 16    /* not including listrec */
149
150 typedef struct _fcswils_dia {
151     guint8 switch_name[8];
152     guint8 rsvd[4];
153 } fcswils_dia;
154
155 typedef struct _fcswils_rdi_req {
156     guint8 rsvd[3];
157     guint8 domain_id;
158 } fcswils_rdi_req;
159 #define FC_SWILS_RDIREQ_SIZE 4
160
161 #define FC_SWILS_LSR_SLR    0x1 /* switch link record */
162 #define FC_SWILS_LSR_ARS    0x2 /* AR Summary record */
163
164 #define FC_SWILS_PDESC_FSPF_BB 0x01
165 #define FC_SWILS_PDESC_FSPF    0x02
166
167 #define FC_SWILS_ZONEOBJ_ZONESET    1
168 #define FC_SWILS_ZONEOBJ_ZONE       2
169 #define FC_SWILS_ZONEOBJ_ZONEALIAS  3
170
171 #define FC_SWILS_ZONEMBR_WWN             1
172 #define FC_SWILS_ZONEMBR_DP              2
173 #define FC_SWILS_ZONEMBR_FCID            3
174 #define FC_SWILS_ZONEMBR_ALIAS           4
175 #define FC_SWILS_ZONEMBR_WWN_LUN         0xE1
176 #define FC_SWILS_ZONEMBR_DP_LUN          0xE2
177 #define FC_SWILS_ZONEMBR_FCID_LUN        0xE3
178
179 extern const value_string fc_swils_zonembr_type_val[];
180
181 #endif