summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/byteorder.h28
-rw-r--r--source4/include/cli_context.h16
-rw-r--r--source4/include/client.h10
-rw-r--r--source4/include/context.h8
-rw-r--r--source4/include/events.h4
-rw-r--r--source4/include/includes.h21
-rw-r--r--source4/include/nameserv.h4
-rw-r--r--source4/include/smb.h4
-rw-r--r--source4/include/smb_interfaces.h342
9 files changed, 215 insertions, 222 deletions
diff --git a/source4/include/byteorder.h b/source4/include/byteorder.h
index a1e161ba6c..e237b5d762 100644
--- a/source4/include/byteorder.h
+++ b/source4/include/byteorder.h
@@ -47,8 +47,8 @@ CAREFUL_ALIGNMENT=0 on those processors as well.
Ok, now to the macros themselves. I'll take a simple example, say we
want to extract a 2 byte integer from a SMB packet and put it into a
-type called uint16 that is in the local machines byte order, and you
-want to do it with only the assumption that uint16 is _at_least_ 16
+type called uint16_t that is in the local machines byte order, and you
+want to do it with only the assumption that uint16_t is _at_least_ 16
bits long (this last condition is very important for architectures
that don't have any int types that are 2 bytes long)
@@ -58,10 +58,10 @@ You do this:
#define PVAL(buf,pos) ((unsigned)CVAL(buf,pos))
#define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
-then to extract a uint16 value at offset 25 in a buffer you do this:
+then to extract a uint16_t value at offset 25 in a buffer you do this:
char *buffer = foo_bar();
-uint16 xx = SVAL(buffer,25);
+uint16_t xx = SVAL(buffer,25);
We are using the byteoder independence of the ANSI C bitshifts to do
the work. A good optimising compiler should turn this into efficient
@@ -117,11 +117,11 @@ it also defines lots of intermediate macros, just ignore those :-)
#define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16)
#define SSVALX(buf,pos,val) (CVAL_NC(buf,pos)=(unsigned char)((val)&0xFF),CVAL_NC(buf,pos+1)=(unsigned char)((val)>>8))
#define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
-#define SVALS(buf,pos) ((int16)SVAL(buf,pos))
+#define SVALS(buf,pos) ((int16_t)SVAL(buf,pos))
#define IVALS(buf,pos) ((int32_t)IVAL(buf,pos))
-#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16)(val)))
+#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16_t)(val)))
#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32_t)(val)))
-#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))
+#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16_t)(val)))
#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32_t)(val)))
#else /* CAREFUL_ALIGNMENT */
@@ -129,24 +129,24 @@ it also defines lots of intermediate macros, just ignore those :-)
/* this handles things for architectures like the 386 that can handle
alignment errors */
/*
- WARNING: This section is dependent on the length of int16 and int32_t
+ WARNING: This section is dependent on the length of int16_t and int32_t
being correct
*/
/* get single value from an SMB buffer */
-#define SVAL(buf,pos) (*(const uint16 *)((const char *)(buf) + (pos)))
-#define SVAL_NC(buf,pos) (*(uint16 *)((char *)(buf) + (pos))) /* Non const version of above. */
+#define SVAL(buf,pos) (*(const uint16_t *)((const char *)(buf) + (pos)))
+#define SVAL_NC(buf,pos) (*(uint16_t *)((char *)(buf) + (pos))) /* Non const version of above. */
#define IVAL(buf,pos) (*(const uint32_t *)((const char *)(buf) + (pos)))
#define IVAL_NC(buf,pos) (*(uint32_t *)((char *)(buf) + (pos))) /* Non const version of above. */
-#define SVALS(buf,pos) (*(const int16 *)((const char *)(buf) + (pos)))
-#define SVALS_NC(buf,pos) (*(int16 *)((char *)(buf) + (pos))) /* Non const version of above. */
+#define SVALS(buf,pos) (*(const int16_t *)((const char *)(buf) + (pos)))
+#define SVALS_NC(buf,pos) (*(int16_t *)((char *)(buf) + (pos))) /* Non const version of above. */
#define IVALS(buf,pos) (*(const int32_t *)((const char *)(buf) + (pos)))
#define IVALS_NC(buf,pos) (*(int32_t *)((char *)(buf) + (pos))) /* Non const version of above. */
/* store single value in an SMB buffer */
-#define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((uint16)(val))
+#define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((uint16_t)(val))
#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((uint32_t)(val))
-#define SSVALS(buf,pos,val) SVALS_NC(buf,pos)=((int16)(val))
+#define SSVALS(buf,pos,val) SVALS_NC(buf,pos)=((int16_t)(val))
#define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((int32_t)(val))
#endif /* CAREFUL_ALIGNMENT */
diff --git a/source4/include/cli_context.h b/source4/include/cli_context.h
index 89f7826789..b94d83ffa1 100644
--- a/source4/include/cli_context.h
+++ b/source4/include/cli_context.h
@@ -46,7 +46,7 @@ struct cli_negotiate {
unsigned max_xmit;
/* maximum number of requests that can be multiplexed */
- uint16 max_mux;
+ uint16_t max_mux;
/* the negotiatiated protocol */
enum protocol_types protocol;
@@ -116,7 +116,7 @@ struct cli_transport {
/* the next mid to be allocated - needed for signing and
request matching */
- uint16 next_mid;
+ uint16_t next_mid;
/* negotiated protocol information */
struct cli_negotiate negotiate;
@@ -143,7 +143,7 @@ struct cli_transport {
union {
struct {
uint8 eclass;
- uint16 ecode;
+ uint16_t ecode;
} dos;
NTSTATUS nt_status;
enum socket_error socket_error;
@@ -154,7 +154,7 @@ struct cli_transport {
struct {
/* a oplock break request handler */
BOOL (*handler)(struct cli_transport *transport,
- uint16 tid, uint16 fnum, uint8 level, void *private);
+ uint16_t tid, uint16_t fnum, uint8 level, void *private);
/* private data passed to the oplock handler */
void *private;
} oplock;
@@ -181,7 +181,7 @@ struct cli_session {
/* after a session setup the server provides us with
a vuid identifying the security context */
- uint16 vuid;
+ uint16_t vuid;
/* default pid for this session */
uint32_t pid;
@@ -202,7 +202,7 @@ struct cli_tree {
/* session layer info */
struct cli_session *session;
- uint16 tid; /* tree id, aka cnum */
+ uint16_t tid; /* tree id, aka cnum */
char *device;
char *fs_type;
};
@@ -225,7 +225,7 @@ struct cli_request {
/* the flags2 from the SMB request, in raw form (host byte
order). Used to parse strings */
- uint16 flags2;
+ uint16_t flags2;
/* the NT status for this request. Set by packet receive code
or code detecting error. */
@@ -239,7 +239,7 @@ struct cli_request {
unsigned int one_way_request:1;
/* the mid of this packet - used to match replies */
- uint16 mid;
+ uint16_t mid;
struct {
/* the raw SMB buffer, including the 4 byte length header */
diff --git a/source4/include/client.h b/source4/include/client.h
index 0750ff4363..c9b3f1c7c5 100644
--- a/source4/include/client.h
+++ b/source4/include/client.h
@@ -41,7 +41,7 @@
typedef struct file_info
{
uint64_t size;
- uint16 mode;
+ uint16_t mode;
uid_t uid;
gid_t gid;
/* these times are normally kept in GMT */
@@ -54,8 +54,8 @@ typedef struct file_info
struct print_job_info
{
- uint16 id;
- uint16 priority;
+ uint16_t id;
+ uint16_t priority;
size_t size;
fstring user;
fstring name;
@@ -104,8 +104,8 @@ struct cli_client
int number_members;
BOOL use_dfs; /* True if client should support Dfs */
int connection_flags; /* see CLI_FULL_CONN.. below */
- uint16 max_xmit_frag;
- uint16 max_recv_frag;
+ uint16_t max_xmit_frag;
+ uint16_t max_recv_frag;
struct cli_state *cli[DFS_MAX_CLUSTER_SIZE];
};
diff --git a/source4/include/context.h b/source4/include/context.h
index 47dd67c813..d2b3d0ffb9 100644
--- a/source4/include/context.h
+++ b/source4/include/context.h
@@ -34,7 +34,7 @@ struct user_context {
request. Note that this may not be the same vuid as we
received on the wire (for example, for share mode or guest
access) */
- uint16 vuid;
+ uint16_t vuid;
/* the domain name, user name etc - mostly used in % substitutions */
struct userdom_struct *user;
@@ -64,7 +64,7 @@ struct tcon_context {
/* a private structure used by the active NTVFS backend */
void *ntvfs_private;
- uint16 cnum; /* an index passed over the wire (the TID) */
+ uint16_t cnum; /* an index passed over the wire (the TID) */
int service;
enum ntvfs_type type;
BOOL read_only;
@@ -99,10 +99,10 @@ struct request_context {
unsigned control_flags;
/* the smb pid is needed for locking contexts */
- uint16 smbpid;
+ uint16_t smbpid;
/* the flags from the SMB request, in raw form (host byte order) */
- uint16 flags, flags2;
+ uint16_t flags, flags2;
/* the system time when the request arrived */
struct timeval request_time;
diff --git a/source4/include/events.h b/source4/include/events.h
index 7d04a38a05..7dde3b2ba0 100644
--- a/source4/include/events.h
+++ b/source4/include/events.h
@@ -27,8 +27,8 @@ struct event_context {
struct fd_event {
struct fd_event *next, *prev;
int fd;
- uint16 flags; /* see EVENT_FD_* flags */
- void (*handler)(struct event_context *ev, struct fd_event *fde, time_t t, uint16 flags);
+ uint16_t flags; /* see EVENT_FD_* flags */
+ void (*handler)(struct event_context *ev, struct fd_event *fde, time_t t, uint16_t flags);
void *private;
int ref_count;
} *fd_events;
diff --git a/source4/include/includes.h b/source4/include/includes.h
index e6593754ed..a47ede6796 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -443,10 +443,12 @@ typedef int socklen_t;
#endif
/*
- Samba needs type definitions for int16, int32_t, uint16 and uint32_t.
+ Samba needs type definitions for
+ int8_t, int16_t, int32_t, int64_t
+ uint8_t, uint16_t, uint32_t and uint64_t.
- Normally these are signed and unsigned 16 and 32 bit integers, but
- they actually only need to be at least 16 and 32 bits
+ Normally these are signed and unsigned 8, 16, 32 and 64 bit integers, but
+ they actually only need to be at least 8, 16, 32 and 64 bits
respectively. Thus if your word size is 8 bytes just defining them
as signed and unsigned int will work.
*/
@@ -456,20 +458,11 @@ typedef int socklen_t;
#endif
#if !defined(int16)
-#if (SIZEOF_SHORT == 4)
-#define int16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;
-#else /* SIZEOF_SHORT != 4 */
-#define int16 short
-#endif /* SIZEOF_SHORT != 4 */
+#define int16 int16_t
#endif
-
#if !defined(uint16)
-#if (SIZEOF_SHORT == 4)
-#define uint16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;
-#else /* SIZEOF_SHORT != 4 */
-#define uint16 unsigned short
-#endif /* SIZEOF_SHORT != 4 */
+#define uint16 uint16_t
#endif
#if !defined(int32)
diff --git a/source4/include/nameserv.h b/source4/include/nameserv.h
index 68cc988280..c8bb670feb 100644
--- a/source4/include/nameserv.h
+++ b/source4/include/nameserv.h
@@ -204,7 +204,7 @@ struct subnet_record;
struct nmb_data
{
- uint16 nb_flags; /* Netbios flags. */
+ uint16_t nb_flags; /* Netbios flags. */
int num_ips; /* Number of ip entries. */
struct in_addr *ip; /* The ip list for this name. */
@@ -391,7 +391,7 @@ struct response_record
struct response_record *next;
struct response_record *prev;
- uint16 response_id;
+ uint16_t response_id;
/* Callbacks for packets received or not. */
response_function resp_fn;
diff --git a/source4/include/smb.h b/source4/include/smb.h
index ea8769681c..74f71a0304 100644
--- a/source4/include/smb.h
+++ b/source4/include/smb.h
@@ -223,7 +223,7 @@ enum socket_error {SOCKET_READ_TIMEOUT,
* SMB UCS2 (16-bit unicode) internal type.
*/
-typedef uint16 smb_ucs2_t;
+typedef uint16_t smb_ucs2_t;
/* ucs2 string types. */
typedef smb_ucs2_t wpstring[PSTRING_LEN];
@@ -919,7 +919,7 @@ struct pwd_info
typedef struct user_struct
{
struct user_struct *next, *prev;
- uint16 vuid; /* Tag for this entry. */
+ uint16_t vuid; /* Tag for this entry. */
DATA_BLOB session_key;
diff --git a/source4/include/smb_interfaces.h b/source4/include/smb_interfaces.h
index 39944f832e..4e6ba6b13b 100644
--- a/source4/include/smb_interfaces.h
+++ b/source4/include/smb_interfaces.h
@@ -60,8 +60,8 @@ typedef struct {
/* struct used for SMBlseek call */
struct smb_seek {
struct {
- uint16 fnum;
- uint16 mode;
+ uint16_t fnum;
+ uint16_t mode;
int32_t offset; /* signed */
} in;
struct {
@@ -74,7 +74,7 @@ struct smb_seek {
struct smb_unlink {
struct {
const char *pattern;
- uint16 attrib;
+ uint16_t attrib;
} in;
};
@@ -134,7 +134,7 @@ union smb_rename {
struct {
const char *pattern1;
const char *pattern2;
- uint16 attrib;
+ uint16_t attrib;
} in;
} rename;
@@ -144,8 +144,8 @@ union smb_rename {
enum rename_level level;
struct {
- uint16 attrib;
- uint16 flags; /* see RENAME_FLAG_* */
+ uint16_t attrib;
+ uint16_t flags; /* see RENAME_FLAG_* */
uint32_t cluster_size;
const char *old_name;
const char *new_name;
@@ -172,8 +172,8 @@ union smb_tcon {
const char *dev;
} in;
struct {
- uint16 max_xmit;
- uint16 cnum;
+ uint16_t max_xmit;
+ uint16_t cnum;
} out;
} tcon;
@@ -182,16 +182,16 @@ union smb_tcon {
enum tcon_level level;
struct {
- uint16 flags;
+ uint16_t flags;
DATA_BLOB password;
const char *path;
const char *device;
} in;
struct {
- uint16 options;
+ uint16_t options;
char *dev_type;
char *fs_type;
- uint16 cnum;
+ uint16_t cnum;
} out;
} tconx;
};
@@ -215,7 +215,7 @@ union smb_sesssetup {
const char *domain;
} in;
struct {
- uint16 vuid;
+ uint16_t vuid;
char *os;
char *lanman;
char *domain;
@@ -227,9 +227,9 @@ union smb_sesssetup {
enum sesssetup_level level;
struct {
- uint16 bufsize;
- uint16 mpx_max;
- uint16 vc_num;
+ uint16_t bufsize;
+ uint16_t mpx_max;
+ uint16_t vc_num;
uint32_t sesskey;
DATA_BLOB password;
const char *user;
@@ -238,8 +238,8 @@ union smb_sesssetup {
const char *lanman;
} in;
struct {
- uint16 action;
- uint16 vuid;
+ uint16_t action;
+ uint16_t vuid;
char *os;
char *lanman;
char *domain;
@@ -251,9 +251,9 @@ union smb_sesssetup {
enum sesssetup_level level;
struct {
- uint16 bufsize;
- uint16 mpx_max;
- uint16 vc_num;
+ uint16_t bufsize;
+ uint16_t mpx_max;
+ uint16_t vc_num;
uint32_t sesskey;
uint32_t capabilities;
DATA_BLOB password1;
@@ -264,8 +264,8 @@ union smb_sesssetup {
const char *lanman;
} in;
struct {
- uint16 action;
- uint16 vuid;
+ uint16_t action;
+ uint16_t vuid;
char *os;
char *lanman;
char *domain;
@@ -278,9 +278,9 @@ union smb_sesssetup {
enum sesssetup_level level;
struct {
- uint16 bufsize;
- uint16 mpx_max;
- uint16 vc_num;
+ uint16_t bufsize;
+ uint16_t mpx_max;
+ uint16_t vc_num;
uint32_t sesskey;
uint32_t capabilities;
DATA_BLOB secblob;
@@ -289,12 +289,12 @@ union smb_sesssetup {
const char *domain;
} in;
struct {
- uint16 action;
+ uint16_t action;
DATA_BLOB secblob;
char *os;
char *lanman;
char *domain;
- uint16 vuid;
+ uint16_t vuid;
} out;
} spnego;
};
@@ -349,11 +349,11 @@ union smb_fileinfo {
* identical */
union smb_fileinfo_in {
const char *fname;
- uint16 fnum;
+ uint16_t fnum;
} in;
struct {
- uint16 attrib;
+ uint16_t attrib;
uint32_t ea_size;
uint_t num_eas;
struct ea_struct {
@@ -374,7 +374,7 @@ union smb_fileinfo {
uint8 delete_pending;
uint8 directory;
uint64_t compressed_size;
- uint16 format;
+ uint16_t format;
uint8 unit_shift;
uint8 chunk_shift;
uint8 cluster_shift;
@@ -401,7 +401,7 @@ union smb_fileinfo {
union smb_fileinfo_in in;
struct {
- uint16 attrib;
+ uint16_t attrib;
uint32_t size;
time_t write_time;
} out;
@@ -418,7 +418,7 @@ union smb_fileinfo {
time_t write_time;
uint32_t size;
uint32_t alloc_size;
- uint16 attrib;
+ uint16_t attrib;
} out;
} getattre;
@@ -433,7 +433,7 @@ union smb_fileinfo {
time_t write_time;
uint32_t size;
uint32_t alloc_size;
- uint16 attrib;
+ uint16_t attrib;
} out;
} standard;
@@ -448,7 +448,7 @@ union smb_fileinfo {
time_t write_time;
uint32_t size;
uint32_t alloc_size;
- uint16 attrib;
+ uint16_t attrib;
uint32_t ea_size;
} out;
} ea_size;
@@ -570,7 +570,7 @@ union smb_fileinfo {
struct {
uint64_t compressed_size;
- uint16 format;
+ uint16_t format;
uint8 unit_shift;
uint8 chunk_shift;
uint8 cluster_shift;
@@ -727,7 +727,7 @@ union smb_setfileinfo {
interface */
union setfileinfo_file {
const char *fname;
- uint16 fnum;
+ uint16_t fnum;
} file;
} generic;
@@ -736,7 +736,7 @@ union smb_setfileinfo {
enum setfileinfo_level level;
union setfileinfo_file file;
struct {
- uint16 attrib;
+ uint16_t attrib;
time_t write_time;
} in;
} setattr;
@@ -943,10 +943,10 @@ union smb_fsinfo {
enum fsinfo_level level;
struct {
- uint16 units_total;
- uint16 blocks_per_unit;
- uint16 block_size;
- uint16 units_free;
+ uint16_t units_total;
+ uint16_t blocks_per_unit;
+ uint16_t block_size;
+ uint16_t units_free;
} out;
} dskattr;
@@ -959,7 +959,7 @@ union smb_fsinfo {
uint32_t sectors_per_unit;
uint32_t total_alloc_units;
uint32_t avail_alloc_units;
- uint16 bytes_per_sector;
+ uint16_t bytes_per_sector;
} out;
} allocation;
@@ -1024,8 +1024,8 @@ union smb_fsinfo {
enum fsinfo_level level;
struct {
- uint16 major_version;
- uint16 minor_version;
+ uint16_t major_version;
+ uint16_t minor_version;
uint64_t capability;
} out;
} unix_info;
@@ -1098,7 +1098,7 @@ union smb_open {
struct {
uint8 oplock_level;
- uint16 fnum;
+ uint16_t fnum;
uint32_t create_action;
NTTIME create_time;
NTTIME access_time;
@@ -1107,8 +1107,8 @@ union smb_open {
uint32_t attrib;
uint64_t alloc_size;
uint64_t size;
- uint16 file_type;
- uint16 ipc_state;
+ uint16_t file_type;
+ uint16_t ipc_state;
uint8 is_directory;
} out;
} ntcreatex, generic;
@@ -1118,11 +1118,11 @@ union smb_open {
enum open_level level;
struct {
- uint16 flags;
- uint16 open_mode;
- uint16 file_attrs;
+ uint16_t flags;
+ uint16_t open_mode;
+ uint16_t file_attrs;
time_t write_time;
- uint16 open_func;
+ uint16_t open_func;
uint32_t size;
uint32_t timeout;
const char *fname;
@@ -1131,14 +1131,14 @@ union smb_open {
} in;
struct {
- uint16 fnum;
- uint16 attrib;
+ uint16_t fnum;
+ uint16_t attrib;
time_t write_time;
uint32_t size;
- uint16 access;
- uint16 ftype;
- uint16 devstate;
- uint16 action;
+ uint16_t access;
+ uint16_t ftype;
+ uint16_t devstate;
+ uint16_t action;
uint32_t unknown;
} out;
} t2open;
@@ -1148,16 +1148,16 @@ union smb_open {
enum open_level level;
struct {
- uint16 flags;
- uint16 search_attrs;
+ uint16_t flags;
+ uint16_t search_attrs;
const char *fname;
} in;
struct {
- uint16 fnum;
- uint16 attrib;
+ uint16_t fnum;
+ uint16_t attrib;
time_t write_time;
uint32_t size;
- uint16 rmode;
+ uint16_t rmode;
} out;
} open;
@@ -1166,12 +1166,12 @@ union smb_open {
enum open_level level;
struct {
- uint16 flags;
- uint16 open_mode;
- uint16 search_attrs; /* not honoured by win2003 */
- uint16 file_attrs;
+ uint16_t flags;
+ uint16_t open_mode;
+ uint16_t search_attrs; /* not honoured by win2003 */
+ uint16_t file_attrs;
time_t write_time; /* not honoured by win2003 */
- uint16 open_func;
+ uint16_t open_func;
uint32_t size; /* note that this sets the
initial file size, not
just allocation size */
@@ -1179,14 +1179,14 @@ union smb_open {
const char *fname;
} in;
struct {
- uint16 fnum;
- uint16 attrib;
+ uint16_t fnum;
+ uint16_t attrib;
time_t write_time;
uint32_t size;
- uint16 access;
- uint16 ftype;
- uint16 devstate;
- uint16 action;
+ uint16_t access;
+ uint16_t ftype;
+ uint16_t devstate;
+ uint16_t action;
uint32_t unique_fid;
uint32_t access_mask;
uint32_t unknown;
@@ -1198,12 +1198,12 @@ union smb_open {
enum open_level level;
struct {
- uint16 attrib;
+ uint16_t attrib;
time_t write_time;
const char *fname;
} in;
struct {
- uint16 fnum;
+ uint16_t fnum;
} out;
} mknew, create;
@@ -1212,12 +1212,12 @@ union smb_open {
enum open_level level;
struct {
- uint16 attrib;
+ uint16_t attrib;
time_t write_time;
const char *directory;
} in;
struct {
- uint16 fnum;
+ uint16_t fnum;
/* temp name, relative to directory */
char *name;
} out;
@@ -1228,12 +1228,12 @@ union smb_open {
enum open_level level;
struct {
- uint16 setup_length;
- uint16 mode;
+ uint16_t setup_length;
+ uint16_t mode;
const char *ident;
} in;
struct {
- uint16 fnum;
+ uint16_t fnum;
} out;
} splopen;
};
@@ -1253,7 +1253,7 @@ union smb_read {
enum read_level level;
struct {
- uint16 fnum;
+ uint16_t fnum;
uint64_t offset;
uint32_t size;
} in;
@@ -1269,10 +1269,10 @@ union smb_read {
enum read_level level;
struct {
- uint16 fnum;
+ uint16_t fnum;
uint64_t offset;
- uint16 maxcnt;
- uint16 mincnt;
+ uint16_t maxcnt;
+ uint16_t mincnt;
uint32_t timeout;
} in;
struct {
@@ -1287,14 +1287,14 @@ union smb_read {
enum read_level level;
struct {
- uint16 fnum;
- uint16 count;
+ uint16_t fnum;
+ uint16_t count;
uint32_t offset;
- uint16 remaining;
+ uint16_t remaining;
} in;
struct {
char *data;
- uint16 nread;
+ uint16_t nread;
} out;
} lockread;
@@ -1303,14 +1303,14 @@ union smb_read {
enum read_level level;
struct {
- uint16 fnum;
- uint16 count;
+ uint16_t fnum;
+ uint16_t count;
uint32_t offset;
- uint16 remaining;
+ uint16_t remaining;
} in;
struct {
char *data;
- uint16 nread;
+ uint16_t nread;
} out;
} read;
@@ -1319,17 +1319,17 @@ union smb_read {
enum read_level level;
struct {
- uint16 fnum;
+ uint16_t fnum;
uint64_t offset;
- uint16 mincnt;
- uint16 maxcnt;
- uint16 remaining;
+ uint16_t mincnt;
+ uint16_t maxcnt;
+ uint16_t remaining;
} in;
struct {
char *data;
- uint16 remaining;
- uint16 compaction_mode;
- uint16 nread;
+ uint16_t remaining;
+ uint16_t compaction_mode;
+ uint16_t nread;
} out;
} readx;
};
@@ -1346,7 +1346,7 @@ union smb_write {
enum write_level level;
struct {
- uint16 fnum;
+ uint16_t fnum;
uint64_t offset;
uint32_t count;
const char *data;
@@ -1362,10 +1362,10 @@ union smb_write {
enum write_level level;
struct {
- uint16 fnum;
- uint16 count;
+ uint16_t fnum;
+ uint16_t count;
uint32_t offset;
- uint16 remaining;
+ uint16_t remaining;
const char *data;
} in;
struct {
@@ -1378,14 +1378,14 @@ union smb_write {
enum write_level level;
struct {
- uint16 fnum;
- uint16 count;
+ uint16_t fnum;
+ uint16_t count;
uint32_t offset;
- uint16 remaining;
+ uint16_t remaining;
const char *data;
} in;
struct {
- uint16 nwritten;
+ uint16_t nwritten;
} out;
} write;
@@ -1394,16 +1394,16 @@ union smb_write {
enum write_level level;
struct {
- uint16 fnum;
+ uint16_t fnum;
uint64_t offset;
- uint16 wmode;
- uint16 remaining;
+ uint16_t wmode;
+ uint16_t remaining;
uint32_t count;
const char *data;
} in;
struct {
uint32_t nwritten;
- uint16 remaining;
+ uint16_t remaining;
} out;
} writex;
@@ -1412,14 +1412,14 @@ union smb_write {
enum write_level level;
struct {
- uint16 fnum;
- uint16 count;
+ uint16_t fnum;
+ uint16_t count;
uint32_t offset;
time_t mtime;
const char *data;
} in;
struct {
- uint16 nwritten;
+ uint16_t nwritten;
} out;
} writeclose;
@@ -1428,8 +1428,8 @@ union smb_write {
enum write_level level;
struct {
- uint16 fnum;
- uint16 count;
+ uint16_t fnum;
+ uint16_t count;
const char *data;
} in;
} splwrite;
@@ -1452,7 +1452,7 @@ union smb_lock {
enum lock_level level;
struct {
- uint16 fnum;
+ uint16_t fnum;
uint32_t count;
uint32_t offset;
} in;
@@ -1463,7 +1463,7 @@ union smb_lock {
enum lock_level level;
struct {
- uint16 fnum;
+ uint16_t fnum;
uint32_t count;
uint32_t offset;
} in;
@@ -1474,13 +1474,13 @@ union smb_lock {
enum lock_level level;
struct {
- uint16 fnum;
- uint16 mode;
+ uint16_t fnum;
+ uint16_t mode;
uint32_t timeout;
- uint16 ulock_cnt;
- uint16 lock_cnt;
+ uint16_t ulock_cnt;
+ uint16_t lock_cnt;
struct smb_lock_entry {
- uint16 pid;
+ uint16_t pid;
uint64_t offset;
uint64_t count;
} *locks; /* unlocks are first in the arrray */
@@ -1500,7 +1500,7 @@ union smb_close {
enum close_enum level;
struct {
- uint16 fnum;
+ uint16_t fnum;
} in;
} generic;
@@ -1509,7 +1509,7 @@ union smb_close {
enum close_enum level;
struct {
- uint16 fnum;
+ uint16_t fnum;
time_t write_time;
} in;
} close;
@@ -1519,7 +1519,7 @@ union smb_close {
enum close_enum level;
struct {
- uint16 fnum;
+ uint16_t fnum;
} in;
} splclose;
};
@@ -1543,16 +1543,16 @@ union smb_lpq {
enum lpq_level level;
struct {
- uint16 maxcount;
- uint16 startidx;
+ uint16_t maxcount;
+ uint16_t startidx;
} in;
struct {
- uint16 count;
- uint16 restart_idx;
+ uint16_t count;
+ uint16_t restart_idx;
struct {
time_t time;
uint8 status;
- uint16 job;
+ uint16_t job;
uint32_t size;
char *user;
} *queue;
@@ -1576,7 +1576,7 @@ union smb_ioctl {
struct {
enum ioctl_level level;
struct {
- uint16 fnum;
+ uint16_t fnum;
uint32_t request;
} in;
struct {
@@ -1590,7 +1590,7 @@ union smb_ioctl {
enum ioctl_level level;
struct {
uint32_t function;
- uint16 fnum;
+ uint16_t fnum;
BOOL fsctl;
uint8 filter;
} in;
@@ -1603,7 +1603,7 @@ union smb_ioctl {
/* struct for SMBflush */
struct smb_flush {
struct {
- uint16 fnum;
+ uint16_t fnum;
} in;
};
@@ -1611,14 +1611,14 @@ struct smb_flush {
/* struct for SMBcopy */
struct smb_copy {
struct {
- uint16 tid2;
- uint16 ofun;
- uint16 flags;
+ uint16_t tid2;
+ uint16_t ofun;
+ uint16_t flags;
const char *path1;
const char *path2;
} in;
struct {
- uint16 count;
+ uint16_t count;
} out;
};
@@ -1626,13 +1626,13 @@ struct smb_copy {
/* struct for transact/transact2 call */
struct smb_trans2 {
struct {
- uint16 max_param;
- uint16 max_data;
+ uint16_t max_param;
+ uint16_t max_data;
uint8 max_setup;
- uint16 flags;
+ uint16_t flags;
uint32_t timeout;
uint8 setup_count;
- uint16 *setup;
+ uint16_t *setup;
const char *trans_name; /* SMBtrans only */
DATA_BLOB params;
DATA_BLOB data;
@@ -1640,7 +1640,7 @@ struct smb_trans2 {
struct {
uint8 setup_count;
- uint16 *setup;
+ uint16_t *setup;
DATA_BLOB params;
DATA_BLOB data;
} out;
@@ -1653,15 +1653,15 @@ struct smb_nttrans {
uint32_t max_param;
uint32_t max_data;
uint32_t setup_count;
- uint16 function;
- uint16 *setup;
+ uint16_t function;
+ uint16_t *setup;
DATA_BLOB params;
DATA_BLOB data;
} in;
struct {
uint8 setup_count;
- uint16 *setup;
+ uint16_t *setup;
DATA_BLOB params;
DATA_BLOB data;
} out;
@@ -1673,7 +1673,7 @@ struct smb_notify {
struct {
uint32_t buffer_size;
uint32_t completion_filter;
- uint16 fnum;
+ uint16_t fnum;
BOOL recursive;
} in;
@@ -1712,12 +1712,12 @@ union smb_search_first {
enum search_level level;
struct {
- uint16 max_count;
- uint16 search_attrib;
+ uint16_t max_count;
+ uint16_t search_attrib;
const char *pattern;
} in;
struct {
- int16 count;
+ int16_t count;
} out;
} search_first;
@@ -1726,16 +1726,16 @@ union smb_search_first {
enum search_level level;
struct {
- uint16 search_attrib;
- uint16 max_count;
- uint16 flags;
+ uint16_t search_attrib;
+ uint16_t max_count;
+ uint16_t flags;
uint32_t storage_type;
const char *pattern;
} in;
struct {
- uint16 handle;
- uint16 count;
- uint16 end_of_search;
+ uint16_t handle;
+ uint16_t count;
+ uint16_t end_of_search;
} out;
} t2ffirst;
};
@@ -1751,12 +1751,12 @@ union smb_search_next {
enum search_level level;
struct {
- uint16 max_count;
- uint16 search_attrib;
+ uint16_t max_count;
+ uint16_t search_attrib;
DATA_BLOB search_id;
} in;
struct {
- uint16 count;
+ uint16_t count;
} out;
} search_next;
@@ -1765,15 +1765,15 @@ union smb_search_next {
enum search_level level;
struct {
- uint16 handle;
- uint16 max_count;
+ uint16_t handle;
+ uint16_t max_count;
uint32_t resume_key;
- uint16 flags;
+ uint16_t flags;
const char *last_name;
} in;
struct {
- uint16 count;
- uint16 end_of_search;
+ uint16_t count;
+ uint16_t end_of_search;
} out;
} t2fnext;
};
@@ -1782,7 +1782,7 @@ union smb_search_next {
union smb_search_data {
/* search (old) findfirst */
struct {
- uint16 attrib;
+ uint16_t attrib;
time_t write_time;
uint32_t size;
DATA_BLOB search_id; /* used to resume search from this point */
@@ -1797,7 +1797,7 @@ union smb_search_data {
time_t write_time;
uint32_t size;
uint32_t alloc_size;
- uint16 attrib;
+ uint16_t attrib;
WIRE_STRING name;
} standard;
@@ -1809,7 +1809,7 @@ union smb_search_data {
time_t write_time;
uint32_t size;
uint32_t alloc_size;
- uint16 attrib;
+ uint16_t attrib;
uint32_t ea_size;
WIRE_STRING name;
} ea_size;
@@ -1927,12 +1927,12 @@ union smb_search_close {
enum search_level level;
struct {
- uint16 max_count;
- uint16 search_attrib;
+ uint16_t max_count;
+ uint16_t search_attrib;
DATA_BLOB search_id;
} in;
struct {
- uint16 count;
+ uint16_t count;
} out;
} search_next;
@@ -1941,7 +1941,7 @@ union smb_search_close {
enum search_close_level level;
struct {
- uint16 handle;
+ uint16_t handle;
} in;
} findclose;
};