summaryrefslogtreecommitdiff
path: root/source3/include/trans2.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/trans2.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/trans2.h')
-rw-r--r--source3/include/trans2.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/include/trans2.h b/source3/include/trans2.h
index 1d5dfe3678..92c5a2e963 100644
--- a/source3/include/trans2.h
+++ b/source3/include/trans2.h
@@ -441,7 +441,9 @@ Offset Size Name
#define SMB_QUERY_ATTR_FLAGS 0x206 /* chflags, chattr */
#define SMB_SET_ATTR_FLAGS 0x206
#define SMB_QUERY_POSIX_PERMISSION 0x207
+/* Only valid for qfileinfo */
#define SMB_QUERY_POSIX_LOCK 0x208
+/* Only valid for setfileinfo */
#define SMB_SET_POSIX_LOCK 0x208
/* Transact 2 Find First levels */
@@ -576,4 +578,28 @@ number of entries sent will be zero.
#define SMB_POSIX_ACL_ENTRY_SIZE 10
#define SMB_POSIX_IGNORE_ACE_ENTRIES 0xFFFF
+
+/* Definition of SMB_SET_POSIX_LOCK */
+/*
+ [2 bytes] lock_type - 0 = Read, 1 = Write, 2 = Unlock
+ [2 bytes] lock_flags - 1 = Wait (only valid for setlock)
+ [4 bytes] pid = locking context.
+ [8 bytes] start = unsigned 64 bits.
+ [8 bytes] length = unsigned 64 bits.
+*/
+
+#define POSIX_LOCK_TYPE_OFFSET 0
+#define POSIX_LOCK_FLAGS_OFFSET 2
+#define POSIX_LOCK_PID_OFFSET 4
+#define POSIX_LOCK_START_OFFSET 8
+#define POSIX_LOCK_LEN_OFFSET 16
+#define POSIX_LOCK_DATA_SIZE 24
+
+#define POSIX_LOCK_FLAG_NOWAIT 0
+#define POSIX_LOCK_FLAG_WAIT 1
+
+#define POSIX_LOCK_TYPE_READ 0
+#define POSIX_LOCK_TYPE_WRITE 1
+#define POSIX_LOCK_TYPE_UNLOCK 2
+
#endif