conn rcv_lock converted to spinlock, struct cor_sock created, kernel_packet skb_clone...
[cor_2_6_31.git] / include / scsi / fc / fc_ns.h
blob790d7b97d4bc6c96af6ddf5a4de9c99cdd0545fe
1 /*
2 * Copyright(c) 2007 Intel Corporation. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17 * Maintained at www.Open-FCoE.org
20 #ifndef _FC_NS_H_
21 #define _FC_NS_H_
24 * Fibre Channel Services - Name Service (dNS)
25 * From T11.org FC-GS-2 Rev 5.3 November 1998.
29 * Common-transport sub-type for Name Server.
31 #define FC_NS_SUBTYPE 2 /* fs_ct_hdr.ct_fs_subtype */
34 * Name server Requests.
35 * Note: this is an incomplete list, some unused requests are omitted.
37 enum fc_ns_req {
38 FC_NS_GA_NXT = 0x0100, /* get all next */
39 FC_NS_GI_A = 0x0101, /* get identifiers - scope */
40 FC_NS_GPN_ID = 0x0112, /* get port name by ID */
41 FC_NS_GNN_ID = 0x0113, /* get node name by ID */
42 FC_NS_GID_PN = 0x0121, /* get ID for port name */
43 FC_NS_GID_NN = 0x0131, /* get IDs for node name */
44 FC_NS_GID_FT = 0x0171, /* get IDs by FC4 type */
45 FC_NS_GPN_FT = 0x0172, /* get port names by FC4 type */
46 FC_NS_GID_PT = 0x01a1, /* get IDs by port type */
47 FC_NS_RFT_ID = 0x0217, /* reg FC4 type for ID */
48 FC_NS_RPN_ID = 0x0212, /* reg port name for ID */
49 FC_NS_RNN_ID = 0x0213, /* reg node name for ID */
53 * Port type values.
55 enum fc_ns_pt {
56 FC_NS_UNID_PORT = 0x00, /* unidentified */
57 FC_NS_N_PORT = 0x01, /* N port */
58 FC_NS_NL_PORT = 0x02, /* NL port */
59 FC_NS_FNL_PORT = 0x03, /* F/NL port */
60 FC_NS_NX_PORT = 0x7f, /* Nx port */
61 FC_NS_F_PORT = 0x81, /* F port */
62 FC_NS_FL_PORT = 0x82, /* FL port */
63 FC_NS_E_PORT = 0x84, /* E port */
64 FC_NS_B_PORT = 0x85, /* B port */
68 * Port type object.
70 struct fc_ns_pt_obj {
71 __u8 pt_type;
75 * Port ID object
77 struct fc_ns_fid {
78 __u8 fp_flags; /* flags for responses only */
79 __u8 fp_fid[3];
83 * fp_flags in port ID object, for responses only.
85 #define FC_NS_FID_LAST 0x80 /* last object */
88 * FC4-types object.
90 #define FC_NS_TYPES 256 /* number of possible FC-4 types */
91 #define FC_NS_BPW 32 /* bits per word in bitmap */
93 struct fc_ns_fts {
94 __be32 ff_type_map[FC_NS_TYPES / FC_NS_BPW]; /* bitmap of FC-4 types */
98 * GID_PT request.
100 struct fc_ns_gid_pt {
101 __u8 fn_pt_type;
102 __u8 fn_domain_id_scope;
103 __u8 fn_area_id_scope;
104 __u8 fn_resvd;
108 * GID_FT or GPN_FT request.
110 struct fc_ns_gid_ft {
111 __u8 fn_resvd;
112 __u8 fn_domain_id_scope;
113 __u8 fn_area_id_scope;
114 __u8 fn_fc4_type;
118 * GPN_FT response.
120 struct fc_gpn_ft_resp {
121 __u8 fp_flags; /* see fp_flags definitions above */
122 __u8 fp_fid[3]; /* port ID */
123 __be32 fp_resvd;
124 __be64 fp_wwpn; /* port name */
128 * GID_PN request
130 struct fc_ns_gid_pn {
131 __be64 fn_wwpn; /* port name */
135 * GID_PN response
137 struct fc_gid_pn_resp {
138 __u8 fp_resvd;
139 __u8 fp_fid[3]; /* port ID */
143 * RFT_ID request - register FC-4 types for ID.
145 struct fc_ns_rft_id {
146 struct fc_ns_fid fr_fid; /* port ID object */
147 struct fc_ns_fts fr_fts; /* FC-4 types object */
151 * RPN_ID request - register port name for ID.
152 * RNN_ID request - register node name for ID.
154 struct fc_ns_rn_id {
155 struct fc_ns_fid fr_fid; /* port ID object */
156 __be64 fr_wwn; /* node name or port name */
157 } __attribute__((__packed__));
159 #endif /* _FC_NS_H_ */