summaryrefslogtreecommitdiffstats
path: root/source3/include/smb.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-06-10 13:38:07 +0000
committerAndrew Tridgell <tridge@samba.org>2000-06-10 13:38:07 +0000
commit52cb05678a9b08b5aa7dbe13ae6b54ff9ee4ecac (patch)
tree3d8dfdc81837b743cbfd383b6f9203df5e4c5285 /source3/include/smb.h
parenta9a512192d05d6559d0315be96e0bfcf8800f69e (diff)
downloadsamba-52cb05678a9b08b5aa7dbe13ae6b54ff9ee4ecac.tar.gz
samba-52cb05678a9b08b5aa7dbe13ae6b54ff9ee4ecac.tar.xz
samba-52cb05678a9b08b5aa7dbe13ae6b54ff9ee4ecac.zip
continued the split of the kernel level oplocks code into a more
modular form. In this pass I added oplock_irix.c and added a "struct kernel_oplocks" that describes a kernel oplock implementation. (This used to be commit b5ceab810292602ea9a81696c20a781c16b706c2)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 91f0e04b48f..d2c79e3b534 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1598,6 +1598,7 @@ extern int chain_size;
#define OPLOCK_BREAK_INODE_OFFSET (OPLOCK_BREAK_DEV_OFFSET + sizeof(SMB_DEV_T))
#define OPLOCK_BREAK_MSG_LEN (OPLOCK_BREAK_INODE_OFFSET + sizeof(SMB_INO_T))
+#define KERNEL_OPLOCK_BREAK_CMD 0x2
#define LEVEL_II_OPLOCK_BREAK_CMD 0x3
/*
@@ -1618,13 +1619,24 @@ extern int chain_size;
* +----+--------+--------+
*/
-#define KERNEL_OPLOCK_BREAK_CMD 0x2
#define KERNEL_OPLOCK_BREAK_DEV_OFFSET 2
#define KERNEL_OPLOCK_BREAK_INODE_OFFSET (KERNEL_OPLOCK_BREAK_DEV_OFFSET + sizeof(SMB_DEV_T))
#define KERNEL_OPLOCK_BREAK_MSG_LEN (KERNEL_OPLOCK_BREAK_INODE_OFFSET + sizeof(SMB_INO_T))
#endif /* HAVE_KERNEL_OPLOCKS_IRIX */
+/* if a kernel does support oplocks then a structure of the following
+ typee is used to describe how to interact with the kernel */
+struct kernel_oplocks {
+ BOOL (*receive_message)(fd_set *fds, char *buffer, int buffer_len);
+ BOOL (*set_oplock)(files_struct *fsp, int oplock_type);
+ void (*release_oplock)(files_struct *fsp);
+ BOOL (*parse_message)(char *msg_start, int msg_len, SMB_INO_T *inode, SMB_DEV_T *dev);
+ BOOL (*msg_waiting)(fd_set *fds);
+ int notification_fd;
+};
+
+
#define CMD_REPLY 0x8000
#include "smb_macros.h"