1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _FC_NS_H_
20 #define _FC_NS_H_
21 #include <linux/types.h>
22 #define FC_NS_SUBTYPE 2
23 enum fc_ns_req {
24   FC_NS_GA_NXT = 0x0100,
25   FC_NS_GI_A = 0x0101,
26   FC_NS_GPN_ID = 0x0112,
27   FC_NS_GNN_ID = 0x0113,
28   FC_NS_GSPN_ID = 0x0118,
29   FC_NS_GID_PN = 0x0121,
30   FC_NS_GID_NN = 0x0131,
31   FC_NS_GID_FT = 0x0171,
32   FC_NS_GPN_FT = 0x0172,
33   FC_NS_GID_PT = 0x01a1,
34   FC_NS_RPN_ID = 0x0212,
35   FC_NS_RNN_ID = 0x0213,
36   FC_NS_RFT_ID = 0x0217,
37   FC_NS_RSPN_ID = 0x0218,
38   FC_NS_RFF_ID = 0x021f,
39   FC_NS_RSNN_NN = 0x0239,
40 };
41 enum fc_ns_pt {
42   FC_NS_UNID_PORT = 0x00,
43   FC_NS_N_PORT = 0x01,
44   FC_NS_NL_PORT = 0x02,
45   FC_NS_FNL_PORT = 0x03,
46   FC_NS_NX_PORT = 0x7f,
47   FC_NS_F_PORT = 0x81,
48   FC_NS_FL_PORT = 0x82,
49   FC_NS_E_PORT = 0x84,
50   FC_NS_B_PORT = 0x85,
51 };
52 struct fc_ns_pt_obj {
53   __u8 pt_type;
54 };
55 struct fc_ns_fid {
56   __u8 fp_flags;
57   __u8 fp_fid[3];
58 };
59 #define FC_NS_FID_LAST 0x80
60 #define FC_NS_TYPES 256
61 #define FC_NS_BPW 32
62 struct fc_ns_fts {
63   __be32 ff_type_map[FC_NS_TYPES / FC_NS_BPW];
64 };
65 struct fc_ns_ff {
66   __be32 fd_feat[FC_NS_TYPES * 4 / FC_NS_BPW];
67 };
68 struct fc_ns_gid_pt {
69   __u8 fn_pt_type;
70   __u8 fn_domain_id_scope;
71   __u8 fn_area_id_scope;
72   __u8 fn_resvd;
73 };
74 struct fc_ns_gid_ft {
75   __u8 fn_resvd;
76   __u8 fn_domain_id_scope;
77   __u8 fn_area_id_scope;
78   __u8 fn_fc4_type;
79 };
80 struct fc_gpn_ft_resp {
81   __u8 fp_flags;
82   __u8 fp_fid[3];
83   __be32 fp_resvd;
84   __be64 fp_wwpn;
85 };
86 struct fc_ns_gid_pn {
87   __be64 fn_wwpn;
88 };
89 struct fc_gid_pn_resp {
90   __u8 fp_resvd;
91   __u8 fp_fid[3];
92 };
93 struct fc_gspn_resp {
94   __u8 fp_name_len;
95   char fp_name[];
96 };
97 struct fc_ns_rft_id {
98   struct fc_ns_fid fr_fid;
99   struct fc_ns_fts fr_fts;
100 };
101 struct fc_ns_rn_id {
102   struct fc_ns_fid fr_fid;
103   __be64 fr_wwn;
104 } __attribute__((__packed__));
105 struct fc_ns_rsnn {
106   __be64 fr_wwn;
107   __u8 fr_name_len;
108   char fr_name[];
109 } __attribute__((__packed__));
110 struct fc_ns_rspn {
111   struct fc_ns_fid fr_fid;
112   __u8 fr_name_len;
113   char fr_name[];
114 } __attribute__((__packed__));
115 struct fc_ns_rff_id {
116   struct fc_ns_fid fr_fid;
117   __u8 fr_resvd[2];
118   __u8 fr_feat;
119   __u8 fr_type;
120 } __attribute__((__packed__));
121 #endif
122