1
2
3
4
5
6
7
8#ifndef _FC_NS_H_
9#define _FC_NS_H_
10
11#include <linux/types.h>
12
13
14
15
16
17
18
19
20
21#define FC_NS_SUBTYPE 2
22
23
24
25
26
27enum fc_ns_req {
28 FC_NS_GA_NXT = 0x0100,
29 FC_NS_GI_A = 0x0101,
30 FC_NS_GPN_ID = 0x0112,
31 FC_NS_GNN_ID = 0x0113,
32 FC_NS_GSPN_ID = 0x0118,
33 FC_NS_GID_PN = 0x0121,
34 FC_NS_GID_NN = 0x0131,
35 FC_NS_GID_FT = 0x0171,
36 FC_NS_GPN_FT = 0x0172,
37 FC_NS_GID_PT = 0x01a1,
38 FC_NS_RPN_ID = 0x0212,
39 FC_NS_RNN_ID = 0x0213,
40 FC_NS_RFT_ID = 0x0217,
41 FC_NS_RSPN_ID = 0x0218,
42 FC_NS_RFF_ID = 0x021f,
43 FC_NS_RSNN_NN = 0x0239,
44};
45
46
47
48
49enum fc_ns_pt {
50 FC_NS_UNID_PORT = 0x00,
51 FC_NS_N_PORT = 0x01,
52 FC_NS_NL_PORT = 0x02,
53 FC_NS_FNL_PORT = 0x03,
54 FC_NS_NX_PORT = 0x7f,
55 FC_NS_F_PORT = 0x81,
56 FC_NS_FL_PORT = 0x82,
57 FC_NS_E_PORT = 0x84,
58 FC_NS_B_PORT = 0x85,
59};
60
61
62
63
64struct fc_ns_pt_obj {
65 __u8 pt_type;
66};
67
68
69
70
71struct fc_ns_fid {
72 __u8 fp_flags;
73 __u8 fp_fid[3];
74};
75
76
77
78
79#define FC_NS_FID_LAST 0x80
80
81
82
83
84#define FC_NS_TYPES 256
85#define FC_NS_BPW 32
86
87struct fc_ns_fts {
88 __be32 ff_type_map[FC_NS_TYPES / FC_NS_BPW];
89};
90
91
92
93
94struct fc_ns_ff {
95 __be32 fd_feat[FC_NS_TYPES * 4 / FC_NS_BPW];
96};
97
98
99
100
101struct fc_ns_gid_pt {
102 __u8 fn_pt_type;
103 __u8 fn_domain_id_scope;
104 __u8 fn_area_id_scope;
105 __u8 fn_resvd;
106};
107
108
109
110
111struct fc_ns_gid_ft {
112 __u8 fn_resvd;
113 __u8 fn_domain_id_scope;
114 __u8 fn_area_id_scope;
115 __u8 fn_fc4_type;
116};
117
118
119
120
121struct fc_gpn_ft_resp {
122 __u8 fp_flags;
123 __u8 fp_fid[3];
124 __be32 fp_resvd;
125 __be64 fp_wwpn;
126};
127
128
129
130
131struct fc_ns_gid_pn {
132 __be64 fn_wwpn;
133};
134
135
136
137
138struct fc_gid_pn_resp {
139 __u8 fp_resvd;
140 __u8 fp_fid[3];
141};
142
143
144
145
146struct fc_gspn_resp {
147 __u8 fp_name_len;
148 char fp_name[];
149};
150
151
152
153
154struct fc_ns_rft_id {
155 struct fc_ns_fid fr_fid;
156 struct fc_ns_fts fr_fts;
157};
158
159
160
161
162
163struct fc_ns_rn_id {
164 struct fc_ns_fid fr_fid;
165 __be64 fr_wwn;
166} __attribute__((__packed__));
167
168
169
170
171struct fc_ns_rsnn {
172 __be64 fr_wwn;
173 __u8 fr_name_len;
174 char fr_name[];
175} __attribute__((__packed__));
176
177
178
179
180struct fc_ns_rspn {
181 struct fc_ns_fid fr_fid;
182 __u8 fr_name_len;
183 char fr_name[];
184} __attribute__((__packed__));
185
186
187
188
189struct fc_ns_rff_id {
190 struct fc_ns_fid fr_fid;
191 __u8 fr_resvd[2];
192 __u8 fr_feat;
193 __u8 fr_type;
194} __attribute__((__packed__));
195
196#endif
197