summaryrefslogtreecommitdiff
path: root/source4/ntvfs/ntvfs.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-10 14:31:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:56:55 -0500
commit86497db6113c4ec3210d671c3fcf957d1026098c (patch)
treeea7aaa040264907802688b8154873603f4f4635c /source4/ntvfs/ntvfs.h
parentb86c1b744b48a2b664c9075335eb48098e4462fd (diff)
downloadsamba-86497db6113c4ec3210d671c3fcf957d1026098c.tar.gz
samba-86497db6113c4ec3210d671c3fcf957d1026098c.tar.bz2
samba-86497db6113c4ec3210d671c3fcf957d1026098c.zip
r14157: - pass a struct ntvfs_request to the ntvfs layer
(for now we just do #define ntvfs_request smbsrv_request, but it's the first step...) - rename ntvfs_openfile() -> ntvfs_open() - fix the talloc hierachie in some places in the ntvfs_map_*() code metze (This used to be commit ed9ed1f48f602354810937c0b0de850b44322191)
Diffstat (limited to 'source4/ntvfs/ntvfs.h')
-rw-r--r--source4/ntvfs/ntvfs.h184
1 files changed, 106 insertions, 78 deletions
diff --git a/source4/ntvfs/ntvfs.h b/source4/ntvfs/ntvfs.h
index 80f6e94125..46d288c853 100644
--- a/source4/ntvfs/ntvfs.h
+++ b/source4/ntvfs/ntvfs.h
@@ -25,6 +25,8 @@
struct ntvfs_module_context;
+#define ntvfs_request smbsrv_request
+
/* each backend has to be one one of the following 3 basic types. In
* earlier versions of Samba backends needed to handle all types, now
* we implement them separately. */
@@ -35,96 +37,123 @@ enum ntvfs_type {NTVFS_DISK, NTVFS_PRINT, NTVFS_IPC};
struct ntvfs_ops {
const char *name;
enum ntvfs_type type;
-
+
/* initial setup */
- NTSTATUS (*connect)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, const char *sharename);
- NTSTATUS (*disconnect)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_tcon *tcon);
+ NTSTATUS (*connect)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ const char *sharename);
+ NTSTATUS (*disconnect)(struct ntvfs_module_context *ntvfs);
+
+ /* async_setup - called when a backend is processing a async request */
+ NTSTATUS (*async_setup)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ void *private);
+
+ /* filesystem operations */
+ NTSTATUS (*fsinfo)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_fsinfo *fs);
/* path operations */
- NTSTATUS (*unlink)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_unlink *unl);
- NTSTATUS (*chkpath)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_chkpath *cp);
- NTSTATUS (*qpathinfo)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *st);
- NTSTATUS (*setpathinfo)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *st);
- NTSTATUS (*openfile)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_open *oi);
- NTSTATUS (*mkdir)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_mkdir *md);
- NTSTATUS (*rmdir)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_rmdir *rd);
- NTSTATUS (*rename)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_rename *ren);
- NTSTATUS (*copy)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_copy *cp);
+ NTSTATUS (*unlink)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_unlink *unl);
+ NTSTATUS (*chkpath)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_chkpath *cp);
+ NTSTATUS (*qpathinfo)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_fileinfo *st);
+ NTSTATUS (*setpathinfo)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_setfileinfo *st);
+ NTSTATUS (*mkdir)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_mkdir *md);
+ NTSTATUS (*rmdir)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_rmdir *rd);
+ NTSTATUS (*rename)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_rename *ren);
+ NTSTATUS (*copy)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_copy *cp);
+ NTSTATUS (*open)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_open *oi);
/* directory search */
- NTSTATUS (*search_first)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_first *io, void *private,
+ NTSTATUS (*search_first)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_search_first *io, void *private,
BOOL (*callback)(void *private, union smb_search_data *file));
- NTSTATUS (*search_next)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_next *io, void *private,
- BOOL (*callback)(void *private, union smb_search_data *file));
- NTSTATUS (*search_close)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_search_close *io);
+ NTSTATUS (*search_next)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_search_next *io, void *private,
+ BOOL (*callback)(void *private, union smb_search_data *file));
+ NTSTATUS (*search_close)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_search_close *io);
/* operations on open files */
- NTSTATUS (*ioctl)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_ioctl *io);
- NTSTATUS (*read)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_read *io);
- NTSTATUS (*write)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_write *io);
- NTSTATUS (*seek)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_seek *io);
- NTSTATUS (*flush)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_flush *flush);
- NTSTATUS (*close)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_close *io);
- NTSTATUS (*exit)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req);
- NTSTATUS (*lock)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lock *lck);
- NTSTATUS (*setfileinfo)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_setfileinfo *info);
- NTSTATUS (*qfileinfo)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fileinfo *info);
-
- /* filesystem operations */
- NTSTATUS (*fsinfo)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_fsinfo *fs);
-
- /* printing specific operations */
- NTSTATUS (*lpq)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, union smb_lpq *lpq);
-
- /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */
- NTSTATUS (*trans2)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans2);
+ NTSTATUS (*ioctl)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_ioctl *io);
+ NTSTATUS (*read)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_read *io);
+ NTSTATUS (*write)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_write *io);
+ NTSTATUS (*seek)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_seek *io);
+ NTSTATUS (*flush)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_flush *flush);
+ NTSTATUS (*lock)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_lock *lck);
+ NTSTATUS (*qfileinfo)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_fileinfo *info);
+ NTSTATUS (*setfileinfo)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_setfileinfo *info);
+ NTSTATUS (*close)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_close *io);
/* trans interface - used by IPC backend for pipes and RAP calls */
- NTSTATUS (*trans)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_trans2 *trans);
+ NTSTATUS (*trans)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_trans2 *trans);
- /* logoff - called when a vuid is closed */
- NTSTATUS (*logoff)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req);
+ /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */
+ NTSTATUS (*trans2)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_trans2 *trans2);
- /* async_setup - called when a backend is processing a async request */
- NTSTATUS (*async_setup)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, void *private);
+ /* change notify request */
+ NTSTATUS (*notify)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ struct smb_notify *info);
/* cancel - cancels any pending async request */
- NTSTATUS (*cancel)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req);
+ NTSTATUS (*cancel)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req);
- /* change notify request */
- NTSTATUS (*notify)(struct ntvfs_module_context *ntvfs,
- struct smbsrv_request *req, struct smb_notify *info);
+ /* printing specific operations */
+ NTSTATUS (*lpq)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req,
+ union smb_lpq *lpq);
+
+ /* logoff - called when a vuid is closed */
+ NTSTATUS (*logoff)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req);
+ NTSTATUS (*exit)(struct ntvfs_module_context *ntvfs,
+ struct ntvfs_request *req);
};
struct ntvfs_module_context {
@@ -166,7 +195,7 @@ struct ntvfs_async_state {
/* the async handling infos */
uint_t state;
void *private_data;
- void (*send_fn)(struct smbsrv_request *);
+ void (*send_fn)(struct ntvfs_request *);
NTSTATUS status;
/* the passthru module's per session private data */
@@ -181,8 +210,7 @@ struct ntvfs_critical_sizes {
int sizeof_ntvfs_module_context;
int sizeof_ntvfs_ops;
int sizeof_ntvfs_async_state;
- int sizeof_smbsrv_tcon;
- int sizeof_smbsrv_request;
+ int sizeof_ntvfs_request;
};
#include "ntvfs/ntvfs_proto.h"