From 33174847994128387a36a8103f147fe5a96c15fd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 12 Jan 2006 22:17:54 +0000 Subject: r12877: Stop passing structs around in smb messages, instead always linearize into little-endian. Should fix all Solaris issues with this, plus provide a cleaner base moving forward for cluster-aware Samba where smbd's can communicate across different compilers/architectures (eventually these message will have to go cross-machine). Jeremy. (This used to be commit d01824b78576a034428e1cef73868d1169057991) --- source3/include/smb.h | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'source3/include/smb.h') diff --git a/source3/include/smb.h b/source3/include/smb.h index d2eb5644e0..6ceb4ec1cd 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -631,6 +631,25 @@ struct share_mode_entry { unsigned long share_file_id; }; +/* oplock break message definition - linearization of share_mode_entry. + +Offset Data length. +0 struct process_id pid 4 +4 uint16 op_mid 2 +6 uint16 op_type 2 +8 uint32 access_mask 4 +12 uint32 share_access 4 +16 uint32 private_options 4 +20 uint32 time sec 4 +24 uint32 time usec 4 +28 SMB_DEV_T dev 8 bytes. +36 SMB_INO_T inode 8 bytes +44 unsigned long file_id 4 bytes +48 + +*/ +#define MSG_SMB_SHARE_MODE_ENTRY_SIZE 48 + struct share_mode_lock { const char *servicepath; /* canonicalized. */ const char *filename; @@ -1456,18 +1475,41 @@ struct inform_level2_message { unsigned long source_file_id; }; +/* kernel_oplock_message definition. + struct kernel_oplock_message { SMB_DEV_T dev; SMB_INO_T inode; unsigned long file_id; }; +Offset Data length. +0 SMB_DEV_T dev 8 bytes. +8 SMB_INO_T inode 8 bytes +16 unsigned long file_id 4 bytes +20 + +*/ +#define MSG_SMB_KERNEL_BREAK_SIZE 20 + +/* file_renamed_message definition. + struct file_renamed_message { SMB_DEV_T dev; SMB_INO_T inode; - char names[1]; /* A variable area containing sharepath and filename. */ + char names[1]; A variable area containing sharepath and filename. }; +Offset Data length. +0 SMB_DEV_T dev 8 bytes. +8 SMB_INO_T inode 8 bytes +16 char [] name zero terminated namelen bytes +minimum length == 18. + +*/ + +#define MSG_FILE_RENAMED_MIN_SIZE 16 + /* * On the wire return values for oplock types. */ -- cgit