summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-09-30 02:38:19 +0000
committerJeremy Allison <jra@samba.org>1997-09-30 02:38:19 +0000
commita0cd12e221af54e00aa7dd971c080881da8b32ac (patch)
treebe048c189de73afeb537b4b49a2d37af5022fd6d /source3/include/smb.h
parenta5af479e5d4e93aaf8b1effdbd9057d2a9b85aea (diff)
downloadsamba-a0cd12e221af54e00aa7dd971c080881da8b32ac.tar.gz
samba-a0cd12e221af54e00aa7dd971c080881da8b32ac.tar.bz2
samba-a0cd12e221af54e00aa7dd971c080881da8b32ac.zip
dir.c: more pstrcpys.
local.h: Add OPLOCK_BREAK_TIMEOUT. password.c: Fix for paranoia password server security bug. proto.h: Updated. reply.c: Oplock changes. server.c: Massive oplock changes - nearly there.... smb.h: oplock definitions. util.c: Add local message processing queues for oplocks. Jeremy (jallison@whistle.com) (This used to be commit 92f1553db2cdf6f32881eb984a87050cf3e4760b)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 07614194f7..c8de001fda 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1014,6 +1014,17 @@ extern int unix_ERR_code;
#define EXTENDED_OPLOCK_REQUEST(inbuf) (((SVAL(inbuf,smb_vwv2)|(1<<1))>>1) | \
((SVAL(inbuf,smb_vwv2)|(1<<2))>>1))
+/* Lock types. */
+#define LOCKING_ANDX_SHARED_LOCK 0x1
+#define LOCKING_ANDX_OPLOCK_RELEASE 0x2
+#define LOCKING_ANDX_CHANGE_LOCKTYPE 0x4
+#define LOCKING_ANDX_CANCEL_LOCK 0x8
+#define LOCKING_ANDX_LARGE_FILES 0x10
+
+/* Oplock levels */
+#define OPLOCKLEVEL_NONE 0
+#define OPLOCKLEVEL_II 1
+
/*
* Bits we test with.
*/
@@ -1023,4 +1034,34 @@ extern int unix_ERR_code;
#define CORE_OPLOCK_GRANTED (1<<5)
#define EXTENDED_OPLOCK_GRANTED (1<<15)
+/*
+ * Loopback command offsets.
+ */
+
+#define UDP_CMD_LEN_OFFSET 0
+#define UDP_CMD_PORT_OFFSET 4
+#define UDP_CMD_HEADER_LEN 6
+
+#define UDP_MESSAGE_CMD_OFFSET 0
+
+/*
+ * Oplock break command code to send over the udp socket.
+ *
+ * Form of this is :
+ *
+ * 0 2 6 10
+ * +----+--------+--------+--------+
+ * | cmd| pid | dev | inode |
+ * +----+--------+--------+--------+
+ */
+
+#define OPLOCK_BREAK_CMD 0x1
+#define OPLOCK_BREAK_PID_OFFSET 2
+#define OPLOCK_BREAK_DEV_OFFSET 6
+#define OPLOCK_BREAK_INODE_OFFSET 10
+#define OPLOCK_BREAK_MSG_LEN 14
+
+
+#define CMD_REPLY 0x8000
+
/* _SMB_H */