summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-08-31 20:20:54 +0000
committerJeremy Allison <jra@samba.org>1998-08-31 20:20:54 +0000
commit693480af8bb2d3e83566af9463ca427f47a879da (patch)
treecb7070685621c8b4ffd651c8108e1450bf3272d9 /source3/include/smb.h
parentd2e0d0f73bfce64665feb386e2cc4032258ad437 (diff)
downloadsamba-693480af8bb2d3e83566af9463ca427f47a879da.tar.gz
samba-693480af8bb2d3e83566af9463ca427f47a879da.tar.bz2
samba-693480af8bb2d3e83566af9463ca427f47a879da.zip
configure.in, configure: include/config.h.in: Added stropts and poll.
include/smb.h: Moved old typedefs of uint8 etc. into include/includes.h where all the other defines live (changed them from typedefs to defines). Other changes : changed from using uint32 to SMB_DEV_T and SMB_INO_T in preparation for moving to size independed (ie. 64 bit clean) device and inode access. Stat call wrapper comes next :-). Jeremy. (This used to be commit 3d9ec96de5e04e83abafe9c5d980bd39eee856ea)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h53
1 files changed, 12 insertions, 41 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 90435b208e..b27c531937 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -48,35 +48,6 @@ typedef int BOOL;
/* limiting size of ipc replies */
#define REALLOC(ptr,size) Realloc(ptr,MAX((size),4*1024))
-/*
- Samba needs type definitions for int16, int32, uint16 and uint32.
-
- Normally these are signed and unsigned 16 and 32 bit integers, but
- they actually only need to be at least 16 and 32 bits
- respectively. Thus if your word size is 8 bytes just defining them
- as signed and unsigned int will work.
-*/
-
-#ifndef uint8
-typedef unsigned char uint8;
-#endif
-
-#ifndef uint16
-typedef unsigned short uint16;
-#endif
-
-#ifndef uchar
-#define uchar unsigned char
-#endif
-
-#ifndef int16
-#define int16 short
-#endif
-
-#ifndef uint16
-#define uint16 unsigned short
-#endif
-
#define SIZEOFWORD 2
#ifndef DEF_CREATE_MASK
@@ -507,8 +478,8 @@ typedef struct file_fd_struct
uint16 ref_count;
uint16 uid_cache_count;
uid_t uid_users_cache[10];
- uint32 dev;
- uint32 inode;
+ SMB_DEV_T dev;
+ SMB_INO_T inode;
int fd;
int fdnum;
int fd_readonly;
@@ -701,9 +672,9 @@ typedef struct
to support the following operations */
struct share_ops {
BOOL (*stop_mgmt)(void);
- BOOL (*lock_entry)(connection_struct *, uint32 , uint32 , int *);
- BOOL (*unlock_entry)(connection_struct *, uint32 , uint32 , int );
- int (*get_entries)(connection_struct *, int , uint32 , uint32 , share_mode_entry **);
+ BOOL (*lock_entry)(connection_struct *, SMB_DEV_T , SMB_INO_T , int *);
+ BOOL (*unlock_entry)(connection_struct *, SMB_DEV_T , SMB_INO_T , int );
+ int (*get_entries)(connection_struct *, int , SMB_DEV_T , SMB_INO_T , share_mode_entry **);
void (*del_entry)(int , files_struct *);
BOOL (*set_entry)(int, files_struct *, uint16 , uint16 );
BOOL (*remove_oplock)(files_struct *, int);
@@ -1551,19 +1522,19 @@ extern int unix_ERR_code;
*
* Form of this is :
*
- * 0 2 6 10 14 18 22
+ * 0 2 6 10 14 14+devsize 14+devsize+inodesize
* +----+--------+--------+--------+-------+--------+
- * | cmd| pid | dev | inode | sec | usec |
+ * | cmd| pid | sec | usec | 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_SEC_OFFSET 14
-#define OPLOCK_BREAK_USEC_OFFSET 18
-#define OPLOCK_BREAK_MSG_LEN 22
+#define OPLOCK_BREAK_SEC_OFFSET 6
+#define OPLOCK_BREAK_USEC_OFFSET 10
+#define OPLOCK_BREAK_DEV_OFFSET 14
+#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 CMD_REPLY 0x8000