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