summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-04-10 15:33:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:57 -0500
commit22dbd67708f1651a2341d70ce576fac360affccf (patch)
tree83b1bb601be996716bd4e8d3ae79e94df056df2e /source3/include/smb.h
parent0f985dcb1978afd4b383116f01b3acf65c39ecd7 (diff)
downloadsamba-22dbd67708f1651a2341d70ce576fac360affccf.tar.gz
samba-22dbd67708f1651a2341d70ce576fac360affccf.tar.bz2
samba-22dbd67708f1651a2341d70ce576fac360affccf.zip
r15018: Merge Volker's ipc/trans2/nttrans changes over
into 3.0. Also merge the new POSIX lock code - this is not enabled unless -DDEVELOPER is defined. This doesn't yet map onto underlying system POSIX locks. Updates vfs to allow lock queries. Jeremy. (This used to be commit 08e52ead03304ff04229e1bfe544ff40e2564fc7)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h47
1 files changed, 45 insertions, 2 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 8faf3877ce..9531ae2903 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -486,6 +486,36 @@ typedef struct {
BOOL is_wild;
} name_compare_entry;
+struct trans_state {
+ struct trans_state *next, *prev;
+ uint16 vuid;
+ uint16 mid;
+
+ uint32 max_param_return;
+ uint32 max_data_return;
+ uint32 max_setup_return;
+
+ uint8 cmd; /* SMBtrans or SMBtrans2 */
+
+ fstring name; /* for trans requests */
+ uint16 call; /* for trans2 and nttrans requests */
+
+ BOOL close_on_completion;
+ BOOL one_way;
+
+ unsigned int setup_count;
+ uint16 *setup;
+
+ size_t received_data;
+ size_t received_param;
+
+ size_t total_param;
+ char *param;
+
+ size_t total_data;
+ char *data;
+};
+
/* Include VFS stuff */
#include "smb_acls.h"
@@ -550,6 +580,7 @@ typedef struct connection_struct {
name_compare_entry *veto_oplock_list; /* Per-share list of files to refuse oplocks on. */
name_compare_entry *aio_write_behind_list; /* Per-share list of files to use aio write behind on. */
struct dfree_cached_info *dfree_info;
+ struct trans_state *pending_trans;
} connection_struct;
struct current_user {
@@ -799,17 +830,29 @@ struct parm_struct {
#define FLAG_HIDE 0x2000 /* options that should be hidden in SWAT */
#define FLAG_DOS_STRING 0x4000 /* convert from UNIX to DOS codepage when reading this string. */
-/* passed to br lock code */
-enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_LOCK};
+/* passed to br lock code - the UNLOCK_LOCK should never be stored into the tdb
+ and is used in calculating POSIX unlock ranges only. */
+
+enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_LOCK, UNLOCK_LOCK};
+enum brl_flavour {WINDOWS_LOCK = 0, POSIX_LOCK = 1};
+
+struct byte_range_lock {
+ files_struct *fsp;
+ unsigned int num_locks;
+ BOOL modified;
+ void *lock_data;
+};
#define BRLOCK_FN_CAST() \
void (*)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \
enum brl_type lock_type, \
+ enum brl_flavour lock_flav, \
br_off start, br_off size)
#define BRLOCK_FN(fn) \
void (*fn)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \
enum brl_type lock_type, \
+ enum brl_flavour lock_flav, \
br_off start, br_off size)
struct bitmap {