From a0cd12e221af54e00aa7dd971c080881da8b32ac Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 30 Sep 1997 02:38:19 +0000 Subject: 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) --- source3/include/smb.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'source3/include/smb.h') 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 */ -- cgit