1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19#ifndef _FC_MS_H_
20#define _FC_MS_H_
21
22#include <linux/types.h>
23
24
25
26
27
28
29
30
31
32
33
34
35
36#define FC_FDMI_SUBTYPE 0x10
37
38
39
40
41enum fc_fdmi_req {
42 FC_FDMI_GRHL = 0x0100,
43 FC_FDMI_GHAT = 0x0101,
44 FC_FDMI_GRPL = 0x0102,
45 FC_FDMI_GPAT = 0x0110,
46 FC_FDMI_RHBA = 0x0200,
47 FC_FDMI_RHAT = 0x0201,
48 FC_FDMI_RPRT = 0x0210,
49 FC_FDMI_RPA = 0x0211,
50 FC_FDMI_DHBA = 0x0300,
51 FC_FDMI_DHAT = 0x0301,
52 FC_FDMI_DPRT = 0x0310,
53 FC_FDMI_DPA = 0x0311,
54};
55
56
57
58
59enum fc_fdmi_hba_attr_type {
60 FC_FDMI_HBA_ATTR_NODENAME = 0x0001,
61 FC_FDMI_HBA_ATTR_MANUFACTURER = 0x0002,
62 FC_FDMI_HBA_ATTR_SERIALNUMBER = 0x0003,
63 FC_FDMI_HBA_ATTR_MODEL = 0x0004,
64 FC_FDMI_HBA_ATTR_MODELDESCRIPTION = 0x0005,
65 FC_FDMI_HBA_ATTR_HARDWAREVERSION = 0x0006,
66 FC_FDMI_HBA_ATTR_DRIVERVERSION = 0x0007,
67 FC_FDMI_HBA_ATTR_OPTIONROMVERSION = 0x0008,
68 FC_FDMI_HBA_ATTR_FIRMWAREVERSION = 0x0009,
69 FC_FDMI_HBA_ATTR_OSNAMEVERSION = 0x000A,
70 FC_FDMI_HBA_ATTR_MAXCTPAYLOAD = 0x000B,
71};
72
73
74
75
76#define FC_FDMI_HBA_ATTR_NODENAME_LEN 8
77#define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN 64
78#define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN 64
79#define FC_FDMI_HBA_ATTR_MODEL_LEN 256
80#define FC_FDMI_HBA_ATTR_MODELDESCR_LEN 256
81#define FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN 256
82#define FC_FDMI_HBA_ATTR_DRIVERVERSION_LEN 256
83#define FC_FDMI_HBA_ATTR_OPTIONROMVERSION_LEN 256
84#define FC_FDMI_HBA_ATTR_FIRMWAREVERSION_LEN 256
85#define FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN 256
86#define FC_FDMI_HBA_ATTR_MAXCTPAYLOAD_LEN 4
87
88
89
90
91enum fc_fdmi_port_attr_type {
92 FC_FDMI_PORT_ATTR_FC4TYPES = 0x0001,
93 FC_FDMI_PORT_ATTR_SUPPORTEDSPEED = 0x0002,
94 FC_FDMI_PORT_ATTR_CURRENTPORTSPEED = 0x0003,
95 FC_FDMI_PORT_ATTR_MAXFRAMESIZE = 0x0004,
96 FC_FDMI_PORT_ATTR_OSDEVICENAME = 0x0005,
97 FC_FDMI_PORT_ATTR_HOSTNAME = 0x0006,
98};
99
100
101
102
103#define FC_FDMI_PORT_ATTR_FC4TYPES_LEN 32
104#define FC_FDMI_PORT_ATTR_SUPPORTEDSPEED_LEN 4
105#define FC_FDMI_PORT_ATTR_CURRENTPORTSPEED_LEN 4
106#define FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN 4
107#define FC_FDMI_PORT_ATTR_OSDEVICENAME_LEN 256
108#define FC_FDMI_PORT_ATTR_HOSTNAME_LEN 256
109
110
111
112
113struct fc_fdmi_hba_identifier {
114 __be64 id;
115};
116
117
118
119
120struct fc_fdmi_port_name {
121 __be64 portname;
122};
123
124
125
126
127#define FC_FDMI_ATTR_ENTRY_HEADER_LEN 4
128struct fc_fdmi_attr_entry {
129 __be16 type;
130 __be16 len;
131 __u8 value[1];
132} __attribute__((__packed__));
133
134
135
136
137struct fs_fdmi_attrs {
138 __be32 numattrs;
139 struct fc_fdmi_attr_entry attr[1];
140} __attribute__((__packed__));
141
142
143
144
145struct fc_fdmi_rpl {
146 __be32 numport;
147 struct fc_fdmi_port_name port[1];
148} __attribute__((__packed__));
149
150
151
152
153struct fc_fdmi_rhba {
154 struct fc_fdmi_hba_identifier hbaid;
155 struct fc_fdmi_rpl port;
156 struct fs_fdmi_attrs hba_attrs;
157} __attribute__((__packed__));
158
159
160
161
162struct fc_fdmi_rhat {
163 struct fc_fdmi_hba_identifier hbaid;
164 struct fs_fdmi_attrs hba_attrs;
165} __attribute__((__packed__));
166
167
168
169
170struct fc_fdmi_rprt {
171 struct fc_fdmi_hba_identifier hbaid;
172 struct fc_fdmi_port_name port;
173 struct fs_fdmi_attrs hba_attrs;
174} __attribute__((__packed__));
175
176
177
178
179struct fc_fdmi_rpa {
180 struct fc_fdmi_port_name port;
181 struct fs_fdmi_attrs hba_attrs;
182} __attribute__((__packed__));
183
184
185
186
187struct fc_fdmi_dprt {
188 struct fc_fdmi_port_name port;
189} __attribute__((__packed__));
190
191
192
193
194struct fc_fdmi_dpa {
195 struct fc_fdmi_port_name port;
196 struct fs_fdmi_attrs hba_attrs;
197} __attribute__((__packed__));
198
199
200
201
202struct fc_fdmi_dhat {
203 struct fc_fdmi_hba_identifier hbaid;
204} __attribute__((__packed__));
205
206
207
208
209struct fc_fdmi_dhba {
210 struct fc_fdmi_hba_identifier hbaid;
211} __attribute__((__packed__));
212
213#endif
214