2 Unix SMB/CIFS implementation.
3 NTVFS structures and defines
4 Copyright (C) Andrew Tridgell 2003
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 /* modules can use the following to determine if the interface has changed */
22 #define NTVFS_INTERFACE_VERSION 1
26 /* the ntvfs operations structure - contains function pointers to
27 the backend implementations of each operation */
33 NTSTATUS (*connect)(struct request_context *req, const char *sharename);
34 NTSTATUS (*disconnect)(struct tcon_context *conn);
37 NTSTATUS (*unlink)(struct request_context *req, struct smb_unlink *unl);
38 NTSTATUS (*chkpath)(struct request_context *req, struct smb_chkpath *cp);
39 NTSTATUS (*qpathinfo)(struct request_context *req, union smb_fileinfo *st);
40 NTSTATUS (*setpathinfo)(struct request_context *req, union smb_setfileinfo *st);
41 NTSTATUS (*open)(struct request_context *req, union smb_open *oi);
42 NTSTATUS (*mkdir)(struct request_context *req, union smb_mkdir *md);
43 NTSTATUS (*rmdir)(struct request_context *req, struct smb_rmdir *rd);
44 NTSTATUS (*rename)(struct request_context *req, union smb_rename *ren);
45 NTSTATUS (*copy)(struct request_context *req, struct smb_copy *cp);
47 /* directory search */
48 NTSTATUS (*search_first)(struct request_context *req, union smb_search_first *io, void *private,
49 BOOL (*callback)(void *private, union smb_search_data *file));
50 NTSTATUS (*search_next)(struct request_context *req, union smb_search_next *io, void *private,
51 BOOL (*callback)(void *private, union smb_search_data *file));
52 NTSTATUS (*search_close)(struct request_context *req, union smb_search_close *io);
54 /* operations on open files */
55 NTSTATUS (*ioctl)(struct request_context *req, union smb_ioctl *io);
56 NTSTATUS (*read)(struct request_context *req, union smb_read *io);
57 NTSTATUS (*write)(struct request_context *req, union smb_write *io);
58 NTSTATUS (*seek)(struct request_context *req, struct smb_seek *io);
59 NTSTATUS (*flush)(struct request_context *req, struct smb_flush *flush);
60 NTSTATUS (*close)(struct request_context *req, union smb_close *io);
61 NTSTATUS (*exit)(struct request_context *req);
62 NTSTATUS (*lock)(struct request_context *req, union smb_lock *lck);
63 NTSTATUS (*setfileinfo)(struct request_context *req, union smb_setfileinfo *info);
64 NTSTATUS (*qfileinfo)(struct request_context *req, union smb_fileinfo *info);
66 /* filesystem operations */
67 NTSTATUS (*fsinfo)(struct request_context *req, union smb_fsinfo *fs);
69 /* printing specific operations */
70 NTSTATUS (*lpq)(struct request_context *req, union smb_lpq *lpq);
72 /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */
73 NTSTATUS (*trans2)(struct request_context *req, struct smb_trans2 *trans2);
75 /* trans interface - used by IPC backend for pipes and RAP calls */
76 NTSTATUS (*trans)(struct request_context *req, struct smb_trans2 *trans);
80 /* this structure is used by backends to determine the size of some critical types */
81 struct ntvfs_critical_sizes {
82 int interface_version;
85 int sizeof_tcon_context;
86 int sizeof_request_context;