diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-10-24 11:39:28 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-10-24 17:46:47 +0200 |
commit | f3c25bc6a5f23a248f832fa58c59c16522ac255b (patch) | |
tree | d80783fa925cebf763703a870f54d14c01d62290 /libcli | |
parent | 2414169241c874b3c764d91b598e1c2c0939e037 (diff) | |
download | samba-f3c25bc6a5f23a248f832fa58c59c16522ac255b.tar.gz samba-f3c25bc6a5f23a248f832fa58c59c16522ac255b.tar.bz2 samba-f3c25bc6a5f23a248f832fa58c59c16522ac255b.zip |
libcli/smb: merge LOCKING_ANDX_* and OPLOCK_* defines to smb_constants.h
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 24 17:46:47 CEST 2011 on sn-devel-104
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/smb/smb_constants.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h index 934a022481..bde66dc879 100644 --- a/libcli/smb/smb_constants.h +++ b/libcli/smb/smb_constants.h @@ -295,6 +295,40 @@ enum csc_policy { #define FILE_TYPE_COMM_DEVICE 4 #define FILE_TYPE_UNKNOWN 0xFFFF +/* Lock types. */ +#define LOCKING_ANDX_EXCLUSIVE_LOCK 0x00 +#define LOCKING_ANDX_SHARED_LOCK 0x01 +#define LOCKING_ANDX_OPLOCK_RELEASE 0x02 +#define LOCKING_ANDX_CHANGE_LOCKTYPE 0x04 +#define LOCKING_ANDX_CANCEL_LOCK 0x08 +#define LOCKING_ANDX_LARGE_FILES 0x10 + +/* + * Bits we test with. + */ + +#define OPLOCK_NONE 0 +#define OPLOCK_EXCLUSIVE 1 +#define OPLOCK_BATCH 2 +#define OPLOCK_LEVEL_II 4 + +#define CORE_OPLOCK_GRANTED (1<<5) +#define EXTENDED_OPLOCK_GRANTED (1<<15) + +/* + * Return values for oplock types. + */ + +#define NO_OPLOCK_RETURN 0 +#define EXCLUSIVE_OPLOCK_RETURN 1 +#define BATCH_OPLOCK_RETURN 2 +#define LEVEL_II_OPLOCK_RETURN 3 + +/* oplock levels sent in oplock break */ +#define OPLOCK_BREAK_TO_NONE 0 +#define OPLOCK_BREAK_TO_LEVEL_II 1 + + /* ioctl codes */ #define IOCTL_QUERY_JOB_INFO 0x530060 |