ReactOS  0.4.11-dev-946-g431643b
nfs41_types.h
Go to the documentation of this file.
1 /* NFSv4.1 client for Windows
2  * Copyright 2012 The Regents of the University of Michigan
3  *
4  * Olga Kornievskaia <aglo@umich.edu>
5  * Casey Bodley <cbodley@umich.edu>
6  *
7  * This library is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published by
9  * the Free Software Foundation; either version 2.1 of the License, or (at
10  * your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful, but
13  * without any warranty; without even the implied warranty of merchantability
14  * or fitness for a particular purpose. See the GNU Lesser General Public
15  * License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20  */
21 
22 #ifndef __NFS41_DAEMON_TYPES_H__
23 #define __NFS41_DAEMON_TYPES_H__
24 
25 #include "wintirpc.h"
26 #include "rpc/xdr.h"
27 #include "nfs41_const.h"
28 
29 typedef char* caddr_t;
30 
31 static const int64_t NFS4_INT64_MAX = 0x7fffffffffffffff;
32 static const uint64_t NFS4_UINT64_MAX = 0xffffffffffffffff;
33 static const int32_t NFS4_INT32_MAX = 0x7fffffff;
34 static const uint32_t NFS4_UINT32_MAX = 0xffffffff;
35 
36 static const uint64_t NFS4_MAXFILELEN = 0xffffffffffffffff;
37 static const uint64_t NFS4_MAXFILEOFF = 0xfffffffffffffffe;
38 
39 
40 /* common nfs types */
41 typedef struct __nfs41_abs_path {
43  unsigned short len;
44  SRWLOCK lock;
46 
47 typedef struct __nfs41_component {
48  const char *name;
49  unsigned short len;
51 
52 typedef struct __nfs41_fh {
53  unsigned char fh[NFS4_FHSIZE];
57 } nfs41_fh;
58 
59 typedef struct __nfs41_path_fh {
64 
65 typedef struct __nfs41_fsid {
68 } nfs41_fsid;
69 
70 typedef struct __nfs41_readdir_cookie {
72  unsigned char verf[NFS4_VERIFIER_SIZE];
74 
75 typedef struct __nfs41_write_verf {
76  unsigned char verf[NFS4_VERIFIER_SIZE];
77  unsigned char expected[NFS4_VERIFIER_SIZE];
78 #ifdef __REACTOS__
79  uint32_t committed;
80 #else
81  enum stable_how4 committed;
82 #endif
84 
85 typedef struct __netaddr4 {
86  char netid[NFS41_NETWORK_ID_LEN+1];
87  char uaddr[NFS41_UNIVERSAL_ADDR_LEN+1];
88 } netaddr4;
89 
90 typedef struct __multi_addr4 {
93 } multi_addr4;
94 
95 typedef struct __bitmap4 {
97  uint32_t arr[3];
98 } bitmap4;
99 
100 typedef struct __nfstime4 {
103 } nfstime4;
104 
105 typedef struct __client_owner4 {
106  unsigned char co_verifier[NFS4_VERIFIER_SIZE];
108  unsigned char co_ownerid[NFS4_OPAQUE_LIMIT];
109 } client_owner4;
110 
111 typedef struct __server_owner4 {
114  char so_major_id[NFS4_OPAQUE_LIMIT];
115 } server_owner4;
116 
117 typedef struct __state_owner4 {
119  unsigned char owner[NFS4_OPAQUE_LIMIT];
120 } state_owner4;
121 
122 typedef struct __nfs_impl_id4 {
124  unsigned char *nii_domain;
126  unsigned char *nii_name;
128 } nfs_impl_id4;
129 
130 typedef struct __nfsace4 {
134  char who[NFS4_OPAQUE_LIMIT];
135 } nfsace4;
136 
137 typedef struct __nfsacl41 {
141 } nfsacl41;
142 
143 typedef struct __stateid4 {
145  unsigned char other[NFS4_STATEID_OTHER];
146 } stateid4;
147 
148 typedef struct __open_delegation4 {
151 #ifdef __REACTOS__
152  uint32_t type;
153 #else
155 #endif
158 
159 typedef struct __fattr4 {
162  unsigned char attr_vals[NFS4_OPAQUE_LIMIT];
163 } fattr4;
164 
165 typedef struct __change_info4 {
169 } change_info4;
170 
171 typedef struct __fs_location_server {
172  /* 'address' represents one of a traditional DNS host name,
173  * IPv4 address, IPv6 address, or a zero-length string */
176 
177 typedef struct __fs_location4 {
178  nfs41_abs_path path; /* path to fs from referred server's root */
181 } fs_location4;
182 
183 typedef struct __fs_locations4 {
184  nfs41_abs_path path; /* path to fs from referring server's root */
187 } fs_locations4;
188 
189 enum {
194 
196 };
197 typedef struct __threshold_item4 {
201 
202 #define MAX_MDSTHRESHOLD_ITEMS 1
203 typedef struct __mdsthreshold4 {
206 } mdsthreshold4;
207 
208 typedef struct __nfs41_file_info {
215  nfstime4 *time_delta; /* XXX: per-fs */
217  bitmap4 *supported_attrs; /* XXX: per-fs */
218  bitmap4 *suppattr_exclcreat; /* XXX: per-fs */
219  uint64_t maxread; /* XXX: per-fs */
220  uint64_t maxwrite; /* XXX: per-fs */
224  uint64_t space_avail; /* XXX: per-fs */
225  uint64_t space_free; /* XXX: per-fs */
226  uint64_t space_total; /* XXX: per-fs */
232  fs_locations4 *fs_locations; /* XXX: per-fs */
233  uint32_t lease_time; /* XXX: per-server */
234  uint32_t fs_layout_types; /* pnfs, XXX: per-fs */
238  bool_t cansettime; /* XXX: per-fs */
244  char *owner;
245  char *owner_group;
248 
249 #endif /* !__NFS41_DAEMON_TYPES_H__ */
struct __nfs41_fh nfs41_fh
namespace GUID const ADDRINFOEXW * hints
Definition: sock.c:80
uint64_t space_avail
Definition: nfs41_types.h:224
struct __multi_addr4 multi_addr4
nfs41_fsid fsid
Definition: nfs41_types.h:209
uint32_t fs_layout_types
Definition: nfs41_types.h:234
nfstime4 time_create
Definition: nfs41_types.h:212
char * caddr_t
Definition: nfs41_types.h:29
bitmap4 * supported_attrs
Definition: nfs41_types.h:217
uint32_t acemask
Definition: nfs41_types.h:133
struct __fs_locations4 fs_locations4
uint64_t fileid
Definition: nfs41_types.h:55
struct __nfs41_superblock * superblock
Definition: nfs41_types.h:56
struct __mdsthreshold4 mdsthreshold4
uint32_t nii_domain_len
Definition: nfs41_types.h:123
int32_t bool_t
Definition: types.h:101
unsigned char * nii_domain
Definition: nfs41_types.h:124
struct __nfs41_component nfs41_component
struct __fs_location_server fs_location_server
int other
Definition: msacm.c:1364
uint32_t co_ownerid_len
Definition: nfs41_types.h:107
nfstime4 nii_date
Definition: nfs41_types.h:127
static const int64_t NFS4_INT64_MAX
Definition: nfs41_types.h:31
open_delegation_type4
Definition: nfs41_ops.h:585
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
fs_locations4 * fs_locations
Definition: nfs41_types.h:232
#define NFS4_STATEID_OTHER
Definition: nfs41_const.h:33
uint64_t so_minor_id
Definition: nfs41_types.h:112
struct __nfs41_path_fh nfs41_path_fh
static const uint64_t NFS4_MAXFILELEN
Definition: nfs41_types.h:36
nfstime4 time_modify
Definition: nfs41_types.h:213
bool_t symlink_support
Definition: nfs41_types.h:242
uint64_t after
Definition: nfs41_types.h:168
struct __bitmap4 bitmap4
struct __netaddr4 netaddr4
uint32_t seqid
Definition: nfs41_types.h:144
uint64_t space_free
Definition: nfs41_types.h:225
bitmap4 attrmask
Definition: nfs41_types.h:160
uint64_t minor
Definition: nfs41_types.h:67
#define NFS4_VERIFIER_SIZE
Definition: nfs41_const.h:30
struct __state_owner4 state_owner4
nfstime4 time_access
Definition: nfs41_types.h:211
#define NFS41_MAX_PATH_LEN
Definition: nfs41_const.h:46
struct __nfstime4 nfstime4
struct __nfs41_file_info nfs41_file_info
struct __nfsacl41 nfsacl41
struct __nfs41_abs_path nfs41_abs_path
stable_how4
Definition: nfs41_ops.h:835
uint64_t before
Definition: nfs41_types.h:167
bool_t case_preserving
Definition: nfs41_types.h:240
#define NFS41_HOSTNAME_LEN
Definition: nfs41_const.h:48
struct __nfs41_fsid nfs41_fsid
uint32_t count
Definition: nfs41_types.h:96
mdsthreshold4 mdsthreshold
Definition: nfs41_types.h:210
#define NFS4_OPAQUE_LIMIT
Definition: nfs41_const.h:31
struct __stateid4 stateid4
struct __open_delegation4 open_delegation4
uint32_t rdattr_error
Definition: nfs41_types.h:229
static const uint64_t NFS4_UINT64_MAX
Definition: nfs41_types.h:32
uint32_t len
Definition: nfs41_types.h:54
struct __nfs_impl_id4 nfs_impl_id4
fs_location_server * servers
Definition: nfs41_types.h:179
nfs41_abs_path * path
Definition: nfs41_types.h:60
uint32_t owner_len
Definition: nfs41_types.h:118
int64_t seconds
Definition: nfs41_types.h:101
struct __fs_location4 fs_location4
struct __server_owner4 server_owner4
uint32_t acetype
Definition: nfs41_types.h:131
struct __nfsace4 nfsace4
const char * name
Definition: nfs41_types.h:48
nfsace4 * aces
Definition: nfs41_types.h:139
#define MAX_MDSTHRESHOLD_ITEMS
Definition: nfs41_types.h:202
unsigned short len
Definition: nfs41_types.h:43
#define NFS41_ADDRS_PER_SERVER
Definition: nfs41_const.h:49
uint32_t nii_name_len
Definition: nfs41_types.h:125
GLuint address
Definition: glext.h:9393
uint32_t attr_vals_len
Definition: nfs41_types.h:161
uint32_t aclsupport
Definition: nfs41_types.h:246
#define NFS41_UNIVERSAL_ADDR_LEN
Definition: nfs41_const.h:53
uint32_t server_count
Definition: nfs41_types.h:180
nfs41_abs_path path
Definition: nfs41_types.h:184
nfsacl41 * acl
Definition: nfs41_types.h:214
uint64_t space_total
Definition: nfs41_types.h:226
bitmap4 * suppattr_exclcreat
Definition: nfs41_types.h:218
uint32_t count
Definition: nfs41_types.h:204
struct __fattr4 fattr4
static const uint64_t NFS4_MAXFILEOFF
Definition: nfs41_types.h:37
struct __change_info4 change_info4
uint32_t count
Definition: nfs41_types.h:140
uint32_t count
Definition: nfs41_types.h:92
struct __nfs41_write_verf nfs41_write_verf
INT32 int32_t
Definition: types.h:71
uint32_t mode_mask
Definition: nfs41_types.h:231
static const uint32_t NFS4_UINT32_MAX
Definition: nfs41_types.h:34
UINT64 uint64_t
Definition: types.h:77
nfs41_component name
Definition: nfs41_types.h:61
uint32_t so_major_id_len
Definition: nfs41_types.h:113
fs_location4 * locations
Definition: nfs41_types.h:185
Definition: services.c:325
nfstime4 * time_delta
Definition: nfs41_types.h:215
nfs41_abs_path path
Definition: nfs41_types.h:178
UINT32 uint32_t
Definition: types.h:75
uint32_t location_count
Definition: nfs41_types.h:186
struct __nfs41_readdir_cookie nfs41_readdir_cookie
#define NFS4_FHSIZE
Definition: nfs41_const.h:29
uint64_t major
Definition: nfs41_types.h:66
struct __client_owner4 client_owner4
#define NFS41_NETWORK_ID_LEN
Definition: nfs41_const.h:56
unsigned char * nii_name
Definition: nfs41_types.h:126
static const int32_t NFS4_INT32_MAX
Definition: nfs41_types.h:33
struct __threshold_item4 threshold_item4
bool_t case_insensitive
Definition: nfs41_types.h:239
uint32_t aceflag
Definition: nfs41_types.h:132
INT64 int64_t
Definition: types.h:72
static TCHAR * items[]
Definition: page1.c:45
unsigned short len
Definition: nfs41_types.h:49
uint32_t nseconds
Definition: nfs41_types.h:102
uint32_t lease_time
Definition: nfs41_types.h:233
BOOL expected
Definition: store.c:2063
uint32_t flag
Definition: nfs41_types.h:138