summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/vfs_posix.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/posix/vfs_posix.h')
-rw-r--r--source4/ntvfs/posix/vfs_posix.h85
1 files changed, 84 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h
index 6b05240f43..1e6d763fc1 100644
--- a/source4/ntvfs/posix/vfs_posix.h
+++ b/source4/ntvfs/posix/vfs_posix.h
@@ -1,7 +1,7 @@
/*
Unix SMB/CIFS implementation.
- POSIX NTVFS backend - header
+ POSIX NTVFS backend - structure definitions
Copyright (C) Andrew Tridgell 2004
@@ -20,8 +20,91 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#ifndef _VFS_POSIX_H_
+#define _VFS_POSIX_H_
+
/* this is the private structure for the posix vfs backend. It is used
to hold per-connection (per tree connect) state information */
struct pvfs_state {
const char *base_directory;
+
+ uint_t flags;
+
+ struct {
+ /* a linked list of open searches */
+ struct pvfs_search_state *open_searches;
+
+ /* search handles are returned to the clients so they
+ can continue searches */
+ uint16_t next_search_handle;
+
+ /* count of active searches */
+ uint_t num_active_searches;
+
+ /* during trans2 search continuations we need to use
+ the initial search attributes */
+ uint16_t search_attrib;
+ } search;
+};
+
+/*
+ this is the structure returned by pvfs_resolve_name(). It holds the posix details of
+ a filename passed by the client to any function
+*/
+struct pvfs_filename {
+ const char *original_name;
+ char *full_name;
+ const char *stream_name;
+ BOOL has_wildcard;
+ BOOL exists;
+ struct stat st;
+};
+
+
+/* this holds a list of file names for a search. We deliberately do
+ not hold the file stat information here to minimise the memory
+ overhead of idle searches */
+struct pvfs_dir {
+ uint_t count;
+ const char *unix_path;
+ const char **names;
+};
+
+/* the state of a search started with pvfs_search_first() */
+struct pvfs_search_state {
+ struct pvfs_search_state *next, *prev;
+ uint16_t search_attrib;
+ uint16_t handle;
+ uint_t current_index;
+ struct pvfs_dir *dir;
+};
+
+
+/* this is the basic information needed about a file from the filesystem */
+struct pvfs_file_info {
+ NTTIME create_time;
+ NTTIME access_time;
+ NTTIME write_time;
+ NTTIME change_time;
+ uint32_t attrib;
+ uint64_t alloc_size;
+ uint64_t size;
+ uint32_t nlink;
+ uint32_t ea_size;
+ uint64_t file_id;
+ uint64_t unix_uid;
+ uint64_t unix_gid;
+ uint32_t unix_file_type;
+ uint64_t unix_dev_major;
+ uint64_t unix_dev_minor;
+ uint64_t unix_permissions;
};
+
+/* flags to pvfs_resolve_name() */
+#define PVFS_RESOLVE_NO_WILDCARD (1<<0)
+#define PVFS_RESOLVE_STREAMS (1<<1)
+
+/* flags in pvfs->flags */
+#define PVFS_FLAG_CI_FILESYSTEM (1<<0) /* the filesystem is case insensitive */
+
+#endif /* _VFS_POSIX_H_ */