ReactOS  0.4.12-dev-43-g63b00d8
upcall.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_UPCALL_H__
23 #define __NFS41_DAEMON_UPCALL_H__
24 
25 #include "nfs41_ops.h"
26 #include "from_kernel.h"
27 
28 #define NFSD_VERSION_MISMATCH 116
29 
30 /* structures for upcall arguments */
31 typedef struct __mount_upcall_args {
32  const char *hostname;
33  const char *path;
40 
41 typedef struct __open_upcall_args {
43  FILE_BASIC_INFO basic_info;
44  FILE_STANDARD_INFO std_info;
45  const char *path;
60 
61 typedef struct __close_upcall_args {
63  const char *path;
64  BOOLEAN remove;
67 
68 typedef struct __readwrite_upcall_args {
69  unsigned char *buffer;
75 
76 typedef struct __lock_upcall_args {
83 
84 typedef struct __unlock_upcall_args {
86  unsigned char *buf;
89 
90 typedef struct __getattr_upcall_args {
91  FILE_BASIC_INFO basic_info;
92  FILE_STANDARD_INFO std_info;
93  FILE_ATTRIBUTE_TAG_INFO tag_info;
97  int buf_len;
101 
102 typedef struct __setattr_upcall_args {
103  const char *path;
106  unsigned char *buf;
111 
112 typedef struct __getexattr_upcall_args {
113  const char *path;
114  unsigned char *buf;
117  unsigned char *ealist;
123 
124 
125 typedef struct __setexattr_upcall_args {
126  const char *path;
127  unsigned char *buf;
132 
133 typedef struct __readdir_upcall_args {
134  const char *filter;
137  int buf_len;
143  unsigned char *kbuf;
145 
146 typedef struct __symlink_upcall_args {
148  char *target_set;
149  const char *path;
150  BOOLEAN set;
152 
153 typedef struct __volume_upcall_args {
155  int len;
156  union {
160  } info;
162 
163 typedef struct __getacl_upcall_args {
168 
169 typedef struct __setacl_upcall_args {
174 
175 typedef union __upcall_args {
191 } upcall_args;
192 
193 typedef struct __nfs41_upcall {
199 
202 
203  /* store referenced pointers with the upcall for
204  * automatic dereferencing on upcall_cleanup();
205  * see upcall_root_ref() and upcall_open_state_ref() */
208 } nfs41_upcall;
209 
210 
211 /* upcall operation interface */
212 typedef int (*upcall_parse_proc)(unsigned char*, uint32_t, nfs41_upcall*);
214 typedef int (*upcall_marshall_proc)(unsigned char*, uint32_t*, nfs41_upcall*);
217 
218 typedef struct __nfs41_upcall_op {
225 
226 
227 /* upcall.c */
228 int upcall_parse(
229  IN unsigned char *buffer,
232 
233 int upcall_handle(
235 
236 void upcall_marshall(
238  OUT unsigned char *buffer,
240  OUT uint32_t *length_out);
241 
242 void upcall_cancel(
244 
245 void upcall_cleanup(
247 
248 #endif /* !__NFS41_DAEMON_UPCALL_H__ */
setattr_upcall_args setattr
Definition: upcall.h:184
BOOLEAN created
Definition: upcall.h:57
BOOLEAN exclusive
Definition: upcall.h:79
struct __symlink_upcall_args symlink_upcall_args
nfs41_abs_path symlink
Definition: upcall.h:42
#define IN
Definition: typedefs.h:38
int upcall_handle(IN nfs41_upcall *upcall)
Definition: upcall.c:138
open_upcall_args open
Definition: upcall.h:177
uint32_t status
Definition: upcall.h:196
struct __unlock_upcall_args unlock_upcall_args
ULONGLONG ctime
Definition: upcall.h:172
unsigned char * ealist
Definition: upcall.h:117
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
uid_t uid
Definition: upcall.h:200
volume_upcall_args volume
Definition: upcall.h:188
unsigned char * buf
Definition: upcall.h:106
FILE_ATTRIBUTE_TAG_INFO tag_info
Definition: upcall.h:93
BOOLEAN renamed
Definition: upcall.h:65
uint32_t buf_len
Definition: upcall.h:107
const char * path
Definition: upcall.h:33
upcall_cancel_proc cancel
Definition: upcall.h:222
uint64_t xid
Definition: upcall.h:194
DWORD lease_time
Definition: upcall.h:37
struct __getacl_upcall_args getacl_upcall_args
int upcall_parse(IN unsigned char *buffer, IN uint32_t length, OUT nfs41_upcall *upcall)
Definition: upcall.c:75
GLuint buffer
Definition: glext.h:5915
ULONGLONG ctime
Definition: upcall.h:99
void upcall_cancel(IN nfs41_upcall *upcall)
Definition: upcall.c:189
ULONG disposition
Definition: upcall.h:49
long uid_t
Definition: various.h:8
nfs41_root * root
Definition: upcall.h:104
lock_upcall_args lock
Definition: upcall.h:180
PSECURITY_DESCRIPTOR sec_desc
Definition: upcall.h:165
HANDLE srv_open
Definition: upcall.h:54
struct _test_info info[]
Definition: SetCursorPos.c:19
getexattr_upcall_args getexattr
Definition: upcall.h:183
getacl_upcall_args getacl
Definition: upcall.h:189
unsigned char * buf
Definition: upcall.h:127
nfs41_root * root_ref
Definition: upcall.h:206
close_upcall_args close
Definition: upcall.h:178
UINT gid_t
Definition: types.h:89
nfs41_open_state * state_ref
Definition: upcall.h:207
uint32_t count
Definition: upcall.h:85
long LONG
Definition: pedump.c:60
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
FILE_FS_SIZE_INFORMATION size
Definition: upcall.h:157
DWORD sec_flavor
Definition: upcall.h:34
symlink_upcall_args symlink
Definition: upcall.h:187
struct __getattr_upcall_args getattr_upcall_args
upcall_marshall_proc marshall
Definition: upcall.h:221
HANDLE srv_open
Definition: upcall.h:62
unsigned char BOOLEAN
struct __volume_upcall_args volume_upcall_args
struct __setexattr_upcall_args setexattr_upcall_args
struct __mount_upcall_args mount_upcall_args
ULONG file_attrs
Definition: upcall.h:48
void upcall_cleanup(IN nfs41_upcall *upcall)
Definition: upcall.c:197
setexattr_upcall_args setexattr
Definition: upcall.h:185
unsigned char * buf
Definition: upcall.h:86
enum _FSINFOCLASS FS_INFORMATION_CLASS
const char * path
Definition: upcall.h:63
ULONG access_mode
Definition: upcall.h:47
readdir_upcall_args readdir
Definition: upcall.h:186
void(* upcall_cancel_proc)(nfs41_upcall *)
Definition: upcall.h:215
struct __readdir_upcall_args readdir_upcall_args
struct __readwrite_upcall_args readwrite_upcall_args
unsigned char * buf
Definition: upcall.h:114
upcall_args args
Definition: upcall.h:198
int(* upcall_marshall_proc)(unsigned char *, uint32_t *, nfs41_upcall *)
Definition: upcall.h:214
BOOLEAN symlink_embedded
Definition: upcall.h:58
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
SECURITY_INFORMATION query
Definition: upcall.h:164
readwrite_upcall_args rw
Definition: upcall.h:179
uint64_t ULONGLONG
Definition: typedefs.h:65
struct __nfs41_upcall nfs41_upcall
uint32_t buf_len
Definition: upcall.h:87
int(* upcall_handle_proc)(nfs41_upcall *)
Definition: upcall.h:213
struct __lock_upcall_args lock_upcall_args
const char * filter
Definition: upcall.h:134
upcall_handle_proc handle
Definition: upcall.h:220
FILE_FS_ATTRIBUTE_INFORMATION FsAttrs
Definition: upcall.h:38
unsigned long DWORD
Definition: ntddk_ex.h:95
struct __nfs41_upcall_op nfs41_upcall_op
void upcall_marshall(IN nfs41_upcall *upcall, OUT unsigned char *buffer, IN uint32_t length, OUT uint32_t *length_out)
Definition: upcall.c:157
unlock_upcall_args unlock
Definition: upcall.h:181
FILE_STANDARD_INFO std_info
Definition: upcall.h:92
ULONGLONG offset
Definition: upcall.h:70
PSECURITY_DESCRIPTOR sec_desc
Definition: upcall.h:171
unsigned char * kbuf
Definition: upcall.h:143
SECURITY_INFORMATION query
Definition: upcall.h:170
BOOLEAN blocking
Definition: upcall.h:80
ULONG create_opts
Definition: upcall.h:50
getattr_upcall_args getattr
Definition: upcall.h:182
uint64_t length
Definition: upcall.h:78
const char * path
Definition: upcall.h:126
struct __open_upcall_args open_upcall_args
const char * path
Definition: upcall.h:103
const char * hostname
Definition: upcall.h:32
PFILE_FULL_EA_INFORMATION ea
Definition: upcall.h:56
const char * path
Definition: upcall.h:45
FILE_INTERNAL_INFORMATION intr_info
Definition: upcall.h:94
gid_t gid
Definition: upcall.h:201
DWORD deleg_type
Definition: upcall.h:55
uint32_t opcode
Definition: upcall.h:195
FILE_BASIC_INFO basic_info
Definition: upcall.h:91
ULONGLONG changeattr
Definition: upcall.h:53
UINT64 uint64_t
Definition: types.h:77
setacl_upcall_args setacl
Definition: upcall.h:190
ULONGLONG ctime
Definition: upcall.h:109
FS_INFORMATION_CLASS query
Definition: upcall.h:154
BOOLEAN acquired
Definition: upcall.h:81
struct __setacl_upcall_args setacl_upcall_args
mount_upcall_args mount
Definition: upcall.h:176
uint32_t last_error
Definition: upcall.h:197
nfs41_open_state * state
Definition: upcall.h:105
UINT32 uint32_t
Definition: types.h:75
const char * path
Definition: upcall.h:113
FILE_NETWORK_OPEN_INFORMATION network_info
Definition: upcall.h:95
nfs41_open_state * state
Definition: upcall.h:136
union __upcall_args upcall_args
LONG open_owner_id
Definition: upcall.h:51
nfs41_updowncall_list upcall
Definition: nfs41_driver.c:273
#define OUT
Definition: typedefs.h:39
unsigned char * buffer
Definition: upcall.h:69
unsigned int ULONG
Definition: retypes.h:1
FILE_FS_ATTRIBUTE_INFORMATION attribute
Definition: upcall.h:159
struct __getexattr_upcall_args getexattr_upcall_args
upcall_cleanup_proc cleanup
Definition: upcall.h:223
struct __close_upcall_args close_upcall_args
uint64_t offset
Definition: upcall.h:77
#define uint32_t
Definition: nsiface.idl:61
nfs41_root * root
Definition: upcall.h:135
void(* upcall_cleanup_proc)(nfs41_upcall *)
Definition: upcall.h:216
int(* upcall_parse_proc)(unsigned char *, uint32_t, nfs41_upcall *)
Definition: upcall.h:212
struct __setattr_upcall_args setattr_upcall_args
FILE_BASIC_INFO basic_info
Definition: upcall.h:43
ULONG access_mask
Definition: upcall.h:46
FILE_STANDARD_INFO std_info
Definition: upcall.h:44
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29
upcall_parse_proc parse
Definition: upcall.h:219
FILE_FS_FULL_SIZE_INFORMATION fullsize
Definition: upcall.h:158