~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/scsi/fc/fc_ns.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 /*
  3  * Copyright(c) 2007 Intel Corporation. All rights reserved.
  4  *
  5  * Maintained at www.Open-FCoE.org
  6  */
  7 
  8 #ifndef _FC_NS_H_
  9 #define _FC_NS_H_
 10 
 11 #include <linux/types.h>
 12 
 13 /*
 14  * Fibre Channel Services - Name Service (dNS)
 15  * From T11.org FC-GS-2 Rev 5.3 November 1998.
 16  */
 17 
 18 /*
 19  * Common-transport sub-type for Name Server.
 20  */
 21 #define FC_NS_SUBTYPE       2   /* fs_ct_hdr.ct_fs_subtype */
 22 
 23 /*
 24  * Name server Requests.
 25  * Note:  this is an incomplete list, some unused requests are omitted.
 26  */
 27 enum fc_ns_req {
 28         FC_NS_GA_NXT =  0x0100,         /* get all next */
 29         FC_NS_GI_A =    0x0101,         /* get identifiers - scope */
 30         FC_NS_GPN_ID =  0x0112,         /* get port name by ID */
 31         FC_NS_GNN_ID =  0x0113,         /* get node name by ID */
 32         FC_NS_GSPN_ID = 0x0118,         /* get symbolic port name */
 33         FC_NS_GID_PN =  0x0121,         /* get ID for port name */
 34         FC_NS_GID_NN =  0x0131,         /* get IDs for node name */
 35         FC_NS_GID_FT =  0x0171,         /* get IDs by FC4 type */
 36         FC_NS_GPN_FT =  0x0172,         /* get port names by FC4 type */
 37         FC_NS_GID_PT =  0x01a1,         /* get IDs by port type */
 38         FC_NS_RPN_ID =  0x0212,         /* reg port name for ID */
 39         FC_NS_RNN_ID =  0x0213,         /* reg node name for ID */
 40         FC_NS_RFT_ID =  0x0217,         /* reg FC4 type for ID */
 41         FC_NS_RSPN_ID = 0x0218,         /* reg symbolic port name */
 42         FC_NS_RFF_ID =  0x021f,         /* reg FC4 Features for ID */
 43         FC_NS_RSNN_NN = 0x0239,         /* reg symbolic node name */
 44 };
 45 
 46 /*
 47  * Port type values.
 48  */
 49 enum fc_ns_pt {
 50         FC_NS_UNID_PORT = 0x00, /* unidentified */
 51         FC_NS_N_PORT =  0x01,   /* N port */
 52         FC_NS_NL_PORT = 0x02,   /* NL port */
 53         FC_NS_FNL_PORT = 0x03,  /* F/NL port */
 54         FC_NS_NX_PORT = 0x7f,   /* Nx port */
 55         FC_NS_F_PORT =  0x81,   /* F port */
 56         FC_NS_FL_PORT = 0x82,   /* FL port */
 57         FC_NS_E_PORT =  0x84,   /* E port */
 58         FC_NS_B_PORT =  0x85,   /* B port */
 59 };
 60 
 61 /*
 62  * Port type object.
 63  */
 64 struct fc_ns_pt_obj {
 65         __u8            pt_type;
 66 };
 67 
 68 /*
 69  * Port ID object
 70  */
 71 struct fc_ns_fid {
 72         __u8            fp_flags;       /* flags for responses only */
 73         __u8            fp_fid[3];
 74 };
 75 
 76 /*
 77  * fp_flags in port ID object, for responses only.
 78  */
 79 #define FC_NS_FID_LAST  0x80            /* last object */
 80 
 81 /*
 82  * FC4-types object.
 83  */
 84 #define FC_NS_TYPES     256     /* number of possible FC-4 types */
 85 #define FC_NS_BPW       32      /* bits per word in bitmap */
 86 
 87 struct fc_ns_fts {
 88         __be32  ff_type_map[FC_NS_TYPES / FC_NS_BPW]; /* bitmap of FC-4 types */
 89 };
 90 
 91 /*
 92  * FC4-features object.
 93  */
 94 struct fc_ns_ff {
 95         __be32  fd_feat[FC_NS_TYPES * 4 / FC_NS_BPW]; /* 4-bits per FC-type */
 96 };
 97 
 98 /*
 99  * GID_PT request.
100  */
101 struct 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  * GID_FT or GPN_FT request.
110  */
111 struct 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  * GPN_FT response.
120  */
121 struct fc_gpn_ft_resp {
122         __u8            fp_flags;       /* see fp_flags definitions above */
123         __u8            fp_fid[3];      /* port ID */
124         __be32          fp_resvd;
125         __be64          fp_wwpn;        /* port name */
126 };
127 
128 /*
129  * GID_PN request
130  */
131 struct fc_ns_gid_pn {
132         __be64     fn_wwpn;    /* port name */
133 };
134 
135 /*
136  * GID_PN response or GSPN_ID request
137  */
138 struct fc_gid_pn_resp {
139         __u8      fp_resvd;
140         __u8      fp_fid[3];     /* port ID */
141 };
142 
143 /*
144  * GSPN_ID response
145  */
146 struct fc_gspn_resp {
147         __u8    fp_name_len;
148         char    fp_name[];
149 };
150 
151 /*
152  * RFT_ID request - register FC-4 types for ID.
153  */
154 struct fc_ns_rft_id {
155         struct fc_ns_fid fr_fid;        /* port ID object */
156         struct fc_ns_fts fr_fts;        /* FC-4 types object */
157 };
158 
159 /*
160  * RPN_ID request - register port name for ID.
161  * RNN_ID request - register node name for ID.
162  */
163 struct fc_ns_rn_id {
164         struct fc_ns_fid fr_fid;        /* port ID object */
165         __be64          fr_wwn;         /* node name or port name */
166 } __attribute__((__packed__));
167 
168 /*
169  * RSNN_NN request - register symbolic node name
170  */
171 struct fc_ns_rsnn {
172         __be64          fr_wwn;         /* node name */
173         __u8            fr_name_len;
174         char            fr_name[];
175 } __attribute__((__packed__));
176 
177 /*
178  * RSPN_ID request - register symbolic port name
179  */
180 struct fc_ns_rspn {
181         struct fc_ns_fid fr_fid;        /* port ID object */
182         __u8            fr_name_len;
183         char            fr_name[];
184 } __attribute__((__packed__));
185 
186 /*
187  * RFF_ID request - register FC-4 Features for ID.
188  */
189 struct fc_ns_rff_id {
190         struct fc_ns_fid fr_fid;        /* port ID object */
191         __u8            fr_resvd[2];
192         __u8            fr_feat;        /* FC-4 Feature bits */
193         __u8            fr_type;        /* FC-4 type */
194 } __attribute__((__packed__));
195 
196 #endif /* _FC_NS_H_ */
197 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php