summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-05-25 17:24:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:16 -0500
commitf88bf54c7f6d1c2ef833047eb8327953c304b5ff (patch)
tree07da4ab8641b2200eaca5b5ea9adba26b0712277
parentf2ad98a165cdec6d344a96aeb21a38518a10720a (diff)
downloadsamba-f88bf54c7f6d1c2ef833047eb8327953c304b5ff.tar.gz
samba-f88bf54c7f6d1c2ef833047eb8327953c304b5ff.tar.bz2
samba-f88bf54c7f6d1c2ef833047eb8327953c304b5ff.zip
r889: convert samba4 to use [u]int16_t instead of [u]int16
metze (This used to be commit af6f1f8a01bebbecd99bc8c066519e89966e65e3)
-rw-r--r--source4/auth/auth_domain.c8
-rw-r--r--source4/auth/auth_sam.c6
-rw-r--r--source4/build/m4/rewrite.m42
-rw-r--r--source4/client/client.c18
-rw-r--r--source4/client/clitar.c12
-rw-r--r--source4/client/smbmount.c2
-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
-rw-r--r--source4/lib/cmdline/popt_common.c2
-rw-r--r--source4/lib/events.c2
-rw-r--r--source4/lib/smbpasswd.c8
-rw-r--r--source4/lib/tdb/common/tdbutil.c8
-rw-r--r--source4/lib/time.c12
-rw-r--r--source4/lib/util_str.c4
-rw-r--r--source4/libads/krb5_setpw.c4
-rw-r--r--source4/libads/ldap.c4
-rw-r--r--source4/libcli/auth/ntlmssp_parse.c2
-rw-r--r--source4/libcli/clidfs.c4
-rw-r--r--source4/libcli/clifile.c6
-rw-r--r--source4/libcli/clilist.c6
-rw-r--r--source4/libcli/clireadwrite.c2
-rw-r--r--source4/libcli/clitrans2.c6
-rw-r--r--source4/libcli/nmblib.c2
-rw-r--r--source4/libcli/raw/clioplock.c2
-rw-r--r--source4/libcli/raw/clisession.c4
-rw-r--r--source4/libcli/raw/clitransport.c4
-rw-r--r--source4/libcli/raw/raweas.c2
-rw-r--r--source4/libcli/raw/rawfile.c8
-rw-r--r--source4/libcli/raw/rawfileinfo.c8
-rw-r--r--source4/libcli/raw/rawfsinfo.c8
-rw-r--r--source4/libcli/raw/rawioctl.c2
-rw-r--r--source4/libcli/raw/rawnotify.c2
-rw-r--r--source4/libcli/raw/rawrequest.c18
-rw-r--r--source4/libcli/raw/rawsearch.c24
-rw-r--r--source4/libcli/raw/rawsetfileinfo.c10
-rw-r--r--source4/libcli/raw/rawtrans.c6
-rw-r--r--source4/libcli/raw/smb_signing.c2
-rw-r--r--source4/libcli/util/smbencrypt.c2
-rw-r--r--source4/libcli/util/smberr.c2
-rw-r--r--source4/librpc/ndr/ndr.c2
-rw-r--r--source4/librpc/ndr/ndr_basic.c18
-rw-r--r--source4/librpc/ndr/ndr_sec.h4
-rw-r--r--source4/librpc/rpc/dcerpc.c8
-rw-r--r--source4/librpc/rpc/dcerpc_smb.c6
-rw-r--r--source4/ntvfs/cifs/vfs_cifs.c4
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c16
-rw-r--r--source4/ntvfs/reference/ref.h4
-rw-r--r--source4/ntvfs/simple/svfs.h4
-rw-r--r--source4/ntvfs/simple/svfs_util.c4
-rw-r--r--source4/rpc_server/dcerpc_server.c4
-rw-r--r--source4/rpc_server/dcerpc_tcp.c6
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c6
-rw-r--r--source4/rpc_server/remote/dcesrv_remote.c2
-rw-r--r--source4/rpc_server/samr/samdb.c2
-rw-r--r--source4/rpc_server/samr/samr_utils.c8
-rw-r--r--source4/smb_server/conn.c2
-rw-r--r--source4/smb_server/negprot.c14
-rw-r--r--source4/smb_server/nttrans.c20
-rw-r--r--source4/smb_server/password.c4
-rw-r--r--source4/smb_server/reply.c16
-rw-r--r--source4/smb_server/request.c6
-rw-r--r--source4/smb_server/search.c6
-rw-r--r--source4/smb_server/service.c2
-rw-r--r--source4/smb_server/signing.c2
-rw-r--r--source4/smb_server/smb_server.c14
-rw-r--r--source4/smb_server/trans2.c54
-rw-r--r--source4/smbd/build_options.c2
-rw-r--r--source4/smbd/process_model.h4
-rw-r--r--source4/smbd/process_single.c4
-rw-r--r--source4/smbd/process_standard.c4
-rw-r--r--source4/smbd/process_thread.c4
-rw-r--r--source4/smbd/server.c4
-rw-r--r--source4/torture/basic/aliases.c18
-rw-r--r--source4/torture/basic/scanner.c2
-rw-r--r--source4/torture/gentest.c46
-rw-r--r--source4/torture/nbench/nbio.c2
-rw-r--r--source4/torture/raw/context.c2
-rw-r--r--source4/torture/raw/open.c4
-rw-r--r--source4/torture/raw/oplock.c6
-rw-r--r--source4/torture/rpc/dfs.c8
-rw-r--r--source4/torture/rpc/lsa.c2
-rw-r--r--source4/torture/rpc/samr.c34
-rw-r--r--source4/torture/rpc/spoolss.c6
-rw-r--r--source4/torture/rpc/winreg.c2
-rw-r--r--source4/torture/rpc/wkssvc.c2
-rw-r--r--source4/torture/torture.c10
-rw-r--r--source4/torture/torture_util.c2
-rw-r--r--source4/utils/net_ads_cldap.c4
-rw-r--r--source4/utils/net_rap.c28
-rw-r--r--source4/utils/net_rpc.c4
97 files changed, 549 insertions, 554 deletions
diff --git a/source4/auth/auth_domain.c b/source4/auth/auth_domain.c
index a19d0f7846..3064da72de 100644
--- a/source4/auth/auth_domain.c
+++ b/source4/auth/auth_domain.c
@@ -123,7 +123,7 @@ static NTSTATUS rpc_resolve_dc(const char *server,
static NTSTATUS connect_to_domain_password_server(struct cli_state **cli,
const char *server,
const char *setup_creds_as,
- uint16 sec_chan,
+ uint16_t sec_chan,
const unsigned char *trust_passwd,
BOOL *retry)
{
@@ -234,7 +234,7 @@ static NTSTATUS attempt_connect_to_dc(struct cli_state **cli,
const char *domain,
struct in_addr *ip,
const char *setup_creds_as,
- uint16 sec_chan,
+ uint16_t sec_chan,
const unsigned char *trust_passwd)
{
NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
@@ -265,7 +265,7 @@ static NTSTATUS attempt_connect_to_dc(struct cli_state **cli,
static NTSTATUS find_connect_dc(struct cli_state **cli,
const char *domain,
const char *setup_creds_as,
- uint16 sec_chan,
+ uint16_t sec_chan,
unsigned char *trust_passwd,
time_t last_change_time)
{
@@ -293,7 +293,7 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
uchar chal[8],
auth_serversupplied_info **server_info,
const char *server, const char *setup_creds_as,
- uint16 sec_chan,
+ uint16_t sec_chan,
unsigned char trust_passwd[16],
time_t last_change_time)
{
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c
index 549b5ab362..141be3ae9a 100644
--- a/source4/auth/auth_sam.c
+++ b/source4/auth/auth_sam.c
@@ -32,7 +32,7 @@
static NTSTATUS sam_password_ok(const struct auth_context *auth_context,
TALLOC_CTX *mem_ctx,
const char *username,
- uint16 acct_flags,
+ uint16_t acct_flags,
const uint8 lm_pw[16], const uint8 nt_pw[16],
const auth_usersupplied_info *user_info,
DATA_BLOB *user_sess_key,
@@ -68,7 +68,7 @@ static NTSTATUS sam_password_ok(const struct auth_context *auth_context,
static NTSTATUS sam_account_ok(TALLOC_CTX *mem_ctx,
const char *username,
- uint16 acct_flags,
+ uint16_t acct_flags,
NTTIME *acct_expiry,
NTTIME *must_change_time,
NTTIME *last_set_time,
@@ -173,7 +173,7 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
struct ldb_message **msgs_domain;
void *sam_ctx;
char *username = user_info->internal_username.str;
- uint16 acct_flags;
+ uint16_t acct_flags;
const char *workstation_list;
NTTIME acct_expiry;
NTTIME must_change_time;
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index d99712c126..ef59d451bb 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -364,6 +364,8 @@ AC_CHECK_TYPE(offset_t,loff_t)
AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_TYPE(wchar_t, unsigned short)
AC_CHECK_TYPE(uint_t, unsigned int)
+AC_CHECK_TYPE(int16_t, short)
+AC_CHECK_TYPE(uint16_t, unsigned short)
AC_CHECK_TYPE(int32_t, long)
AC_CHECK_TYPE(uint32_t, unsigned long)
AC_CHECK_TYPE(int64_t, long long)
diff --git a/source4/client/client.c b/source4/client/client.c
index 6599e143dd..1f813a3d18 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -347,13 +347,13 @@ static BOOL do_this_one(file_info *finfo)
/*******************************************************************
Return a string representing an attribute for a file.
********************************************************************/
-static const char *attrib_string(uint16 mode)
+static const char *attrib_string(uint16_t mode)
{
static fstring attrstr;
int i, len;
const struct {
char c;
- uint16 attr;
+ uint16_t attr;
} attr_strs[] = {
{'V', FILE_ATTRIBUTE_VOLUME},
{'D', FILE_ATTRIBUTE_DIRECTORY},
@@ -566,7 +566,7 @@ static void do_list_helper(file_info *f, const char *mask, void *state)
/****************************************************************************
a wrapper around cli_list that adds recursion
****************************************************************************/
-void do_list(const char *mask,uint16 attribute,void (*fn)(file_info *),BOOL rec, BOOL dirs)
+void do_list(const char *mask,uint16_t attribute,void (*fn)(file_info *),BOOL rec, BOOL dirs)
{
static int in_do_list = 0;
@@ -637,7 +637,7 @@ void do_list(const char *mask,uint16 attribute,void (*fn)(file_info *),BOOL rec,
****************************************************************************/
static int cmd_dir(void)
{
- uint16 attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+ uint16_t attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
pstring mask;
fstring buf;
char *p=buf;
@@ -674,7 +674,7 @@ static int cmd_dir(void)
****************************************************************************/
static int cmd_du(void)
{
- uint16 attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+ uint16_t attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
pstring mask;
fstring buf;
char *p=buf;
@@ -715,7 +715,7 @@ static int do_get(char *rname, const char *lname, BOOL reget)
char *data;
struct timeval tp_start;
int read_size = io_bufsize;
- uint16 attr;
+ uint16_t attr;
size_t size;
off_t start = 0;
off_t nread = 0;
@@ -807,7 +807,7 @@ static int do_get(char *rname, const char *lname, BOOL reget)
}
if (archive_level >= 2 && (attr & FILE_ATTRIBUTE_ARCHIVE)) {
- cli_setatr(cli->tree, rname, attr & ~(uint16)FILE_ATTRIBUTE_ARCHIVE, 0);
+ cli_setatr(cli->tree, rname, attr & ~(uint16_t)FILE_ATTRIBUTE_ARCHIVE, 0);
}
{
@@ -970,7 +970,7 @@ do a mget command
****************************************************************************/
static int cmd_mget(void)
{
- uint16 attribute = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+ uint16_t attribute = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
pstring mget_mask;
fstring buf;
char *p=buf;
@@ -1582,7 +1582,7 @@ static int cmd_del(void)
{
pstring mask;
fstring buf;
- uint16 attribute = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+ uint16_t attribute = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
if (recurse)
attribute |= FILE_ATTRIBUTE_DIRECTORY;
diff --git a/source4/client/clitar.c b/source4/client/clitar.c
index 09f10edee7..dce914e9a6 100644
--- a/source4/client/clitar.c
+++ b/source4/client/clitar.c
@@ -46,7 +46,7 @@ typedef struct file_info_struct file_info2;
struct file_info_struct
{
uint64_t size;
- uint16 mode;
+ uint16_t mode;
uid_t uid;
gid_t gid;
/* These times are normally kept in GMT */
@@ -74,7 +74,7 @@ extern struct cli_state *cli;
#define ATTRSET 1
#define ATTRRESET 0
-static uint16 attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+static uint16_t attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
#ifndef CLIENT_TIMEOUT
#define CLIENT_TIMEOUT (30*1000)
@@ -110,7 +110,7 @@ static int clipn=0;
static BOOL must_free_cliplist = False;
extern BOOL lowercase;
-extern uint16 cnum;
+extern uint16_t cnum;
extern BOOL readbraw_supported;
extern int max_xmit;
extern pstring cur_dir;
@@ -573,9 +573,9 @@ static int padit(char *buf, int bufsize, int padsize)
}
-static void do_setrattr(char *name, uint16 attr, int set)
+static void do_setrattr(char *name, uint16_t attr, int set)
{
- uint16 oldattr;
+ uint16_t oldattr;
if (NT_STATUS_IS_ERR(cli_getatr(cli->tree, name, &oldattr, NULL, NULL)))
return;
@@ -1345,7 +1345,7 @@ int cmd_setmode(void)
char *q;
fstring buf;
pstring fname;
- uint16 attra[2];
+ uint16_t attra[2];
int direct=1;
attra[0] = attra[1] = 0;
diff --git a/source4/client/smbmount.c b/source4/client/smbmount.c
index ac1a742ab7..6373e556b5 100644
--- a/source4/client/smbmount.c
+++ b/source4/client/smbmount.c
@@ -600,7 +600,7 @@ static void read_credentials_file(char *filename)
{
FILE *auth;
fstring buf;
- uint16 len = 0;
+ uint16_t len = 0;
char *ptr, *val, *param;
if ((auth=sys_fopen(filename, "r")) == NULL)
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;
};
diff --git a/source4/lib/cmdline/popt_common.c b/source4/lib/cmdline/popt_common.c
index 1b8e3bd93e..f659468561 100644
--- a/source4/lib/cmdline/popt_common.c
+++ b/source4/lib/cmdline/popt_common.c
@@ -191,7 +191,7 @@ static void get_credentials_file(const char *file, struct user_auth_info *info)
{
XFILE *auth;
fstring buf;
- uint16 len = 0;
+ uint16_t len = 0;
char *ptr, *val, *param;
if ((auth=x_fopen(file, O_RDONLY, 0)) == NULL)
diff --git a/source4/lib/events.c b/source4/lib/events.c
index 85a2cee70f..50f3f53c94 100644
--- a/source4/lib/events.c
+++ b/source4/lib/events.c
@@ -357,7 +357,7 @@ int event_loop_wait(struct event_context *ev)
which ones and call the handler, being careful to allow
the handler to remove itself when called */
for (fe=ev->fd_events; fe; fe=fe->next) {
- uint16 flags = 0;
+ uint16_t flags = 0;
if (FD_ISSET(fe->fd, &r_fds)) flags |= EVENT_FD_READ;
if (FD_ISSET(fe->fd, &w_fds)) flags |= EVENT_FD_WRITE;
if (fe->ref_count && flags) {
diff --git a/source4/lib/smbpasswd.c b/source4/lib/smbpasswd.c
index 92ae1ffea2..5cb8439878 100644
--- a/source4/lib/smbpasswd.c
+++ b/source4/lib/smbpasswd.c
@@ -88,7 +88,7 @@ BOOL smbpasswd_gethexpwd(char *p, unsigned char *pwd)
/*! Convert a 16-byte array into 32 hex characters. */
-void smbpasswd_sethexpwd(fstring p, unsigned char *pwd, uint16 acb_info)
+void smbpasswd_sethexpwd(fstring p, unsigned char *pwd, uint16_t acb_info)
{
if (pwd != NULL) {
int i;
@@ -104,9 +104,9 @@ void smbpasswd_sethexpwd(fstring p, unsigned char *pwd, uint16 acb_info)
/*! Decode the account control bits (ACB) info from a string. */
-uint16 smbpasswd_decode_acb_info(const char *p)
+uint16_t smbpasswd_decode_acb_info(const char *p)
{
- uint16 acb_info = 0;
+ uint16_t acb_info = 0;
BOOL finished = False;
/*
@@ -170,7 +170,7 @@ uint16 smbpasswd_decode_acb_info(const char *p)
/*! Encode account control bits (ACBs) into a string. */
-char *smbpasswd_encode_acb_info(uint16 acb_info)
+char *smbpasswd_encode_acb_info(uint16_t acb_info)
{
static fstring acct_str;
size_t i = 0;
diff --git a/source4/lib/tdb/common/tdbutil.c b/source4/lib/tdb/common/tdbutil.c
index bdb8621d16..3fe3ff4b11 100644
--- a/source4/lib/tdb/common/tdbutil.c
+++ b/source4/lib/tdb/common/tdbutil.c
@@ -428,7 +428,7 @@ size_t tdb_pack(TDB_CONTEXT *tdb, char *buf, int bufsize, const char *fmt, ...)
{
va_list ap;
uint8 bt;
- uint16 w;
+ uint16_t w;
uint32_t d;
int i;
void *p;
@@ -451,7 +451,7 @@ size_t tdb_pack(TDB_CONTEXT *tdb, char *buf, int bufsize, const char *fmt, ...)
break;
case 'w': /* unsigned 16-bit integer */
len = 2;
- w = (uint16)va_arg(ap, int);
+ w = (uint16_t)va_arg(ap, int);
if (bufsize && bufsize >= len)
SSVAL(buf, 0, w);
break;
@@ -522,7 +522,7 @@ int tdb_unpack(TDB_CONTEXT *tdb, char *buf, int bufsize, const char *fmt, ...)
{
va_list ap;
uint8 *bt;
- uint16 *w;
+ uint16_t *w;
uint32_t *d;
int len;
int *i;
@@ -546,7 +546,7 @@ int tdb_unpack(TDB_CONTEXT *tdb, char *buf, int bufsize, const char *fmt, ...)
break;
case 'w':
len = 2;
- w = va_arg(ap, uint16 *);
+ w = va_arg(ap, uint16_t *);
if (bufsize < len)
goto no_space;
*w = SVAL(buf, 0);
diff --git a/source4/lib/time.c b/source4/lib/time.c
index 99738d5a4a..1f95ef7daf 100644
--- a/source4/lib/time.c
+++ b/source4/lib/time.c
@@ -141,9 +141,9 @@ BOOL null_mtime(time_t mtime)
/*******************************************************************
create a 16 bit dos packed date
********************************************************************/
-static uint16 make_dos_date1(struct tm *t)
+static uint16_t make_dos_date1(struct tm *t)
{
- uint16 ret=0;
+ uint16_t ret=0;
ret = (((unsigned)(t->tm_mon+1)) >> 3) | ((t->tm_year-80) << 1);
ret = ((ret&0xFF)<<8) | (t->tm_mday | (((t->tm_mon+1) & 0x7) << 5));
return ret;
@@ -152,9 +152,9 @@ static uint16 make_dos_date1(struct tm *t)
/*******************************************************************
create a 16 bit dos packed time
********************************************************************/
-static uint16 make_dos_time1(struct tm *t)
+static uint16_t make_dos_time1(struct tm *t)
{
- uint16 ret=0;
+ uint16_t ret=0;
ret = ((((unsigned)t->tm_min >> 3)&0x7) | (((unsigned)t->tm_hour) << 3));
ret = ((ret&0xFF)<<8) | ((t->tm_sec/2) | ((t->tm_min & 0x7) << 5));
return ret;
@@ -382,7 +382,7 @@ const char *nt_time_string(TALLOC_CTX *mem_ctx, NTTIME nt)
/*
put a NTTIME into a packet
*/
-void push_nttime(void *base, uint16 offset, NTTIME t)
+void push_nttime(void *base, uint16_t offset, NTTIME t)
{
SBVAL(base, offset, t);
}
@@ -390,7 +390,7 @@ void push_nttime(void *base, uint16 offset, NTTIME t)
/*
pull a NTTIME from a packet
*/
-NTTIME pull_nttime(void *base, uint16 offset)
+NTTIME pull_nttime(void *base, uint16_t offset)
{
NTTIME ret = BVAL(base, offset);
return ret;
diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c
index 7d6505bab2..4002c21e9a 100644
--- a/source4/lib/util_str.c
+++ b/source4/lib/util_str.c
@@ -86,7 +86,7 @@ BOOL next_token_nr(const char **ptr, char *buff, const char *sep, size_t bufsize
return ret;
}
-static uint16 tmpbuf[sizeof(pstring)];
+static uint16_t tmpbuf[sizeof(pstring)];
/**
Convert list of tokens to array; dependent on above routine.
@@ -269,7 +269,7 @@ void string_replace(char *s,char oldc,char newc)
size_t str_charnum(const char *s)
{
- uint16 tmpbuf2[sizeof(pstring)];
+ uint16_t tmpbuf2[sizeof(pstring)];
push_ucs2(NULL, tmpbuf2,s, sizeof(tmpbuf2), STR_TERMINATE);
return strlen_w(tmpbuf2);
}
diff --git a/source4/libads/krb5_setpw.c b/source4/libads/krb5_setpw.c
index 9cf15221a8..5a736d4dcd 100644
--- a/source4/libads/krb5_setpw.c
+++ b/source4/libads/krb5_setpw.c
@@ -111,7 +111,7 @@ static DATA_BLOB encode_krb5_setpw(const char *principal, const char *password)
return ret;
}
-static krb5_error_code build_kpasswd_request(uint16 pversion,
+static krb5_error_code build_kpasswd_request(uint16_t pversion,
krb5_context context,
krb5_auth_context auth_context,
krb5_data *ap_req,
@@ -340,7 +340,7 @@ static krb5_error_code parse_setpw_reply(krb5_context context,
static ADS_STATUS do_krb5_kpasswd_request(krb5_context context,
const char *kdc_host,
- uint16 pversion,
+ uint16_t pversion,
krb5_creds *credsp,
const char *princ,
const char *newpw)
diff --git a/source4/libads/ldap.c b/source4/libads/ldap.c
index 9161c35692..1e109ea5f2 100644
--- a/source4/libads/ldap.c
+++ b/source4/libads/ldap.c
@@ -1108,8 +1108,8 @@ static void dump_binary(const char *field, struct berval **values)
struct uuid {
uint32_t i1;
- uint16 i2;
- uint16 i3;
+ uint16_t i2;
+ uint16_t i3;
uint8 s[8];
};
diff --git a/source4/libcli/auth/ntlmssp_parse.c b/source4/libcli/auth/ntlmssp_parse.c
index 6d0d644a89..91596e7bdb 100644
--- a/source4/libcli/auth/ntlmssp_parse.c
+++ b/source4/libcli/auth/ntlmssp_parse.c
@@ -190,7 +190,7 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob,
const char **ps, *s;
DATA_BLOB *b;
size_t head_ofs = 0;
- uint16 len1, len2;
+ uint16_t len1, len2;
uint32_t ptr;
uint32_t *v;
pstring p;
diff --git a/source4/libcli/clidfs.c b/source4/libcli/clidfs.c
index fc24cccf54..ae7a8dc6eb 100644
--- a/source4/libcli/clidfs.c
+++ b/source4/libcli/clidfs.c
@@ -113,7 +113,7 @@ int cli_get_dfs_referral(struct cli_state *cli,const char *Fname, dfs_info* dinf
int i;
char *rparam=NULL, *rdata=NULL;
int param_len, data_len;
- uint16 setup;
+ uint16_t setup;
pstring param;
DATA_BLOB trans_param, trans_data;
@@ -381,7 +381,7 @@ int cli_dfs_open(struct cli_client* cluster, int *server,
****************************************************************************/
NTSTATUS cli_nt_unlink(struct cli_client* cluster, int *server,
- char *fname_src, uint16 FileAttributes)
+ char *fname_src, uint16_t FileAttributes)
{
int referral_number;
dfs_info dinfo;
diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c
index 803e27699f..a417ae621c 100644
--- a/source4/libcli/clifile.c
+++ b/source4/libcli/clifile.c
@@ -495,7 +495,7 @@ NTSTATUS cli_unlock64(struct cli_tree *tree, int fnum, SMB_OFF_T offset,
Do a SMBgetattrE call.
****************************************************************************/
NTSTATUS cli_getattrE(struct cli_tree *tree, int fnum,
- uint16 *attr, size_t *size,
+ uint16_t *attr, size_t *size,
time_t *c_time, time_t *a_time, time_t *m_time)
{
union smb_fileinfo parms;
@@ -536,7 +536,7 @@ NTSTATUS cli_getattrE(struct cli_tree *tree, int fnum,
Do a SMBgetatr call
****************************************************************************/
NTSTATUS cli_getatr(struct cli_tree *tree, const char *fname,
- uint16 *attr, size_t *size, time_t *t)
+ uint16_t *attr, size_t *size, time_t *t)
{
union smb_fileinfo parms;
NTSTATUS status;
@@ -569,7 +569,7 @@ NTSTATUS cli_getatr(struct cli_tree *tree, const char *fname,
/****************************************************************************
Do a SMBsetatr call.
****************************************************************************/
-NTSTATUS cli_setatr(struct cli_tree *tree, const char *fname, uint16 mode,
+NTSTATUS cli_setatr(struct cli_tree *tree, const char *fname, uint16_t mode,
time_t t)
{
union smb_setfileinfo parms;
diff --git a/source4/libcli/clilist.c b/source4/libcli/clilist.c
index ca4b6acdc7..09d536a710 100644
--- a/source4/libcli/clilist.c
+++ b/source4/libcli/clilist.c
@@ -81,7 +81,7 @@ static BOOL cli_list_new_callback(void *private, union smb_search_data *file)
return True;
}
-int cli_list_new(struct cli_tree *tree, const char *Mask, uint16 attribute,
+int cli_list_new(struct cli_tree *tree, const char *Mask, uint16_t attribute,
void (*fn)(file_info *, const char *, void *),
void *caller_state)
{
@@ -224,7 +224,7 @@ static BOOL cli_list_old_callback(void *private, union smb_search_data *file)
return True;
}
-int cli_list_old(struct cli_tree *tree, const char *Mask, uint16 attribute,
+int cli_list_old(struct cli_tree *tree, const char *Mask, uint16_t attribute,
void (*fn)(file_info *, const char *, void *),
void *caller_state)
{
@@ -307,7 +307,7 @@ int cli_list_old(struct cli_tree *tree, const char *Mask, uint16 attribute,
This auto-switches between old and new style.
****************************************************************************/
-int cli_list(struct cli_tree *tree, const char *Mask,uint16 attribute,
+int cli_list(struct cli_tree *tree, const char *Mask,uint16_t attribute,
void (*fn)(file_info *, const char *, void *), void *state)
{
if (tree->session->transport->negotiate.protocol <= PROTOCOL_LANMAN1)
diff --git a/source4/libcli/clireadwrite.c b/source4/libcli/clireadwrite.c
index 7b47281e2c..e9c8b80c4f 100644
--- a/source4/libcli/clireadwrite.c
+++ b/source4/libcli/clireadwrite.c
@@ -83,7 +83,7 @@ ssize_t cli_read(struct cli_tree *tree, int fnum, char *buf, off_t offset,
0x0008 start of message mode named pipe protocol
****************************************************************************/
ssize_t cli_write(struct cli_tree *tree,
- int fnum, uint16 write_mode,
+ int fnum, uint16_t write_mode,
const char *buf, off_t offset, size_t size)
{
union smb_write parms;
diff --git a/source4/libcli/clitrans2.c b/source4/libcli/clitrans2.c
index dc8c2cdfec..a83660685b 100644
--- a/source4/libcli/clitrans2.c
+++ b/source4/libcli/clitrans2.c
@@ -25,7 +25,7 @@ send a qpathinfo call
****************************************************************************/
NTSTATUS cli_qpathinfo(struct cli_tree *tree, const char *fname,
time_t *c_time, time_t *a_time, time_t *m_time,
- size_t *size, uint16 *mode)
+ size_t *size, uint16_t *mode)
{
union smb_fileinfo parms;
TALLOC_CTX *mem_ctx;
@@ -66,7 +66,7 @@ send a qpathinfo call with the SMB_QUERY_FILE_ALL_INFO info level
****************************************************************************/
NTSTATUS cli_qpathinfo2(struct cli_tree *tree, const char *fname,
time_t *c_time, time_t *a_time, time_t *m_time,
- time_t *w_time, size_t *size, uint16 *mode,
+ time_t *w_time, size_t *size, uint16_t *mode,
SMB_INO_T *ino)
{
union smb_fileinfo parms;
@@ -141,7 +141,7 @@ NTSTATUS cli_qfilename(struct cli_tree *tree, int fnum, const char **name)
send a qfileinfo call
****************************************************************************/
NTSTATUS cli_qfileinfo(struct cli_tree *tree, int fnum,
- uint16 *mode, size_t *size,
+ uint16_t *mode, size_t *size,
time_t *c_time, time_t *a_time, time_t *m_time,
time_t *w_time, SMB_INO_T *ino)
{
diff --git a/source4/libcli/nmblib.c b/source4/libcli/nmblib.c
index a875f4652e..0fe9ee2453 100644
--- a/source4/libcli/nmblib.c
+++ b/source4/libcli/nmblib.c
@@ -1244,7 +1244,7 @@ static char *name_ptr(char *buf,int ofs)
if ((c & 0xC0) == 0xC0)
{
- uint16 l = RSVAL(buf, ofs) & 0x3FFF;
+ uint16_t l = RSVAL(buf, ofs) & 0x3FFF;
DEBUG(5,("name ptr to pos %d from %d is %s\n",l,ofs,buf+l));
return(buf + l);
}
diff --git a/source4/libcli/raw/clioplock.c b/source4/libcli/raw/clioplock.c
index f27bf937ce..eacfd411a0 100644
--- a/source4/libcli/raw/clioplock.c
+++ b/source4/libcli/raw/clioplock.c
@@ -23,7 +23,7 @@
/****************************************************************************
send an ack for an oplock break request
****************************************************************************/
-BOOL cli_oplock_ack(struct cli_tree *tree, uint16 fnum, uint16 ack_level)
+BOOL cli_oplock_ack(struct cli_tree *tree, uint16_t fnum, uint16_t ack_level)
{
BOOL ret;
struct cli_request *req;
diff --git a/source4/libcli/raw/clisession.c b/source4/libcli/raw/clisession.c
index fe64565597..b3876f2490 100644
--- a/source4/libcli/raw/clisession.c
+++ b/source4/libcli/raw/clisession.c
@@ -45,7 +45,7 @@ struct cli_session *cli_session_init(struct cli_transport *transport)
session->mem_ctx = mem_ctx;
session->transport = transport;
- session->pid = (uint16)getpid();
+ session->pid = (uint16_t)getpid();
session->vuid = UID_FIELD_INVALID;
session->transport->reference_count++;
@@ -144,7 +144,7 @@ NTSTATUS smb_raw_session_setup_recv(struct cli_request *req,
TALLOC_CTX *mem_ctx,
union smb_sesssetup *parms)
{
- uint16 len;
+ uint16_t len;
char *p;
if (!cli_request_receive(req)) {
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index 72cad2e925..1e9032459f 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -127,9 +127,9 @@ BOOL cli_transport_connect(struct cli_transport *transport,
/****************************************************************************
get next mid in sequence
****************************************************************************/
-uint16 cli_transport_next_mid(struct cli_transport *transport)
+uint16_t cli_transport_next_mid(struct cli_transport *transport)
{
- uint16 mid;
+ uint16_t mid;
struct cli_request *req;
mid = transport->next_mid;
diff --git a/source4/libcli/raw/raweas.c b/source4/libcli/raw/raweas.c
index f265c8281d..ae58790baa 100644
--- a/source4/libcli/raw/raweas.c
+++ b/source4/libcli/raw/raweas.c
@@ -69,7 +69,7 @@ uint_t ea_pull_struct(const DATA_BLOB *blob,
struct ea_struct *ea)
{
uint8 nlen;
- uint16 vlen;
+ uint16_t vlen;
if (blob->length < 6) {
return 0;
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index d1a665ab14..5128ba96ce 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -111,10 +111,10 @@ static struct cli_request *smb_raw_t2mkdir_send(struct cli_tree *tree,
union smb_mkdir *parms)
{
struct smb_trans2 t2;
- uint16 setup = TRANSACT2_MKDIR;
+ uint16_t setup = TRANSACT2_MKDIR;
TALLOC_CTX *mem_ctx;
struct cli_request *req;
- uint16 data_total;
+ uint16_t data_total;
mem_ctx = talloc_init("t2mkdir");
@@ -219,10 +219,10 @@ static struct cli_request *smb_raw_t2open_send(struct cli_tree *tree,
union smb_open *parms)
{
struct smb_trans2 t2;
- uint16 setup = TRANSACT2_OPEN;
+ uint16_t setup = TRANSACT2_OPEN;
TALLOC_CTX *mem_ctx = talloc_init("smb_raw_t2open");
struct cli_request *req;
- uint16 list_size;
+ uint16_t list_size;
list_size = ea_list_size(parms->t2open.in.num_eas, parms->t2open.in.eas);
diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c
index 9d715e6104..f27a0d7281 100644
--- a/source4/libcli/raw/rawfileinfo.c
+++ b/source4/libcli/raw/rawfileinfo.c
@@ -261,10 +261,10 @@ static NTSTATUS smb_raw_info_backend(struct cli_session *session,
Very raw query file info - returns param/data blobs - (async send)
****************************************************************************/
static struct cli_request *smb_raw_fileinfo_blob_send(struct cli_tree *tree,
- uint16 fnum, uint16 info_level)
+ uint16_t fnum, uint16_t info_level)
{
struct smb_trans2 tp;
- uint16 setup = TRANSACT2_QFILEINFO;
+ uint16_t setup = TRANSACT2_QFILEINFO;
struct cli_request *req;
TALLOC_CTX *mem_ctx = talloc_init("raw_fileinfo");
@@ -314,10 +314,10 @@ static NTSTATUS smb_raw_fileinfo_blob_recv(struct cli_request *req,
****************************************************************************/
static struct cli_request *smb_raw_pathinfo_blob_send(struct cli_tree *tree,
const char *fname,
- uint16 info_level)
+ uint16_t info_level)
{
struct smb_trans2 tp;
- uint16 setup = TRANSACT2_QPATHINFO;
+ uint16_t setup = TRANSACT2_QPATHINFO;
struct cli_request *req;
TALLOC_CTX *mem_ctx = talloc_init("raw_pathinfo");
diff --git a/source4/libcli/raw/rawfsinfo.c b/source4/libcli/raw/rawfsinfo.c
index 85daf654d3..faf375deb0 100644
--- a/source4/libcli/raw/rawfsinfo.c
+++ b/source4/libcli/raw/rawfsinfo.c
@@ -67,10 +67,10 @@ failed:
****************************************************************************/
static struct cli_request *smb_raw_qfsinfo_send(struct cli_tree *tree,
TALLOC_CTX *mem_ctx,
- uint16 info_level)
+ uint16_t info_level)
{
struct smb_trans2 tp;
- uint16 setup = TRANSACT2_QFSINFO;
+ uint16_t setup = TRANSACT2_QFSINFO;
tp.in.max_setup = 0;
tp.in.flags = 0;
@@ -133,7 +133,7 @@ struct cli_request *smb_raw_fsinfo_send(struct cli_tree *tree,
TALLOC_CTX *mem_ctx,
union smb_fsinfo *fsinfo)
{
- uint16 info_level;
+ uint16_t info_level;
/* handle the only non-trans2 call separately */
if (fsinfo->generic.level == RAW_QFS_DSKATTR) {
@@ -144,7 +144,7 @@ struct cli_request *smb_raw_fsinfo_send(struct cli_tree *tree,
}
/* the headers map the trans2 levels direct to info levels */
- info_level = (uint16)fsinfo->generic.level;
+ info_level = (uint16_t)fsinfo->generic.level;
return smb_raw_qfsinfo_send(tree, mem_ctx, info_level);
}
diff --git a/source4/libcli/raw/rawioctl.c b/source4/libcli/raw/rawioctl.c
index 2ea2cabb89..271758c65c 100644
--- a/source4/libcli/raw/rawioctl.c
+++ b/source4/libcli/raw/rawioctl.c
@@ -72,7 +72,7 @@ static struct cli_request *smb_raw_ntioctl_send(struct cli_tree *tree,
union smb_ioctl *parms)
{
struct smb_nttrans nt;
- uint16 setup[4];
+ uint16_t setup[4];
nt.in.max_setup = 0;
nt.in.max_param = 0;
diff --git a/source4/libcli/raw/rawnotify.c b/source4/libcli/raw/rawnotify.c
index 1030a61704..b8efa2fcd6 100644
--- a/source4/libcli/raw/rawnotify.c
+++ b/source4/libcli/raw/rawnotify.c
@@ -26,7 +26,7 @@ change notify (async send)
struct cli_request *smb_raw_changenotify_send(struct cli_tree *tree, struct smb_notify *parms)
{
struct smb_nttrans nt;
- uint16 setup[4];
+ uint16_t setup[4];
nt.in.max_setup = 0;
nt.in.max_param = parms->in.buffer_size;
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index d8e4d80b39..d7085ea3d2 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -152,7 +152,7 @@ struct cli_request *cli_request_setup_session(struct cli_session *session,
uint8 command, unsigned wct, unsigned buflen)
{
struct cli_request *req;
- uint16 flags2;
+ uint16_t flags2;
uint32_t capabilities;
req = cli_request_setup_transport(session->transport, command, wct, buflen);
@@ -341,8 +341,8 @@ static BOOL handle_oplock_break(struct cli_transport *transport, uint_t len, con
}
if (transport->oplock.handler) {
- uint16 tid = SVAL(hdr, HDR_TID);
- uint16 fnum = SVAL(vwv,VWV(2));
+ uint16_t tid = SVAL(hdr, HDR_TID);
+ uint16_t fnum = SVAL(vwv,VWV(2));
uint8 level = CVAL(vwv,VWV(3)+1);
transport->oplock.handler(transport, tid, fnum, level, transport->oplock.private);
}
@@ -370,7 +370,7 @@ BOOL cli_request_receive_next(struct cli_transport *transport)
char *buffer, *hdr, *vwv;
TALLOC_CTX *mem_ctx;
struct cli_request *req;
- uint16 wct, mid = 0;
+ uint16_t wct, mid = 0;
len = cli_sock_read(transport->socket, header, 4);
if (len != 4) {
@@ -635,7 +635,7 @@ size_t cli_req_append_bytes(struct cli_request *req, const uint8 *bytes, size_t
append variable block (type 5 buffer) into the data portion of the request packet
return the number of bytes added
*/
-size_t cli_req_append_var_block(struct cli_request *req, const uint8 *bytes, uint16 byte_len)
+size_t cli_req_append_var_block(struct cli_request *req, const uint8 *bytes, uint16_t byte_len)
{
cli_req_grow_allocation(req, byte_len + 3 + req->out.data_size);
SCVAL(req->out.data + req->out.data_size, 0, 5);
@@ -831,7 +831,7 @@ BOOL cli_raw_pull_data(struct cli_request *req, const char *src, int len, char *
/*
put a NTTIME into a packet
*/
-void cli_push_nttime(void *base, uint16 offset, NTTIME t)
+void cli_push_nttime(void *base, uint16_t offset, NTTIME t)
{
SBVAL(base, offset, t);
}
@@ -839,7 +839,7 @@ void cli_push_nttime(void *base, uint16 offset, NTTIME t)
/*
pull a NTTIME from a packet
*/
-NTTIME cli_pull_nttime(void *base, uint16 offset)
+NTTIME cli_pull_nttime(void *base, uint16_t offset)
{
NTTIME ret = BVAL(base, offset);
return ret;
@@ -967,7 +967,7 @@ size_t cli_blob_pull_string(struct cli_session *session,
TALLOC_CTX *mem_ctx,
DATA_BLOB *blob,
WIRE_STRING *dest,
- uint16 len_offset, uint16 str_offset,
+ uint16_t len_offset, uint16_t str_offset,
unsigned flags)
{
int extra;
@@ -1022,7 +1022,7 @@ size_t cli_blob_pull_unix_string(struct cli_session *session,
TALLOC_CTX *mem_ctx,
DATA_BLOB *blob,
const char **dest,
- uint16 str_offset,
+ uint16_t str_offset,
unsigned flags)
{
int extra = 0;
diff --git a/source4/libcli/raw/rawsearch.c b/source4/libcli/raw/rawsearch.c
index 8b60633fe8..bdb57aa6c4 100644
--- a/source4/libcli/raw/rawsearch.c
+++ b/source4/libcli/raw/rawsearch.c
@@ -25,7 +25,7 @@
****************************************************************************/
static void smb_raw_search_backend(struct cli_request *req,
TALLOC_CTX *mem_ctx,
- uint16 count,
+ uint16_t count,
void *private,
BOOL (*callback)(void *private, union smb_search_data *file))
@@ -129,12 +129,12 @@ static NTSTATUS smb_raw_search_next_old(struct cli_tree *tree,
static NTSTATUS smb_raw_search_first_blob(struct cli_tree *tree,
TALLOC_CTX *mem_ctx, /* used to allocate output blobs */
union smb_search_first *io,
- uint16 info_level,
+ uint16_t info_level,
DATA_BLOB *out_param_blob,
DATA_BLOB *out_data_blob)
{
struct smb_trans2 tp;
- uint16 setup = TRANSACT2_FINDFIRST;
+ uint16_t setup = TRANSACT2_FINDFIRST;
NTSTATUS status;
tp.in.max_setup = 0;
@@ -181,12 +181,12 @@ static NTSTATUS smb_raw_search_first_blob(struct cli_tree *tree,
static NTSTATUS smb_raw_search_next_blob(struct cli_tree *tree,
TALLOC_CTX *mem_ctx,
union smb_search_next *io,
- uint16 info_level,
+ uint16_t info_level,
DATA_BLOB *out_param_blob,
DATA_BLOB *out_data_blob)
{
struct smb_trans2 tp;
- uint16 setup = TRANSACT2_FINDNEXT;
+ uint16_t setup = TRANSACT2_FINDNEXT;
NTSTATUS status;
tp.in.max_setup = 0;
@@ -236,7 +236,7 @@ static NTSTATUS smb_raw_search_next_blob(struct cli_tree *tree,
static int parse_trans2_search(struct cli_tree *tree,
TALLOC_CTX *mem_ctx,
enum search_level level,
- uint16 flags,
+ uint16_t flags,
DATA_BLOB *blob,
union smb_search_data *data)
{
@@ -450,8 +450,8 @@ static int parse_trans2_search(struct cli_tree *tree,
static NTSTATUS smb_raw_t2search_backend(struct cli_tree *tree,
TALLOC_CTX *mem_ctx,
enum search_level level,
- uint16 flags,
- int16 count,
+ uint16_t flags,
+ int16_t count,
DATA_BLOB *blob,
void *private,
BOOL (*callback)(void *private, union smb_search_data *file))
@@ -495,7 +495,7 @@ NTSTATUS smb_raw_search_first(struct cli_tree *tree,
union smb_search_first *io, void *private,
BOOL (*callback)(void *private, union smb_search_data *file))
{
- uint16 info_level = 0;
+ uint16_t info_level = 0;
DATA_BLOB p_blob, d_blob;
NTSTATUS status;
@@ -505,7 +505,7 @@ NTSTATUS smb_raw_search_first(struct cli_tree *tree,
if (io->generic.level >= RAW_SEARCH_GENERIC) {
return NT_STATUS_INVALID_LEVEL;
}
- info_level = (uint16)io->generic.level;
+ info_level = (uint16_t)io->generic.level;
status = smb_raw_search_first_blob(tree, mem_ctx,
io, info_level, &p_blob, &d_blob);
@@ -539,7 +539,7 @@ NTSTATUS smb_raw_search_next(struct cli_tree *tree,
union smb_search_next *io, void *private,
BOOL (*callback)(void *private, union smb_search_data *file))
{
- uint16 info_level = 0;
+ uint16_t info_level = 0;
DATA_BLOB p_blob, d_blob;
NTSTATUS status;
@@ -549,7 +549,7 @@ NTSTATUS smb_raw_search_next(struct cli_tree *tree,
if (io->generic.level >= RAW_SEARCH_GENERIC) {
return NT_STATUS_INVALID_LEVEL;
}
- info_level = (uint16)io->generic.level;
+ info_level = (uint16_t)io->generic.level;
status = smb_raw_search_next_blob(tree, mem_ctx,
io, info_level, &p_blob, &d_blob);
diff --git a/source4/libcli/raw/rawsetfileinfo.c b/source4/libcli/raw/rawsetfileinfo.c
index d8fc78972d..3dcda401f5 100644
--- a/source4/libcli/raw/rawsetfileinfo.c
+++ b/source4/libcli/raw/rawsetfileinfo.c
@@ -132,12 +132,12 @@ static BOOL smb_raw_setinfo_backend(struct cli_tree *tree,
****************************************************************************/
static struct cli_request *smb_raw_setfileinfo_blob_send(struct cli_tree *tree,
TALLOC_CTX *mem_ctx,
- uint16 fnum,
- uint16 info_level,
+ uint16_t fnum,
+ uint16_t info_level,
DATA_BLOB *blob)
{
struct smb_trans2 tp;
- uint16 setup = TRANSACT2_SETFILEINFO;
+ uint16_t setup = TRANSACT2_SETFILEINFO;
tp.in.max_setup = 0;
tp.in.flags = 0;
@@ -166,11 +166,11 @@ static struct cli_request *smb_raw_setfileinfo_blob_send(struct cli_tree *tree,
static struct cli_request *smb_raw_setpathinfo_blob_send(struct cli_tree *tree,
TALLOC_CTX *mem_ctx,
const char *fname,
- uint16 info_level,
+ uint16_t info_level,
DATA_BLOB *blob)
{
struct smb_trans2 tp;
- uint16 setup = TRANSACT2_SETPATHINFO;
+ uint16_t setup = TRANSACT2_SETPATHINFO;
tp.in.max_setup = 0;
tp.in.flags = 0;
diff --git a/source4/libcli/raw/rawtrans.c b/source4/libcli/raw/rawtrans.c
index d13a1227dd..04dbcdc87d 100644
--- a/source4/libcli/raw/rawtrans.c
+++ b/source4/libcli/raw/rawtrans.c
@@ -119,9 +119,9 @@ NTSTATUS smb_raw_trans2_recv(struct cli_request *req,
}
while (1) {
- uint16 param_count, param_ofs, param_disp;
- uint16 data_count, data_ofs, data_disp;
- uint16 total_data2, total_param2;
+ uint16_t param_count, param_ofs, param_disp;
+ uint16_t data_count, data_ofs, data_disp;
+ uint16_t total_data2, total_param2;
/* parse out the total lengths again - they can shrink! */
total_data2 = SVAL(req->in.vwv, VWV(1));
diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c
index bb295ee991..989b5527aa 100644
--- a/source4/libcli/raw/smb_signing.c
+++ b/source4/libcli/raw/smb_signing.c
@@ -68,7 +68,7 @@ static BOOL set_smb_signing_real_common(struct cli_transport *transport)
static void mark_packet_signed(struct cli_request *req)
{
- uint16 flags2;
+ uint16_t flags2;
flags2 = SVAL(req->out.hdr, HDR_FLG2);
flags2 |= FLAGS2_SMB_SECURITY_SIGNATURES;
SSVAL(req->out.hdr, HDR_FLG2, flags2);
diff --git a/source4/libcli/util/smbencrypt.c b/source4/libcli/util/smbencrypt.c
index b31f62c727..fa29059585 100644
--- a/source4/libcli/util/smbencrypt.c
+++ b/source4/libcli/util/smbencrypt.c
@@ -66,7 +66,7 @@ void E_md4hash(const char *passwd, uchar p16[16])
/* Password must be converted to NT unicode - null terminated. */
push_ucs2(NULL, wpwd, (const char *)passwd, 256, STR_UNICODE|STR_NOALIGN|STR_TERMINATE);
/* Calculate length in bytes */
- len = strlen_w(wpwd) * sizeof(int16);
+ len = strlen_w(wpwd) * sizeof(int16_t);
mdfour(p16, (unsigned char *)wpwd, len);
ZERO_STRUCT(wpwd);
diff --git a/source4/libcli/util/smberr.c b/source4/libcli/util/smberr.c
index d6eabcfbce..577308a7c0 100644
--- a/source4/libcli/util/smberr.c
+++ b/source4/libcli/util/smberr.c
@@ -145,7 +145,7 @@ static const struct {
/* return a dos error string given a error class and error code */
-const char *dos_errstr(uint8 class, uint16 code)
+const char *dos_errstr(uint8 class, uint16_t code)
{
static char *msg;
int i, j;
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index 3394231726..57a1e517b5 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -426,7 +426,7 @@ static NTSTATUS ndr_pull_subcontext_header(struct ndr_pull *ndr,
}
case 2: {
- uint16 size;
+ uint16_t size;
NDR_CHECK(ndr_pull_uint16(ndr, &size));
if (size == 0) return NT_STATUS_OK;
NDR_CHECK(ndr_pull_subcontext(ndr, ndr2, size));
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c
index 5b20f118f7..9bfb312c3a 100644
--- a/source4/librpc/ndr/ndr_basic.c
+++ b/source4/librpc/ndr/ndr_basic.c
@@ -43,7 +43,7 @@ NTSTATUS ndr_pull_uint8(struct ndr_pull *ndr, uint8 *v)
/*
parse a uint16
*/
-NTSTATUS ndr_pull_uint16(struct ndr_pull *ndr, uint16 *v)
+NTSTATUS ndr_pull_uint16(struct ndr_pull *ndr, uint16_t *v)
{
NDR_PULL_ALIGN(ndr, 2);
NDR_PULL_NEED_BYTES(ndr, 2);
@@ -169,7 +169,7 @@ NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, char *data, u
/*
pull an array of uint16
*/
-NTSTATUS ndr_pull_array_uint16(struct ndr_pull *ndr, int ndr_flags, uint16 *data, uint32_t n)
+NTSTATUS ndr_pull_array_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *data, uint32_t n)
{
uint32_t i;
if (!(ndr_flags & NDR_SCALARS)) {
@@ -210,7 +210,7 @@ NTSTATUS ndr_push_uint8(struct ndr_push *ndr, uint8 v)
/*
push a uint16
*/
-NTSTATUS ndr_push_uint16(struct ndr_push *ndr, uint16 v)
+NTSTATUS ndr_push_uint16(struct ndr_push *ndr, uint16_t v)
{
NDR_PUSH_ALIGN(ndr, 2);
NDR_PUSH_NEED_BYTES(ndr, 2);
@@ -309,7 +309,7 @@ NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const char *d
/*
push an array of uint16
*/
-NTSTATUS ndr_push_array_uint16(struct ndr_push *ndr, int ndr_flags, const uint16 *data, uint32_t n)
+NTSTATUS ndr_push_array_uint16(struct ndr_push *ndr, int ndr_flags, const uint16_t *data, uint32_t n)
{
int i;
if (!(ndr_flags & NDR_SCALARS)) {
@@ -376,7 +376,7 @@ NTSTATUS ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, const char **s)
{
char *as=NULL;
uint32_t len1, ofs, len2;
- uint16 len3;
+ uint16_t len3;
int ret;
int chset = CH_UCS2;
@@ -683,7 +683,7 @@ void ndr_print_uint8(struct ndr_print *ndr, const char *name, uint8 v)
ndr->print(ndr, "%-25s: 0x%02x (%u)", name, v, v);
}
-void ndr_print_uint16(struct ndr_print *ndr, const char *name, uint16 v)
+void ndr_print_uint16(struct ndr_print *ndr, const char *name, uint16_t v)
{
ndr->print(ndr, "%-25s: 0x%04x (%u)", name, v, v);
}
@@ -743,12 +743,12 @@ void ndr_print_time_t(struct ndr_print *ndr, const char *name, time_t t)
}
}
-void ndr_print_union(struct ndr_print *ndr, const char *name, uint16 level, const char *type)
+void ndr_print_union(struct ndr_print *ndr, const char *name, uint16_t level, const char *type)
{
ndr->print(ndr, "%-25s: union %s(case %u)", name, type, level);
}
-void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16 level)
+void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level)
{
ndr->print(ndr, "UNKNOWN LEVEL %u", level);
}
@@ -772,7 +772,7 @@ void ndr_print_array_uint32(struct ndr_print *ndr, const char *name,
}
void ndr_print_array_uint16(struct ndr_print *ndr, const char *name,
- const uint16 *data, uint32_t count)
+ const uint16_t *data, uint32_t count)
{
int i;
diff --git a/source4/librpc/ndr/ndr_sec.h b/source4/librpc/ndr/ndr_sec.h
index 1578fde3d7..d5e7288fe2 100644
--- a/source4/librpc/ndr/ndr_sec.h
+++ b/source4/librpc/ndr/ndr_sec.h
@@ -38,7 +38,7 @@
/* query security descriptor */
struct smb_query_secdesc {
struct {
- uint16 fnum;
+ uint16_t fnum;
uint32_t secinfo_flags;
} in;
struct {
@@ -49,7 +49,7 @@ struct smb_query_secdesc {
/* set security descriptor */
struct smb_set_secdesc {
struct {
- uint16 fnum;
+ uint16_t fnum;
uint32_t secinfo_flags;
struct security_descriptor *sd;
} in;
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 0e3ceaf757..f0a9649a44 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -66,7 +66,7 @@ void dcerpc_pipe_close(struct dcerpc_pipe *p)
/* we need to be able to get/set the fragment length without doing a full
decode */
-void dcerpc_set_frag_length(DATA_BLOB *blob, uint16 v)
+void dcerpc_set_frag_length(DATA_BLOB *blob, uint16_t v)
{
if (CVAL(blob->data,DCERPC_DREP_OFFSET) & DCERPC_DREP_LE) {
SSVAL(blob->data, DCERPC_FRAG_LEN_OFFSET, v);
@@ -75,7 +75,7 @@ void dcerpc_set_frag_length(DATA_BLOB *blob, uint16 v)
}
}
-uint16 dcerpc_get_frag_length(const DATA_BLOB *blob)
+uint16_t dcerpc_get_frag_length(const DATA_BLOB *blob)
{
if (CVAL(blob->data,DCERPC_DREP_OFFSET) & DCERPC_DREP_LE) {
return SVAL(blob->data, DCERPC_FRAG_LEN_OFFSET);
@@ -84,7 +84,7 @@ uint16 dcerpc_get_frag_length(const DATA_BLOB *blob)
}
}
-void dcerpc_set_auth_length(DATA_BLOB *blob, uint16 v)
+void dcerpc_set_auth_length(DATA_BLOB *blob, uint16_t v)
{
if (CVAL(blob->data,DCERPC_DREP_OFFSET) & DCERPC_DREP_LE) {
SSVAL(blob->data, DCERPC_AUTH_LEN_OFFSET, v);
@@ -460,7 +460,7 @@ NTSTATUS dcerpc_bind_byuuid(struct dcerpc_pipe *p,
perform a full request/response pair on a dcerpc pipe
*/
NTSTATUS dcerpc_request(struct dcerpc_pipe *p,
- uint16 opnum,
+ uint16_t opnum,
TALLOC_CTX *mem_ctx,
DATA_BLOB *stub_data_in,
DATA_BLOB *stub_data_out)
diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c
index 070f554800..95e157b700 100644
--- a/source4/librpc/rpc/dcerpc_smb.c
+++ b/source4/librpc/rpc/dcerpc_smb.c
@@ -25,7 +25,7 @@
/* transport private information used by SMB pipe transport */
struct smb_private {
- uint16 fnum;
+ uint16_t fnum;
struct cli_tree *tree;
};
@@ -33,7 +33,7 @@ static struct cli_request *dcerpc_raw_send(struct dcerpc_pipe *p, DATA_BLOB *blo
{
struct smb_private *smb = p->transport.private;
struct smb_trans2 trans;
- uint16 setup[2];
+ uint16_t setup[2];
struct cli_request *req;
TALLOC_CTX *mem_ctx;
@@ -71,7 +71,7 @@ static NTSTATUS dcerpc_raw_recv(struct dcerpc_pipe *p,
struct smb_private *smb = p->transport.private;
struct smb_trans2 trans;
NTSTATUS status;
- uint16 frag_length;
+ uint16_t frag_length;
DATA_BLOB payload;
status = smb_raw_trans_recv(req, mem_ctx, &trans);
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c
index 2a87d59a06..751280ad6c 100644
--- a/source4/ntvfs/cifs/vfs_cifs.c
+++ b/source4/ntvfs/cifs/vfs_cifs.c
@@ -60,7 +60,7 @@ static void idle_func(struct cli_transport *transport, void *p_private)
a handler for oplock break events from the server - these need to be passed
along to the client
*/
-static BOOL oplock_handler(struct cli_transport *transport, uint16 tid, uint16 fnum, uint8 level, void *p_private)
+static BOOL oplock_handler(struct cli_transport *transport, uint16_t tid, uint16_t fnum, uint8 level, void *p_private)
{
struct cvfs_private *private = p_private;
@@ -71,7 +71,7 @@ static BOOL oplock_handler(struct cli_transport *transport, uint16 tid, uint16 f
/*
a handler for read events on a connection to a backend server
*/
-static void cifs_socket_handler(struct event_context *ev, struct fd_event *fde, time_t t, uint16 flags)
+static void cifs_socket_handler(struct event_context *ev, struct fd_event *fde, time_t t, uint16_t flags)
{
struct cvfs_private *private = fde->private;
struct tcon_context *conn = private->conn;
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 635b14b821..9a2589a2ee 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -32,17 +32,17 @@
pipes */
struct ipc_private {
- uint16 next_fnum;
- uint16 num_open;
+ uint16_t next_fnum;
+ uint16_t num_open;
/* a list of open pipes */
struct pipe_state {
struct pipe_state *next, *prev;
TALLOC_CTX *mem_ctx;
const char *pipe_name;
- uint16 fnum;
+ uint16_t fnum;
struct dcesrv_connection *dce_conn;
- uint16 ipc_state;
+ uint16_t ipc_state;
} *pipe_list;
};
@@ -51,7 +51,7 @@ struct ipc_private {
/*
find the next fnum available on this connection
*/
-static uint16 find_next_fnum(struct ipc_private *ipc)
+static uint16_t find_next_fnum(struct ipc_private *ipc)
{
struct pipe_state *p;
uint32_t ret;
@@ -88,7 +88,7 @@ static void pipe_shutdown(struct ipc_private *private, struct pipe_state *p)
/*
find a open pipe give a file descriptor
*/
-static struct pipe_state *pipe_state_find(struct ipc_private *private, uint16 fnum)
+static struct pipe_state *pipe_state_find(struct ipc_private *private, uint16_t fnum)
{
struct pipe_state *p;
@@ -369,7 +369,7 @@ static NTSTATUS ipc_read(struct request_context *req, union smb_read *rd)
{
struct ipc_private *private = req->conn->ntvfs_private;
DATA_BLOB data;
- uint16 fnum;
+ uint16_t fnum;
struct pipe_state *p;
NTSTATUS status;
@@ -421,7 +421,7 @@ static NTSTATUS ipc_write(struct request_context *req, union smb_write *wr)
{
struct ipc_private *private = req->conn->ntvfs_private;
DATA_BLOB data;
- uint16 fnum;
+ uint16_t fnum;
struct pipe_state *p;
NTSTATUS status;
diff --git a/source4/ntvfs/reference/ref.h b/source4/ntvfs/reference/ref.h
index 00eab76094..8ac4556420 100644
--- a/source4/ntvfs/reference/ref.h
+++ b/source4/ntvfs/reference/ref.h
@@ -10,7 +10,7 @@ struct rvfs_private {
struct search_state *search;
/* next available search handle */
- uint16 next_search_handle;
+ uint16_t next_search_handle;
};
struct rvfs_dir {
@@ -24,7 +24,7 @@ struct rvfs_dir {
struct search_state {
struct search_state *next, *prev;
TALLOC_CTX *mem_ctx;
- uint16 handle;
+ uint16_t handle;
uint_t current_index;
struct rvfs_dir *dir;
};
diff --git a/source4/ntvfs/simple/svfs.h b/source4/ntvfs/simple/svfs.h
index 6e44d290da..373e6dc126 100644
--- a/source4/ntvfs/simple/svfs.h
+++ b/source4/ntvfs/simple/svfs.h
@@ -7,7 +7,7 @@ struct svfs_private {
struct search_state *search;
/* next available search handle */
- uint16 next_search_handle;
+ uint16_t next_search_handle;
struct svfs_file *open_files;
};
@@ -30,7 +30,7 @@ struct svfs_file {
struct search_state {
struct search_state *next, *prev;
TALLOC_CTX *mem_ctx;
- uint16 handle;
+ uint16_t handle;
uint_t current_index;
struct svfs_dir *dir;
};
diff --git a/source4/ntvfs/simple/svfs_util.c b/source4/ntvfs/simple/svfs_util.c
index 11e70d72c2..ec1c07dff7 100644
--- a/source4/ntvfs/simple/svfs_util.c
+++ b/source4/ntvfs/simple/svfs_util.c
@@ -169,9 +169,9 @@ int svfs_file_utime(int fd, struct utimbuf *times)
/*
map a unix file attrib to a DOS attribute
*/
-uint16 svfs_unix_to_dos_attrib(mode_t mode)
+uint16_t svfs_unix_to_dos_attrib(mode_t mode)
{
- uint16 ret = 0;
+ uint16_t ret = 0;
if (S_ISDIR(mode)) ret |= FILE_ATTRIBUTE_DIRECTORY;
if (!(mode & S_IWUSR)) ret |= FILE_ATTRIBUTE_READONLY;
return ret;
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 350621aa6b..4191c42edc 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -131,7 +131,7 @@ static const struct dcesrv_interface *find_interface_by_uuid(const struct dcesrv
/*
find a call that is pending in our call list
*/
-static struct dcesrv_call_state *dcesrv_find_call(struct dcesrv_connection *dce_conn, uint16 call_id)
+static struct dcesrv_call_state *dcesrv_find_call(struct dcesrv_connection *dce_conn, uint16_t call_id)
{
struct dcesrv_call_state *c;
for (c=dce_conn->call_list;c;c=c->next) {
@@ -554,7 +554,7 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call)
{
struct ndr_pull *pull;
struct ndr_push *push;
- uint16 opnum;
+ uint16_t opnum;
void *r;
NTSTATUS status;
DATA_BLOB stub;
diff --git a/source4/rpc_server/dcerpc_tcp.c b/source4/rpc_server/dcerpc_tcp.c
index e349de6194..81f1631c19 100644
--- a/source4/rpc_server/dcerpc_tcp.c
+++ b/source4/rpc_server/dcerpc_tcp.c
@@ -73,7 +73,7 @@ static ssize_t dcerpc_write_fn(void *private, const void *buf, size_t count)
called when a RPC socket becomes writable
*/
static void dcerpc_write_handler(struct event_context *ev, struct fd_event *fde,
- time_t t, uint16 flags)
+ time_t t, uint16_t flags)
{
struct rpc_server_context *r = fde->private;
NTSTATUS status;
@@ -92,7 +92,7 @@ static void dcerpc_write_handler(struct event_context *ev, struct fd_event *fde,
called when a RPC socket becomes readable
*/
static void dcerpc_read_handler(struct event_context *ev, struct fd_event *fde,
- time_t t, uint16 flags)
+ time_t t, uint16_t flags)
{
struct rpc_server_context *r = fde->private;
DATA_BLOB blob;
@@ -133,7 +133,7 @@ static void dcerpc_read_handler(struct event_context *ev, struct fd_event *fde,
called when a RPC socket becomes readable
*/
static void dcerpc_io_handler(struct event_context *ev, struct fd_event *fde,
- time_t t, uint16 flags)
+ time_t t, uint16_t flags)
{
if (flags & EVENT_FD_WRITE) {
dcerpc_write_handler(ev, fde, t, flags);
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index f6b758ad98..c3ec1f48a1 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -31,7 +31,7 @@ struct server_pipe_state {
char *account_name;
char *computer_name; /* for logging only */
uint32_t acct_flags;
- uint16 sec_chan_type;
+ uint16_t sec_chan_type;
struct creds_CredentialState *creds;
};
@@ -138,7 +138,7 @@ static NTSTATUS netr_ServerAuthenticateInternals(struct server_pipe_state *pipe_
TALLOC_CTX *mem_ctx,
const char *account_name,
const char *computer_name,
- uint16 secure_channel_type,
+ uint16_t secure_channel_type,
uint32_t in_flags,
const struct netr_Credential *client_credentials,
struct netr_Credential *server_credentials,
@@ -146,7 +146,7 @@ static NTSTATUS netr_ServerAuthenticateInternals(struct server_pipe_state *pipe_
{
void *sam_ctx;
uint8 *mach_pwd;
- uint16 acct_flags;
+ uint16_t acct_flags;
int num_records;
struct ldb_message **msgs;
NTSTATUS nt_status;
diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c
index 7856908236..37fa89f175 100644
--- a/source4/rpc_server/remote/dcesrv_remote.c
+++ b/source4/rpc_server/remote/dcesrv_remote.c
@@ -65,7 +65,7 @@ static NTSTATUS remote_op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CT
{
struct dcesrv_remote_private *private = dce_call->conn->private;
NTSTATUS status;
- uint16 opnum = dce_call->pkt.u.request.opnum;
+ uint16_t opnum = dce_call->pkt.u.request.opnum;
const char *name = dce_call->conn->iface->ndr->calls[opnum].name;
ndr_push_flags_fn_t ndr_push_fn = dce_call->conn->iface->ndr->calls[opnum].ndr_push;
ndr_pull_flags_fn_t ndr_pull_fn = dce_call->conn->iface->ndr->calls[opnum].ndr_pull;
diff --git a/source4/rpc_server/samr/samdb.c b/source4/rpc_server/samr/samdb.c
index 98374c6c86..76de3e3c30 100644
--- a/source4/rpc_server/samr/samdb.c
+++ b/source4/rpc_server/samr/samdb.c
@@ -571,7 +571,7 @@ struct samr_LogonHours samdb_result_logon_hours(TALLOC_CTX *mem_ctx, struct ldb_
/*
pull a set of account_flags from a result set.
*/
-uint16 samdb_result_acct_flags(struct ldb_message *msg, const char *attr)
+uint16_t samdb_result_acct_flags(struct ldb_message *msg, const char *attr)
{
uint_t userAccountControl = ldb_msg_find_uint(msg, attr, 0);
return samdb_uf2acb(userAccountControl);
diff --git a/source4/rpc_server/samr/samr_utils.c b/source4/rpc_server/samr/samr_utils.c
index 6b8a2ff19a..8297792cc2 100644
--- a/source4/rpc_server/samr/samr_utils.c
+++ b/source4/rpc_server/samr/samr_utils.c
@@ -28,7 +28,7 @@ translated the ACB_CTRL Flags to UserFlags (userAccountControl)
/* mapping between ADS userAccountControl and SAMR acct_flags */
static const struct {
uint32_t uf;
- uint16 acb;
+ uint16_t acb;
} acct_flags_map[] = {
{ UF_ACCOUNTDISABLE, ACB_DISABLED },
{ UF_HOMEDIR_REQUIRED, ACB_HOMDIRREQ },
@@ -43,7 +43,7 @@ static const struct {
{ UF_LOCKOUT, ACB_AUTOLOCK }
};
-uint32_t samdb_acb2uf(uint16 acb)
+uint32_t samdb_acb2uf(uint16_t acb)
{
uint32_t i, ret = 0;
for (i=0;i<ARRAY_SIZE(acct_flags_map);i++) {
@@ -57,10 +57,10 @@ uint32_t samdb_acb2uf(uint16 acb)
/*
translated the UserFlags (userAccountControl) to ACB_CTRL Flags
*/
-uint16 samdb_uf2acb(uint32_t uf)
+uint16_t samdb_uf2acb(uint32_t uf)
{
uint32_t i;
- uint16 ret = 0;
+ uint16_t ret = 0;
for (i=0;i<ARRAY_SIZE(acct_flags_map);i++) {
if (acct_flags_map[i].uf & uf) {
ret |= acct_flags_map[i].acb;
diff --git a/source4/smb_server/conn.c b/source4/smb_server/conn.c
index f8cb145cd8..821981a1c8 100644
--- a/source4/smb_server/conn.c
+++ b/source4/smb_server/conn.c
@@ -126,7 +126,7 @@ void conn_close_all(struct server_context *smb)
/****************************************************************************
clear a vuid out of the validity cache, and as the 'owner' of a connection.
****************************************************************************/
-void conn_clear_vuid_cache(struct server_context *smb, uint16 vuid)
+void conn_clear_vuid_cache(struct server_context *smb, uint16_t vuid)
{
struct tcon_context *conn;
unsigned int i;
diff --git a/source4/smb_server/negprot.c b/source4/smb_server/negprot.c
index 43dc5094df..42e706a816 100644
--- a/source4/smb_server/negprot.c
+++ b/source4/smb_server/negprot.c
@@ -49,7 +49,7 @@ static void get_challenge(struct server_context *smb, char buff[8])
/****************************************************************************
Reply for the core protocol.
****************************************************************************/
-static void reply_corep(struct request_context *req, uint16 choice)
+static void reply_corep(struct request_context *req, uint16_t choice)
{
req_setup_reply(req, 1, 0);
@@ -65,9 +65,9 @@ static void reply_corep(struct request_context *req, uint16 choice)
this is quite incomplete - we only fill in a small part of the reply, but as nobody uses
this any more it probably doesn't matter
****************************************************************************/
-static void reply_coreplus(struct request_context *req, uint16 choice)
+static void reply_coreplus(struct request_context *req, uint16_t choice)
{
- uint16 raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0);
+ uint16_t raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0);
req_setup_reply(req, 13, 0);
@@ -90,7 +90,7 @@ static void reply_coreplus(struct request_context *req, uint16 choice)
/****************************************************************************
Reply for the lanman 1.0 protocol.
****************************************************************************/
-static void reply_lanman1(struct request_context *req, uint16 choice)
+static void reply_lanman1(struct request_context *req, uint16_t choice)
{
int raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0);
int secword=0;
@@ -134,7 +134,7 @@ static void reply_lanman1(struct request_context *req, uint16 choice)
/****************************************************************************
Reply for the lanman 2.0 protocol.
****************************************************************************/
-static void reply_lanman2(struct request_context *req, uint16 choice)
+static void reply_lanman2(struct request_context *req, uint16_t choice)
{
int raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0);
int secword=0;
@@ -223,7 +223,7 @@ static DATA_BLOB negprot_spnego(struct server_context *smb)
/****************************************************************************
Reply for the nt protocol.
****************************************************************************/
-static void reply_nt1(struct request_context *req, uint16 choice)
+static void reply_nt1(struct request_context *req, uint16_t choice)
{
/* dual names + lock_and_read + nt SMBs + remote API calls */
int capabilities;
@@ -422,7 +422,7 @@ protocol [LANMAN2.1]
static const struct {
const char *proto_name;
const char *short_name;
- void (*proto_reply_fn)(struct request_context *req, uint16 choice);
+ void (*proto_reply_fn)(struct request_context *req, uint16_t choice);
int protocol_level;
} supported_protocols[] = {
{"NT LANMAN 1.0", "NT1", reply_nt1, PROTOCOL_NT1},
diff --git a/source4/smb_server/nttrans.c b/source4/smb_server/nttrans.c
index 2847efcef5..299d5b7333 100644
--- a/source4/smb_server/nttrans.c
+++ b/source4/smb_server/nttrans.c
@@ -34,12 +34,12 @@
/* setup a nttrans reply, given the data and params sizes */
static void nttrans_setup_reply(struct request_context *req,
struct smb_nttrans *trans,
- uint16 param_size, uint16 data_size,
- uint16 setup_count)
+ uint16_t param_size, uint16_t data_size,
+ uint16_t setup_count)
{
trans->out.setup_count = setup_count;
if (setup_count != 0) {
- trans->out.setup = talloc_zero(req->mem_ctx, sizeof(uint16) * setup_count);
+ trans->out.setup = talloc_zero(req->mem_ctx, sizeof(uint16_t) * setup_count);
}
trans->out.params = data_blob_talloc(req->mem_ctx, NULL, param_size);
trans->out.data = data_blob_talloc(req->mem_ctx, NULL, data_size);
@@ -68,7 +68,7 @@ static NTSTATUS nttrans_ioctl(struct request_context *req,
{
union smb_ioctl nt;
uint32_t function;
- uint16 fnum;
+ uint16_t fnum;
uint8 filter;
BOOL fsctl;
DATA_BLOB *blob;
@@ -132,10 +132,10 @@ void reply_nttrans(struct request_context *req)
{
struct smb_nttrans trans;
int i;
- uint16 param_ofs, data_ofs;
- uint16 param_count, data_count;
- uint16 params_left, data_left;
- uint16 param_total, data_total;
+ uint16_t param_ofs, data_ofs;
+ uint16_t param_count, data_count;
+ uint16_t params_left, data_left;
+ uint16_t param_total, data_total;
char *params, *data;
NTSTATUS status;
@@ -163,7 +163,7 @@ void reply_nttrans(struct request_context *req)
}
/* parse out the setup words */
- trans.in.setup = talloc(req->mem_ctx, trans.in.setup_count * sizeof(uint16));
+ trans.in.setup = talloc(req->mem_ctx, trans.in.setup_count * sizeof(uint16_t));
if (!trans.in.setup) {
req_reply_error(req, NT_STATUS_NO_MEMORY);
return;
@@ -203,7 +203,7 @@ void reply_nttrans(struct request_context *req)
/* we need to divide up the reply into chunks that fit into
the negotiated buffer size */
do {
- uint16 this_data, this_param, max_bytes;
+ uint16_t this_data, this_param, max_bytes;
uint_t align1 = 1, align2 = (params_left ? 2 : 0);
req_setup_reply(req, 18 + trans.out.setup_count, 0);
diff --git a/source4/smb_server/password.c b/source4/smb_server/password.c
index 5f7431f623..8b6018575b 100644
--- a/source4/smb_server/password.c
+++ b/source4/smb_server/password.c
@@ -26,7 +26,7 @@ check if a uid has been validated, and return an pointer to the user_struct
if it has. NULL if not. vuid is biased by an offset. This allows us to
tell random client vuid's (normally zero) from valid vuids.
****************************************************************************/
-struct user_struct *get_valid_user_struct(struct server_context *smb, uint16 vuid)
+struct user_struct *get_valid_user_struct(struct server_context *smb, uint16_t vuid)
{
user_struct *usp;
int count=0;
@@ -49,7 +49,7 @@ struct user_struct *get_valid_user_struct(struct server_context *smb, uint16 vui
/****************************************************************************
invalidate a uid
****************************************************************************/
-void invalidate_vuid(struct server_context *smb, uint16 vuid)
+void invalidate_vuid(struct server_context *smb, uint16_t vuid)
{
user_struct *vuser = get_valid_user_struct(smb, vuid);
diff --git a/source4/smb_server/reply.c b/source4/smb_server/reply.c
index 5680618bd3..9a4cee2a66 100644
--- a/source4/smb_server/reply.c
+++ b/source4/smb_server/reply.c
@@ -125,7 +125,7 @@ void reply_tcon_and_X(struct request_context *req)
NTSTATUS status;
union smb_tcon con;
char *p;
- uint16 passlen;
+ uint16_t passlen;
con.tconx.level = RAW_TCON_TCONX;
@@ -1065,7 +1065,7 @@ void reply_write_and_X(struct request_context *req)
if (req->in.wct == 14) {
uint32_t offset_high = IVAL(req->in.vwv, VWV(12));
- uint16 count_high = SVAL(req->in.vwv, VWV(9));
+ uint16_t count_high = SVAL(req->in.vwv, VWV(9));
io->writex.in.offset |= (((uint64_t)offset_high) << 32);
io->writex.in.count |= ((uint32_t)count_high) << 16;
}
@@ -1321,7 +1321,7 @@ void reply_tdis(struct request_context *req)
****************************************************************************/
void reply_echo(struct request_context *req)
{
- uint16 count;
+ uint16_t count;
int i;
REQ_CHECK_WCT(req, 0);
@@ -1894,7 +1894,7 @@ static void reply_sesssetup_old(struct request_context *req)
NTSTATUS status;
union smb_sesssetup sess;
char *p;
- uint16 passlen;
+ uint16_t passlen;
sess.old.level = RAW_SESSSETUP_OLD;
@@ -1952,7 +1952,7 @@ static void reply_sesssetup_nt1(struct request_context *req)
NTSTATUS status;
union smb_sesssetup sess;
char *p;
- uint16 passlen1, passlen2;
+ uint16_t passlen1, passlen2;
sess.nt1.level = RAW_SESSSETUP_NT1;
@@ -2022,7 +2022,7 @@ static void reply_sesssetup_spnego(struct request_context *req)
NTSTATUS status;
union smb_sesssetup sess;
char *p;
- uint16 blob_len;
+ uint16_t blob_len;
sess.spnego.level = RAW_SESSSETUP_SPNEGO;
@@ -2101,7 +2101,7 @@ void reply_sesssetup(struct request_context *req)
****************************************************************************/
void reply_ulogoffX(struct request_context *req)
{
- uint16 vuid;
+ uint16_t vuid;
vuid = SVAL(req->in.hdr, HDR_UID);
@@ -2199,7 +2199,7 @@ static void reply_ntcreate_and_X_send(struct request_context *req)
void reply_ntcreate_and_X(struct request_context *req)
{
union smb_open *io;
- uint16 fname_len;
+ uint16_t fname_len;
/* parse the request */
REQ_CHECK_WCT(req, 24);
diff --git a/source4/smb_server/request.c b/source4/smb_server/request.c
index 068e43cd09..558d140600 100644
--- a/source4/smb_server/request.c
+++ b/source4/smb_server/request.c
@@ -292,7 +292,7 @@ void req_send_reply(struct request_context *req)
construct and send an error packet with a forced DOS error code
this is needed to match win2000 behaviour for some parts of the protocol
*/
-void req_reply_dos_error(struct request_context *req, uint8 eclass, uint16 ecode)
+void req_reply_dos_error(struct request_context *req, uint8 eclass, uint16_t ecode)
{
/* if the basic packet hasn't been setup yet then do it now */
if (req->out.buffer == NULL) {
@@ -407,7 +407,7 @@ size_t req_append_bytes(struct request_context *req,
return the number of bytes added
*/
size_t req_append_var_block(struct request_context *req,
- const uint8 *bytes, uint16 byte_len)
+ const uint8 *bytes, uint16_t byte_len)
{
req_grow_allocation(req, byte_len + 3 + req->out.data_size);
SCVAL(req->out.data + req->out.data_size, 0, 5);
@@ -617,7 +617,7 @@ BOOL req_data_oob(struct request_context *req, const char *ptr, uint32_t count)
/*
pull an open file handle from a packet, taking account of the chained_fnum
*/
-uint16 req_fnum(struct request_context *req, const char *base, unsigned offset)
+uint16_t req_fnum(struct request_context *req, const char *base, unsigned offset)
{
if (req->chained_fnum != -1) {
return req->chained_fnum;
diff --git a/source4/smb_server/search.c b/source4/smb_server/search.c
index 55d1ae7c33..ae83a2b4a0 100644
--- a/source4/smb_server/search.c
+++ b/source4/smb_server/search.c
@@ -59,7 +59,7 @@
struct search_state {
struct request_context *req;
union smb_search_data *file;
- uint16 last_entry_offset;
+ uint16_t last_entry_offset;
};
/*
@@ -105,7 +105,7 @@ void reply_search(struct request_context *req)
union smb_search_first *sf;
union smb_search_next *sn;
DATA_BLOB resume_key;
- uint16 resume_key_length;
+ uint16_t resume_key_length;
struct search_state state;
char *p;
@@ -194,7 +194,7 @@ void reply_fclose(struct request_context *req)
{
union smb_search_next *sn;
DATA_BLOB resume_key;
- uint16 resume_key_length;
+ uint16_t resume_key_length;
REQ_TALLOC(sn, sizeof(*sn));
diff --git a/source4/smb_server/service.c b/source4/smb_server/service.c
index 86c42a2ee6..74e8746b0f 100644
--- a/source4/smb_server/service.c
+++ b/source4/smb_server/service.c
@@ -210,7 +210,7 @@ static NTSTATUS make_connection_snum(struct request_context *req,
****************************************************************************/
static NTSTATUS make_connection(struct request_context *req,
const char *service, DATA_BLOB password,
- const char *dev, uint16 vuid)
+ const char *dev, uint16_t vuid)
{
int snum;
enum ntvfs_type type;
diff --git a/source4/smb_server/signing.c b/source4/smb_server/signing.c
index a3779e17cf..1440026291 100644
--- a/source4/smb_server/signing.c
+++ b/source4/smb_server/signing.c
@@ -25,7 +25,7 @@
*/
static void mark_packet_signed(struct request_context *req)
{
- uint16 flags2;
+ uint16_t flags2;
flags2 = SVAL(req->out.hdr, HDR_FLG2);
flags2 |= FLAGS2_SMB_SECURITY_SIGNATURES;
SSVAL(req->out.hdr, HDR_FLG2, flags2);
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index ce50df04c3..9d971383b5 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -25,7 +25,7 @@
/*
send an oplock break request to a client
*/
-BOOL req_send_oplock_break(struct tcon_context *conn, uint16 fnum, uint8 level)
+BOOL req_send_oplock_break(struct tcon_context *conn, uint16_t fnum, uint8 level)
{
struct request_context *req;
@@ -436,7 +436,7 @@ onto the message queue
static void switch_message(int type, struct request_context *req)
{
int flags;
- uint16 session_tag;
+ uint16_t session_tag;
struct server_context *smb = req->smb;
type &= 0xff;
@@ -598,10 +598,10 @@ static void construct_reply(struct request_context *req)
*/
void chain_reply(struct request_context *req)
{
- uint16 chain_cmd, chain_offset;
+ uint16_t chain_cmd, chain_offset;
char *vwv, *data;
- uint16 wct;
- uint16 data_size;
+ uint16_t wct;
+ uint16_t data_size;
if (req->in.wct < 2 || req->out.wct < 2) {
req_reply_dos_error(req, ERRSRV, ERRerror);
@@ -682,7 +682,7 @@ void server_terminate(struct server_context *smb)
called when a SMB socket becomes readable
*/
void smbd_read_handler(struct event_context *ev, struct fd_event *fde,
- time_t t, uint16 flags)
+ time_t t, uint16_t flags)
{
struct request_context *req;
struct server_context *smb = fde->private;
@@ -725,7 +725,7 @@ void smbd_process_async(struct server_context *smb)
for reading from that socket
*/
void init_smbsession(struct event_context *ev, struct model_ops *model_ops, int fd,
- void (*read_handler)(struct event_context *, struct fd_event *, time_t, uint16))
+ void (*read_handler)(struct event_context *, struct fd_event *, time_t, uint16_t))
{
struct server_context *smb;
TALLOC_CTX *mem_ctx;
diff --git a/source4/smb_server/trans2.c b/source4/smb_server/trans2.c
index 46ab112374..e416b63bd4 100644
--- a/source4/smb_server/trans2.c
+++ b/source4/smb_server/trans2.c
@@ -34,7 +34,7 @@
pointer */
static void trans2_grow_data_allocation(struct request_context *req,
struct smb_trans2 *trans,
- uint16 new_size)
+ uint16_t new_size)
{
if (new_size <= trans->out.data.length) {
return;
@@ -46,7 +46,7 @@ static void trans2_grow_data_allocation(struct request_context *req,
/* grow the data size of a trans2 reply */
static void trans2_grow_data(struct request_context *req,
struct smb_trans2 *trans,
- uint16 new_size)
+ uint16_t new_size)
{
trans2_grow_data_allocation(req, trans, new_size);
trans->out.data.length = new_size;
@@ -55,9 +55,9 @@ static void trans2_grow_data(struct request_context *req,
/* grow the data, zero filling any new bytes */
static void trans2_grow_data_fill(struct request_context *req,
struct smb_trans2 *trans,
- uint16 new_size)
+ uint16_t new_size)
{
- uint16 old_size = trans->out.data.length;
+ uint16_t old_size = trans->out.data.length;
trans2_grow_data(req, trans, new_size);
if (new_size > old_size) {
memset(trans->out.data.data + old_size, 0, new_size - old_size);
@@ -68,12 +68,12 @@ static void trans2_grow_data_fill(struct request_context *req,
/* setup a trans2 reply, given the data and params sizes */
static void trans2_setup_reply(struct request_context *req,
struct smb_trans2 *trans,
- uint16 param_size, uint16 data_size,
- uint16 setup_count)
+ uint16_t param_size, uint16_t data_size,
+ uint16_t setup_count)
{
trans->out.setup_count = setup_count;
if (setup_count != 0) {
- trans->out.setup = talloc_zero(req->mem_ctx, sizeof(uint16) * setup_count);
+ trans->out.setup = talloc_zero(req->mem_ctx, sizeof(uint16_t) * setup_count);
}
trans->out.params = data_blob_talloc(req->mem_ctx, NULL, param_size);
trans->out.data = data_blob_talloc(req->mem_ctx, NULL, data_size);
@@ -85,7 +85,7 @@ static void trans2_setup_reply(struct request_context *req,
*/
static size_t trans2_pull_blob_string(struct request_context *req,
const DATA_BLOB *blob,
- uint16 offset,
+ uint16_t offset,
const char **str,
int flags)
{
@@ -109,8 +109,8 @@ static size_t trans2_pull_blob_string(struct request_context *req,
*/
static size_t trans2_push_data_string(struct request_context *req,
struct smb_trans2 *trans,
- uint16 len_offset,
- uint16 offset,
+ uint16_t len_offset,
+ uint16_t offset,
const WIRE_STRING *str,
int dest_len,
int flags)
@@ -183,7 +183,7 @@ static void trans2_append_data_string(struct request_context *req,
int flags)
{
size_t ret;
- uint16 offset;
+ uint16_t offset;
const int max_bytes_per_char = 3;
offset = trans->out.data.length;
@@ -200,7 +200,7 @@ static NTSTATUS trans2_qfsinfo(struct request_context *req, struct smb_trans2 *t
{
union smb_fsinfo fsinfo;
NTSTATUS status;
- uint16 level;
+ uint16_t level;
uint_t i;
DATA_BLOB guid_blob;
@@ -587,7 +587,7 @@ static NTSTATUS trans2_fileinfo_fill(struct request_context *req, struct smb_tra
SSVAL(trans->out.params.data, 0, 0);
for (i=0;i<st->stream_info.out.num_streams;i++) {
- uint16 data_size = trans->out.data.length;
+ uint16_t data_size = trans->out.data.length;
char *data;
trans2_grow_data(req, trans, data_size + 24);
@@ -618,7 +618,7 @@ static NTSTATUS trans2_qpathinfo(struct request_context *req, struct smb_trans2
{
union smb_fileinfo st;
NTSTATUS status;
- uint16 level;
+ uint16_t level;
/* make sure we got enough parameters */
if (trans->in.params.length < 8) {
@@ -658,7 +658,7 @@ static NTSTATUS trans2_qfileinfo(struct request_context *req, struct smb_trans2
{
union smb_fileinfo st;
NTSTATUS status;
- uint16 level;
+ uint16_t level;
/* make sure we got enough parameters */
if (trans->in.params.length < 4) {
@@ -790,7 +790,7 @@ static NTSTATUS trans2_setfileinfo(struct request_context *req, struct smb_trans
{
union smb_setfileinfo st;
NTSTATUS status;
- uint16 level, fnum;
+ uint16_t level, fnum;
DATA_BLOB *blob;
/* make sure we got enough parameters */
@@ -828,7 +828,7 @@ static NTSTATUS trans2_setpathinfo(struct request_context *req, struct smb_trans
{
union smb_setfileinfo st;
NTSTATUS status;
- uint16 level;
+ uint16_t level;
DATA_BLOB *blob;
/* make sure we got enough parameters */
@@ -866,8 +866,8 @@ struct find_state {
struct request_context *req;
struct smb_trans2 *trans;
enum search_level level;
- uint16 last_entry_offset;
- uint16 flags;
+ uint16_t last_entry_offset;
+ uint16_t flags;
};
/*
@@ -1073,7 +1073,7 @@ static NTSTATUS trans2_findfirst(struct request_context *req, struct smb_trans2
{
union smb_search_first search;
NTSTATUS status;
- uint16 level;
+ uint16_t level;
char *param;
struct find_state state;
@@ -1133,7 +1133,7 @@ static NTSTATUS trans2_findnext(struct request_context *req, struct smb_trans2 *
{
union smb_search_next search;
NTSTATUS status;
- uint16 level;
+ uint16_t level;
char *param;
struct find_state state;
@@ -1242,10 +1242,10 @@ void reply_trans_generic(struct request_context *req, uint8 command)
{
struct smb_trans2 trans;
int i;
- uint16 param_ofs, data_ofs;
- uint16 param_count, data_count;
- uint16 params_left, data_left;
- uint16 param_total, data_total;
+ uint16_t param_ofs, data_ofs;
+ uint16_t param_count, data_count;
+ uint16_t params_left, data_left;
+ uint16_t param_total, data_total;
char *params, *data;
NTSTATUS status;
@@ -1274,7 +1274,7 @@ void reply_trans_generic(struct request_context *req, uint8 command)
}
/* parse out the setup words */
- trans.in.setup = talloc(req->mem_ctx, trans.in.setup_count * sizeof(uint16));
+ trans.in.setup = talloc(req->mem_ctx, trans.in.setup_count * sizeof(uint16_t));
if (!trans.in.setup) {
req_reply_error(req, NT_STATUS_NO_MEMORY);
return;
@@ -1322,7 +1322,7 @@ void reply_trans_generic(struct request_context *req, uint8 command)
/* we need to divide up the reply into chunks that fit into
the negotiated buffer size */
do {
- uint16 this_data, this_param, max_bytes;
+ uint16_t this_data, this_param, max_bytes;
uint_t align1 = 1, align2 = (params_left ? 2 : 0);
req_setup_reply(req, 10 + trans.out.setup_count, 0);
diff --git a/source4/smbd/build_options.c b/source4/smbd/build_options.c
index dea17df2e0..bdb4ce3549 100644
--- a/source4/smbd/build_options.c
+++ b/source4/smbd/build_options.c
@@ -525,7 +525,7 @@ void build_options(BOOL screen)
output(screen," sizeof(int): %d\n",sizeof(int));
output(screen," sizeof(long): %d\n",sizeof(long));
output(screen," sizeof(uint8): %d\n",sizeof(uint8));
- output(screen," sizeof(uint16): %d\n",sizeof(uint16));
+ output(screen," sizeof(uint16_t): %d\n",sizeof(uint16_t));
output(screen," sizeof(uint32_t): %d\n",sizeof(uint32_t));
output(screen," sizeof(short): %d\n",sizeof(short));
output(screen," sizeof(void*): %d\n",sizeof(void*));
diff --git a/source4/smbd/process_model.h b/source4/smbd/process_model.h
index 688ae65226..f56635e62c 100644
--- a/source4/smbd/process_model.h
+++ b/source4/smbd/process_model.h
@@ -39,10 +39,10 @@ struct model_ops {
void (*model_startup)(void);
/* function to accept new connection */
- void (*accept_connection)(struct event_context *, struct fd_event *, time_t, uint16);
+ void (*accept_connection)(struct event_context *, struct fd_event *, time_t, uint16_t);
/* function to accept new rpc over tcp connection */
- void (*accept_rpc_connection)(struct event_context *, struct fd_event *, time_t, uint16);
+ void (*accept_rpc_connection)(struct event_context *, struct fd_event *, time_t, uint16_t);
/* function to terminate a connection */
void (*terminate_connection)(struct server_context *smb, const char *reason);
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c
index 0c626e45c6..ac0d9fc6f9 100644
--- a/source4/smbd/process_single.c
+++ b/source4/smbd/process_single.c
@@ -32,7 +32,7 @@ static void model_startup(void)
/*
called when a listening socket becomes readable
*/
-static void accept_connection(struct event_context *ev, struct fd_event *fde, time_t t, uint16 flags)
+static void accept_connection(struct event_context *ev, struct fd_event *fde, time_t t, uint16_t flags)
{
int accepted_fd;
struct sockaddr addr;
@@ -58,7 +58,7 @@ static void accept_connection(struct event_context *ev, struct fd_event *fde, ti
/*
called when a rpc listening socket becomes readable
*/
-static void accept_rpc_connection(struct event_context *ev, struct fd_event *fde, time_t t, uint16 flags)
+static void accept_rpc_connection(struct event_context *ev, struct fd_event *fde, time_t t, uint16_t flags)
{
int accepted_fd;
struct sockaddr addr;
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index 3dfb8d7e27..bf21e21157 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -32,7 +32,7 @@ static void model_startup(void)
/*
called when a listening socket becomes readable
*/
-static void accept_connection(struct event_context *ev, struct fd_event *fde, time_t t, uint16 flags)
+static void accept_connection(struct event_context *ev, struct fd_event *fde, time_t t, uint16_t flags)
{
int accepted_fd;
struct sockaddr addr;
@@ -82,7 +82,7 @@ static void accept_connection(struct event_context *ev, struct fd_event *fde, ti
/*
called when a rpc listening socket becomes readable
*/
-static void accept_rpc_connection(struct event_context *ev, struct fd_event *fde, time_t t, uint16 flags)
+static void accept_rpc_connection(struct event_context *ev, struct fd_event *fde, time_t t, uint16_t flags)
{
int accepted_fd;
struct sockaddr addr;
diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c
index d37cf8d7ff..5bf18e34d2 100644
--- a/source4/smbd/process_thread.c
+++ b/source4/smbd/process_thread.c
@@ -46,7 +46,7 @@ static int get_id(struct request_context *req)
called when a listening socket becomes readable
*/
static void accept_connection(struct event_context *ev, struct fd_event *fde,
- time_t t, uint16 flags)
+ time_t t, uint16_t flags)
{
int accepted_fd, rc;
struct sockaddr addr;
@@ -91,7 +91,7 @@ static void accept_connection(struct event_context *ev, struct fd_event *fde,
/*
called when a rpc listening socket becomes readable
*/
-static void accept_rpc_connection(struct event_context *ev, struct fd_event *fde, time_t t, uint16 flags)
+static void accept_rpc_connection(struct event_context *ev, struct fd_event *fde, time_t t, uint16_t flags)
{
int accepted_fd, rc;
struct sockaddr addr;
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 8a06a5b7df..1dc8082b30 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -38,7 +38,7 @@ void exit_server(struct server_context *smb, const char *reason)
*/
static void setup_listen(struct event_context *events,
const struct model_ops *model_ops,
- void (*accept_handler)(struct event_context *,struct fd_event *,time_t,uint16),
+ void (*accept_handler)(struct event_context *,struct fd_event *,time_t,uint16_t),
struct in_addr *ifip, unsigned port)
{
struct fd_event fde;
@@ -302,7 +302,7 @@ static void setup_process_model(struct event_context *events,
/* Output the build options to the debug log */
build_options(False);
- if (sizeof(uint16) < 2 || sizeof(uint32_t) < 4) {
+ if (sizeof(uint16_t) < 2 || sizeof(uint32_t) < 4) {
DEBUG(0,("ERROR: Samba is not configured correctly for the word size on your machine\n"));
exit(1);
}
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c
index c4d6f94700..9fe2baa300 100644
--- a/source4/torture/basic/aliases.c
+++ b/source4/torture/basic/aliases.c
@@ -24,7 +24,7 @@ int create_complex_file(struct cli_state *cli, TALLOC_CTX *mem_ctx, const char *
struct trans2_blobs {
struct trans2_blobs *next, *prev;
- uint16 level;
+ uint16_t level;
DATA_BLOB params, data;
};
@@ -32,7 +32,7 @@ struct trans2_blobs {
static void gen_aliases(struct cli_state *cli, struct smb_trans2 *t2, int level_offset)
{
TALLOC_CTX *mem_ctx;
- uint16 level;
+ uint16_t level;
struct trans2_blobs *alias_blobs = NULL;
struct trans2_blobs *t2b, *t2b2;
int count=0, alias_count=0;
@@ -81,7 +81,7 @@ static void gen_aliases(struct cli_state *cli, struct smb_trans2 *t2, int level_
static void qfsinfo_aliases(struct cli_state *cli)
{
struct smb_trans2 t2;
- uint16 setup = TRANSACT2_QFSINFO;
+ uint16_t setup = TRANSACT2_QFSINFO;
d_printf("\nChecking for QFSINFO aliases\n");
@@ -102,7 +102,7 @@ static void qfsinfo_aliases(struct cli_state *cli)
static void qfileinfo_aliases(struct cli_state *cli)
{
struct smb_trans2 t2;
- uint16 setup = TRANSACT2_QFILEINFO;
+ uint16_t setup = TRANSACT2_QFILEINFO;
const char *fname = "\\qfileinfo_aliases.txt";
int fnum;
@@ -139,7 +139,7 @@ static void qfileinfo_aliases(struct cli_state *cli)
static void qpathinfo_aliases(struct cli_state *cli)
{
struct smb_trans2 t2;
- uint16 setup = TRANSACT2_QPATHINFO;
+ uint16_t setup = TRANSACT2_QPATHINFO;
const char *fname = "\\qpathinfo_aliases.txt";
int fnum;
TALLOC_CTX *mem_ctx;
@@ -183,7 +183,7 @@ static void qpathinfo_aliases(struct cli_state *cli)
static void findfirst_aliases(struct cli_state *cli)
{
struct smb_trans2 t2;
- uint16 setup = TRANSACT2_FINDFIRST;
+ uint16_t setup = TRANSACT2_FINDFIRST;
const char *fname = "\\findfirst_aliases.txt";
int fnum;
TALLOC_CTX *mem_ctx;
@@ -232,7 +232,7 @@ static void findfirst_aliases(struct cli_state *cli)
static void gen_set_aliases(struct cli_state *cli, struct smb_trans2 *t2, int level_offset)
{
TALLOC_CTX *mem_ctx;
- uint16 level;
+ uint16_t level;
struct trans2_blobs *alias_blobs = NULL;
struct trans2_blobs *t2b;
int count=0, dsize;
@@ -298,7 +298,7 @@ static void gen_set_aliases(struct cli_state *cli, struct smb_trans2 *t2, int le
static void setfileinfo_aliases(struct cli_state *cli)
{
struct smb_trans2 t2;
- uint16 setup = TRANSACT2_SETFILEINFO;
+ uint16_t setup = TRANSACT2_SETFILEINFO;
const char *fname = "\\setfileinfo_aliases.txt";
int fnum;
@@ -335,7 +335,7 @@ static void setfileinfo_aliases(struct cli_state *cli)
static void setpathinfo_aliases(struct cli_state *cli)
{
struct smb_trans2 t2;
- uint16 setup = TRANSACT2_SETPATHINFO;
+ uint16_t setup = TRANSACT2_SETPATHINFO;
const char *fname = "\\setpathinfo_aliases.txt";
int fnum;
TALLOC_CTX *mem_ctx;
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index 7368528200..cf513414e8 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -53,7 +53,7 @@ static NTSTATUS try_trans2(struct cli_state *cli,
{
NTSTATUS status;
struct smb_trans2 t2;
- uint16 setup = op;
+ uint16_t setup = op;
TALLOC_CTX *mem_ctx;
mem_ctx = talloc_init("try_trans2");
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 1f33257e6a..c66f5161d5 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -68,8 +68,8 @@ static struct {
/* oplock break info */
static struct {
BOOL got_break;
- uint16 fnum;
- uint16 handle;
+ uint16_t fnum;
+ uint16_t handle;
uint8 level;
BOOL do_close;
} oplocks[NSERVERS][NINSTANCES];
@@ -94,7 +94,7 @@ static struct {
#define BAD_HANDLE 0xFFFE
-static BOOL oplock_handler(struct cli_transport *transport, uint16 tid, uint16 fnum, uint8 level, void *private);
+static BOOL oplock_handler(struct cli_transport *transport, uint16_t tid, uint16_t fnum, uint8 level, void *private);
static void idle_func(struct cli_transport *transport, void *private);
/*
@@ -206,7 +206,7 @@ static uint_t time_skew(void)
/*
turn an fnum for an instance into a handle
*/
-static uint_t fnum_to_handle(int server, int instance, uint16 fnum)
+static uint_t fnum_to_handle(int server, int instance, uint16_t fnum)
{
uint_t i;
for (i=0;i<options.max_open_handles;i++) {
@@ -224,7 +224,7 @@ static uint_t fnum_to_handle(int server, int instance, uint16 fnum)
/*
add some newly opened handles
*/
-static void gen_add_handle(int instance, const char *name, uint16 fnums[NSERVERS])
+static void gen_add_handle(int instance, const char *name, uint16_t fnums[NSERVERS])
{
int i, h;
for (h=0;h<options.max_open_handles;h++) {
@@ -260,7 +260,7 @@ static void gen_add_handle(int instance, const char *name, uint16 fnums[NSERVERS
/*
remove a closed handle
*/
-static void gen_remove_handle(int instance, uint16 fnums[NSERVERS])
+static void gen_remove_handle(int instance, uint16_t fnums[NSERVERS])
{
int h;
for (h=0;h<options.max_open_handles;h++) {
@@ -290,7 +290,7 @@ static BOOL gen_chance(uint_t chance)
/*
map an internal handle number to a server fnum
*/
-static uint16 gen_lookup_fnum(int server, uint16 handle)
+static uint16_t gen_lookup_fnum(int server, uint16_t handle)
{
if (handle == BAD_HANDLE) return handle;
return open_handles[handle].server_fnum[server];
@@ -299,9 +299,9 @@ static uint16 gen_lookup_fnum(int server, uint16 handle)
/*
return a file handle
*/
-static uint16 gen_fnum(int instance)
+static uint16_t gen_fnum(int instance)
{
- uint16 h;
+ uint16_t h;
int count = 0;
if (gen_chance(20)) return BAD_HANDLE;
@@ -320,7 +320,7 @@ static uint16 gen_fnum(int instance)
return a file handle, but skewed so we don't close the last
couple of handles too readily
*/
-static uint16 gen_fnum_close(int instance)
+static uint16_t gen_fnum_close(int instance)
{
if (num_open_handles < 3) {
if (gen_chance(80)) return BAD_HANDLE;
@@ -342,7 +342,7 @@ static int gen_int_range(uint_t min, uint_t max)
return a fnum for use as a root fid
be careful to call GEN_SET_FNUM() when you use this!
*/
-static uint16 gen_root_fid(int instance)
+static uint16_t gen_root_fid(int instance)
{
if (gen_chance(5)) return gen_fnum(instance);
return 0;
@@ -412,7 +412,7 @@ static const char *gen_fname(void)
*/
static const char *gen_fname_open(int instance)
{
- uint16 h;
+ uint16_t h;
h = gen_fnum(instance);
if (h == BAD_HANDLE) {
return gen_fname();
@@ -472,7 +472,7 @@ static BOOL gen_bool(void)
/*
generate ntrename flags
*/
-static uint16 gen_rename_flags(void)
+static uint16_t gen_rename_flags(void)
{
if (gen_chance(30)) return RENAME_FLAG_RENAME;
if (gen_chance(30)) return RENAME_FLAG_HARD_LINK;
@@ -484,7 +484,7 @@ static uint16 gen_rename_flags(void)
/*
return a lockingx lock mode
*/
-static uint16 gen_lock_mode(void)
+static uint16_t gen_lock_mode(void)
{
if (gen_chance(5)) return gen_bits_mask(0xFFFF);
if (gen_chance(20)) return gen_bits_mask(0x1F);
@@ -494,7 +494,7 @@ static uint16 gen_lock_mode(void)
/*
generate a pid
*/
-static uint16 gen_pid(void)
+static uint16_t gen_pid(void)
{
if (gen_chance(10)) return gen_bits_mask(0xFFFF);
return getpid();
@@ -549,7 +549,7 @@ static uint32_t gen_open_disp(void)
/*
generate an openx open mode
*/
-static uint16 gen_openx_mode(void)
+static uint16_t gen_openx_mode(void)
{
if (gen_chance(20)) return gen_bits_mask(0xFFFF);
if (gen_chance(20)) return gen_bits_mask(0xFF);
@@ -559,7 +559,7 @@ static uint16 gen_openx_mode(void)
/*
generate an openx flags field
*/
-static uint16 gen_openx_flags(void)
+static uint16_t gen_openx_flags(void)
{
if (gen_chance(20)) return gen_bits_mask(0xFFFF);
return gen_bits_mask(0x7);
@@ -568,7 +568,7 @@ static uint16 gen_openx_flags(void)
/*
generate an openx open function
*/
-static uint16 gen_openx_func(void)
+static uint16_t gen_openx_func(void)
{
if (gen_chance(20)) return gen_bits_mask(0xFFFF);
return gen_bits_mask(0x13);
@@ -675,7 +675,7 @@ static void async_notify(struct cli_request *req)
struct smb_notify notify;
NTSTATUS status;
int i, j;
- uint16 tid;
+ uint16_t tid;
struct cli_transport *transport = req->transport;
tid = SVAL(req->in.hdr, HDR_TID);
@@ -704,7 +704,7 @@ static void async_notify(struct cli_request *req)
/*
the oplock handler will either ack the break or close the file
*/
-static BOOL oplock_handler(struct cli_transport *transport, uint16 tid, uint16 fnum, uint8 level, void *private)
+static BOOL oplock_handler(struct cli_transport *transport, uint16_t tid, uint16_t fnum, uint8 level, void *private)
{
union smb_close io;
NTSTATUS status;
@@ -852,7 +852,7 @@ again:
for (j=0;j<NINSTANCES;j++) {
if (oplocks[0][j].got_break &&
oplocks[0][j].do_close) {
- uint16 fnums[NSERVERS];
+ uint16_t fnums[NSERVERS];
for (i=0;i<NSERVERS;i++) {
fnums[i] = oplocks[i][j].fnum;
}
@@ -968,7 +968,7 @@ again:
} while(0)
#define ADD_HANDLE(name, field) do { \
- uint16 fnums[NSERVERS]; \
+ uint16_t fnums[NSERVERS]; \
int i; \
for (i=0;i<NSERVERS;i++) { \
fnums[i] = parm[i].field; \
@@ -977,7 +977,7 @@ again:
} while(0)
#define REMOVE_HANDLE(field) do { \
- uint16 fnums[NSERVERS]; \
+ uint16_t fnums[NSERVERS]; \
int i; \
for (i=0;i<NSERVERS;i++) { \
fnums[i] = parm[i].field; \
diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c
index e65815fb80..3ce7d66b25 100644
--- a/source4/torture/nbench/nbio.c
+++ b/source4/torture/nbench/nbio.c
@@ -143,7 +143,7 @@ static struct cli_state *c;
/*
a handler function for oplock break requests
*/
-static BOOL oplock_handler(struct cli_transport *transport, uint16 tid, uint16 fnum, uint8 level, void *private)
+static BOOL oplock_handler(struct cli_transport *transport, uint16_t tid, uint16_t fnum, uint8 level, void *private)
{
struct cli_tree *tree = private;
return cli_oplock_ack(tree, fnum, level);
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c
index 91763da86f..29aa915b5d 100644
--- a/source4/torture/raw/context.c
+++ b/source4/torture/raw/context.c
@@ -265,7 +265,7 @@ static BOOL test_pid(struct cli_state *cli, TALLOC_CTX *mem_ctx)
int fnum;
const char *fname = BASEDIR "\\test.txt";
char c = 1;
- uint16 pid1, pid2;
+ uint16_t pid1, pid2;
printf("TESTING PID HANDLING\n");
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 88cadf7b66..8a4e09374b 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -265,7 +265,7 @@ static BOOL test_openx(struct cli_state *cli, TALLOC_CTX *mem_ctx)
BOOL ret = True;
int i;
struct {
- uint16 open_func;
+ uint16_t open_func;
BOOL with_file;
NTSTATUS correct_status;
} open_funcs[] = {
@@ -454,7 +454,7 @@ static BOOL test_t2open(struct cli_state *cli, TALLOC_CTX *mem_ctx)
BOOL ret = True;
int i;
struct {
- uint16 open_func;
+ uint16_t open_func;
BOOL with_file;
NTSTATUS correct_status;
} open_funcs[] = {
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 403d19113d..c610f9a78d 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -45,7 +45,7 @@ static struct {
/*
a handler function for oplock break requests
*/
-static BOOL oplock_handler_ack(struct cli_transport *transport, uint16 tid, uint16 fnum, uint8 level, void *private)
+static BOOL oplock_handler_ack(struct cli_transport *transport, uint16_t tid, uint16_t fnum, uint8 level, void *private)
{
struct cli_tree *tree = private;
break_info.fnum = fnum;
@@ -60,7 +60,7 @@ static BOOL oplock_handler_ack(struct cli_transport *transport, uint16 tid, uint
/*
a handler function for oplock break requests - close the file
*/
-static BOOL oplock_handler_close(struct cli_transport *transport, uint16 tid, uint16 fnum, uint8 level, void *private)
+static BOOL oplock_handler_close(struct cli_transport *transport, uint16_t tid, uint16_t fnum, uint8 level, void *private)
{
union smb_close io;
NTSTATUS status;
@@ -95,7 +95,7 @@ static BOOL test_oplock(struct cli_state *cli, TALLOC_CTX *mem_ctx)
union smb_open io;
struct smb_unlink unl;
union smb_read rd;
- uint16 fnum, fnum2;
+ uint16_t fnum, fnum2;
/* cleanup */
cli_unlink(cli->tree, fname);
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c
index 3aa17b6ecc..30c352680a 100644
--- a/source4/torture/rpc/dfs.c
+++ b/source4/torture/rpc/dfs.c
@@ -39,7 +39,7 @@ static BOOL test_Exist(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return True;
}
-static BOOL test_InfoLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16 level,
+static BOOL test_InfoLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16_t level,
const char *root)
{
NTSTATUS status;
@@ -64,7 +64,7 @@ static BOOL test_InfoLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16 le
static BOOL test_Info(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *root)
{
BOOL ret = True;
- uint16 levels[] = {1, 2, 3, 4, 100, 101, 102, 200, 300};
+ uint16_t levels[] = {1, 2, 3, 4, 100, 101, 102, 200, 300};
int i;
for (i=0;i<ARRAY_SIZE(levels);i++) {
if (!test_InfoLevel(p, mem_ctx, levels[i], root)) {
@@ -74,7 +74,7 @@ static BOOL test_Info(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *ro
return ret;
}
-static BOOL test_EnumLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16 level)
+static BOOL test_EnumLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16_t level)
{
NTSTATUS status;
struct dfs_Enum r;
@@ -120,7 +120,7 @@ static BOOL test_EnumLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16 le
static BOOL test_Enum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
BOOL ret = True;
- uint16 levels[] = {1, 2, 3, 4, 200, 300};
+ uint16_t levels[] = {1, 2, 3, 4, 200, 300};
int i;
for (i=0;i<ARRAY_SIZE(levels);i++) {
if (!test_EnumLevel(p, mem_ctx, levels[i])) {
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index f3e1c04d29..306197dcf2 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -33,7 +33,7 @@ static BOOL test_OpenPolicy(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
struct lsa_QosInfo qos;
struct lsa_OpenPolicy r;
NTSTATUS status;
- uint16 system_name = '\\';
+ uint16_t system_name = '\\';
printf("\ntesting OpenPolicy\n");
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 4b65cc75f9..cce650983a 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -532,7 +532,7 @@ static BOOL test_SetAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct samr_SetAliasInfo r;
struct samr_QueryAliasInfo q;
- uint16 levels[] = {2, 3};
+ uint16_t levels[] = {2, 3};
int i;
BOOL ret = True;
@@ -1538,7 +1538,7 @@ static BOOL test_QueryAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct samr_QueryAliasInfo r;
- uint16 levels[] = {1, 2, 3};
+ uint16_t levels[] = {1, 2, 3};
int i;
BOOL ret = True;
@@ -1564,7 +1564,7 @@ static BOOL test_QueryGroupInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct samr_QueryGroupInfo r;
- uint16 levels[] = {1, 2, 3, 4};
+ uint16_t levels[] = {1, 2, 3, 4};
int i;
BOOL ret = True;
@@ -1592,8 +1592,8 @@ static BOOL test_SetGroupInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct samr_QueryGroupInfo r;
struct samr_SetGroupInfo s;
- uint16 levels[] = {1, 2, 3, 4};
- uint16 set_ok[] = {0, 1, 1, 1};
+ uint16_t levels[] = {1, 2, 3, 4};
+ uint16_t set_ok[] = {0, 1, 1, 1};
int i;
BOOL ret = True;
@@ -1650,7 +1650,7 @@ static BOOL test_QueryUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct samr_QueryUserInfo r;
- uint16 levels[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ uint16_t levels[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 16, 17, 20, 21};
int i;
BOOL ret = True;
@@ -1677,7 +1677,7 @@ static BOOL test_QueryUserInfo2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct samr_QueryUserInfo2 r;
- uint16 levels[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ uint16_t levels[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 16, 17, 20, 21};
int i;
BOOL ret = True;
@@ -1968,8 +1968,8 @@ static BOOL test_GetDisplayEnumerationIndex(struct dcerpc_pipe *p, TALLOC_CTX *m
NTSTATUS status;
struct samr_GetDisplayEnumerationIndex r;
BOOL ret = True;
- uint16 levels[] = {1, 2, 3, 4, 5};
- uint16 ok_lvl[] = {1, 1, 1, 0, 0};
+ uint16_t levels[] = {1, 2, 3, 4, 5};
+ uint16_t ok_lvl[] = {1, 1, 1, 0, 0};
int i;
for (i=0;i<ARRAY_SIZE(levels);i++) {
@@ -2009,8 +2009,8 @@ static BOOL test_GetDisplayEnumerationIndex2(struct dcerpc_pipe *p, TALLOC_CTX *
NTSTATUS status;
struct samr_GetDisplayEnumerationIndex2 r;
BOOL ret = True;
- uint16 levels[] = {1, 2, 3, 4, 5};
- uint16 ok_lvl[] = {1, 1, 1, 0, 0};
+ uint16_t levels[] = {1, 2, 3, 4, 5};
+ uint16_t ok_lvl[] = {1, 1, 1, 0, 0};
int i;
for (i=0;i<ARRAY_SIZE(levels);i++) {
@@ -2048,7 +2048,7 @@ static BOOL test_QueryDisplayInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct samr_QueryDisplayInfo r;
BOOL ret = True;
- uint16 levels[] = {1, 2, 3, 4, 5};
+ uint16_t levels[] = {1, 2, 3, 4, 5};
int i;
for (i=0;i<ARRAY_SIZE(levels);i++) {
@@ -2077,7 +2077,7 @@ static BOOL test_QueryDisplayInfo2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct samr_QueryDisplayInfo2 r;
BOOL ret = True;
- uint16 levels[] = {1, 2, 3, 4, 5};
+ uint16_t levels[] = {1, 2, 3, 4, 5};
int i;
for (i=0;i<ARRAY_SIZE(levels);i++) {
@@ -2106,7 +2106,7 @@ static BOOL test_QueryDisplayInfo3(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct samr_QueryDisplayInfo3 r;
BOOL ret = True;
- uint16 levels[] = {1, 2, 3, 4, 5};
+ uint16_t levels[] = {1, 2, 3, 4, 5};
int i;
for (i=0;i<ARRAY_SIZE(levels);i++) {
@@ -2135,8 +2135,8 @@ static BOOL test_QueryDomainInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct samr_QueryDomainInfo r;
struct samr_SetDomainInfo s;
- uint16 levels[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13};
- uint16 set_ok[] = {1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0};
+ uint16_t levels[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13};
+ uint16_t set_ok[] = {1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0};
int i;
BOOL ret = True;
@@ -2195,7 +2195,7 @@ static BOOL test_QueryDomainInfo2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct samr_QueryDomainInfo2 r;
- uint16 levels[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13};
+ uint16_t levels[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13};
int i;
BOOL ret = True;
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 6e6d325ab0..74860cd369 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -26,7 +26,7 @@ static BOOL test_GetPrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct spoolss_GetPrinter r;
- uint16 levels[] = {1, 2, 3, 4, 5, 6, 7};
+ uint16_t levels[] = {1, 2, 3, 4, 5, 6, 7};
int i;
BOOL ret = True;
@@ -751,7 +751,7 @@ static BOOL test_EnumPrinters(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
struct spoolss_EnumPrinters r;
NTSTATUS status;
- uint16 levels[] = {1, 2, 4, 5};
+ uint16_t levels[] = {1, 2, 4, 5};
int i;
BOOL ret = True;
@@ -867,7 +867,7 @@ static BOOL test_EnumPrinterDrivers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
struct spoolss_EnumPrinterDrivers r;
NTSTATUS status;
- uint16 levels[] = {1, 2, 3};
+ uint16_t levels[] = {1, 2, 3};
int i;
BOOL ret = True;
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 7fa93aa0c9..3a1d7be68b 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -409,7 +409,7 @@ static BOOL test_AbortSystemShutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
struct winreg_AbortSystemShutdown r;
NTSTATUS status;
- uint16 server = 0x0;
+ uint16_t server = 0x0;
r.in.server = &server;
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index b1dc2edfcf..4768163d5c 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -27,7 +27,7 @@ static BOOL test_NetWkstaGetInfo(struct dcerpc_pipe *p,
{
NTSTATUS status;
struct wkssvc_NetWkstaGetInfo r;
- uint16 levels[] = {100, 101, 102, 502};
+ uint16_t levels[] = {100, 101, 102, 502};
int i;
BOOL ret = True;
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index d5e7fbd3b2..28e43b2fa8 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -665,8 +665,8 @@ static BOOL run_tcon_test(int dummy)
struct cli_state *cli;
const char *fname = "\\tcontest.tmp";
int fnum1;
- uint16 cnum1, cnum2, cnum3;
- uint16 vuid1, vuid2;
+ uint16_t cnum1, cnum2, cnum3;
+ uint16_t vuid1, vuid2;
char buf[4];
BOOL ret = True;
struct cli_tree *tree1;
@@ -2798,7 +2798,7 @@ static BOOL run_vuidtest(int dummy)
time_t c_time, a_time, m_time, w_time, m_time2;
BOOL correct = True;
- uint16 orig_vuid;
+ uint16_t orig_vuid;
NTSTATUS result;
printf("starting vuid test\n");
@@ -3404,7 +3404,7 @@ static BOOL run_openattrtest(int dummy)
const char *fname = "\\openattr.file";
int fnum1;
BOOL correct = True;
- uint16 attr;
+ uint16_t attr;
unsigned int i, j, k, l;
int failures = 0;
@@ -3596,7 +3596,7 @@ static void del_fn(file_info *finfo, const char *mask, void *state)
BOOL torture_ioctl_test(int dummy)
{
struct cli_state *cli;
- uint16 device, function;
+ uint16_t device, function;
int fnum;
const char *fname = "\\ioctl.dat";
NTSTATUS status;
diff --git a/source4/torture/torture_util.c b/source4/torture/torture_util.c
index 5b9e36ea71..a9173aade1 100644
--- a/source4/torture/torture_util.c
+++ b/source4/torture/torture_util.c
@@ -304,7 +304,7 @@ BOOL split_username(const char *pair, char **user, char **pass)
/*
set a attribute on a file
*/
-BOOL torture_set_file_attribute(struct cli_tree *tree, const char *fname, uint16 attrib)
+BOOL torture_set_file_attribute(struct cli_tree *tree, const char *fname, uint16_t attrib)
{
union smb_setfileinfo sfinfo;
NTSTATUS status;
diff --git a/source4/utils/net_ads_cldap.c b/source4/utils/net_ads_cldap.c
index fd3ded8e82..d96154a94b 100644
--- a/source4/utils/net_ads_cldap.c
+++ b/source4/utils/net_ads_cldap.c
@@ -48,8 +48,8 @@ struct cldap_netlogon_reply {
struct netlogon_string unk0;
uint32_t version;
- uint16 lmnt_token;
- uint16 lm20_token;
+ uint16_t lmnt_token;
+ uint16_t lm20_token;
};
/*
diff --git a/source4/utils/net_rap.c b/source4/utils/net_rap.c
index 3f6543629b..b78117b7ec 100644
--- a/source4/utils/net_rap.c
+++ b/source4/utils/net_rap.c
@@ -56,15 +56,15 @@ int net_rap_file_usage(int argc, const char **argv)
/***************************************************************************
list info on an open file
***************************************************************************/
-static void file_fn(const char * pPath, const char * pUser, uint16 perms,
- uint16 locks, uint32_t id)
+static void file_fn(const char * pPath, const char * pUser, uint16_t perms,
+ uint16_t locks, uint32_t id)
{
d_printf("%-7.1d %-20.20s 0x%-4.2x %-6.1d %s\n",
id, pUser, perms, locks, pPath);
}
-static void one_file_fn(const char *pPath, const char *pUser, uint16 perms,
- uint16 locks, uint32_t id)
+static void one_file_fn(const char *pPath, const char *pUser, uint16_t perms,
+ uint16_t locks, uint32_t id)
{
d_printf("File ID %d\n"\
"User name %s\n"\
@@ -265,8 +265,8 @@ int net_rap_session_usage(int argc, const char **argv)
return -1;
}
-static void list_sessions_func(char *wsname, char *username, uint16 conns,
- uint16 opens, uint16 users, uint32_t sess_time,
+static void list_sessions_func(char *wsname, char *username, uint16_t conns,
+ uint16_t opens, uint16_t users, uint32_t sess_time,
uint32_t idle_time, uint32_t user_flags, char *clitype)
{
int hrs = idle_time / 3600;
@@ -278,7 +278,7 @@ static void list_sessions_func(char *wsname, char *username, uint16 conns,
}
static void display_session_func(const char *wsname, const char *username,
- uint16 conns, uint16 opens, uint16 users,
+ uint16_t conns, uint16_t opens, uint16_t users,
uint32_t sess_time, uint32_t idle_time,
uint32_t user_flags, const char *clitype)
{
@@ -299,8 +299,8 @@ static void display_session_func(const char *wsname, const char *username,
shrs, smin, ssec, ihrs, imin, isec);
}
-static void display_conns_func(uint16 conn_id, uint16 conn_type, uint16 opens,
- uint16 users, uint32_t conn_time,
+static void display_conns_func(uint16_t conn_id, uint16_t conn_type, uint16_t opens,
+ uint16_t users, uint32_t conn_time,
const char *username, const char *netname)
{
d_printf("%-14.14s %-8.8s %5d\n",
@@ -465,10 +465,10 @@ int net_rap_printq_usage(int argc, const char **argv)
return -1;
}
-static void enum_queue(const char *queuename, uint16 pri, uint16 start,
- uint16 until, const char *sep, const char *pproc,
+static void enum_queue(const char *queuename, uint16_t pri, uint16_t start,
+ uint16_t until, const char *sep, const char *pproc,
const char *dest, const char *qparms,
- const char *qcomment, uint16 status, uint16 jobcount)
+ const char *qcomment, uint16_t status, uint16_t jobcount)
{
d_printf("%-17.17s Queue %5d jobs ",
queuename, jobcount);
@@ -491,9 +491,9 @@ static void enum_queue(const char *queuename, uint16 pri, uint16 start,
}
}
-static void enum_jobs(uint16 jobid, const char *ownername,
+static void enum_jobs(uint16_t jobid, const char *ownername,
const char *notifyname, const char *datatype,
- const char *jparms, uint16 pos, uint16 status,
+ const char *jparms, uint16_t pos, uint16_t status,
const char *jstatus, unsigned int submitted, unsigned int jobsize,
const char *comment)
{
diff --git a/source4/utils/net_rpc.c b/source4/utils/net_rpc.c
index b4b11b4904..ce957f57e0 100644
--- a/source4/utils/net_rpc.c
+++ b/source4/utils/net_rpc.c
@@ -488,7 +488,7 @@ static NTSTATUS rpc_user_add_internals(const DOM_SID *domain_sid, struct cli_sta
POLICY_HND connect_pol, domain_pol, user_pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
const char *acct_name;
- uint16 acb_info;
+ uint16_t acb_info;
uint32_t unknown, user_rid;
if (argc != 1) {
@@ -1536,7 +1536,7 @@ static NTSTATUS rpc_trustdom_add_internals(const DOM_SID *domain_sid, struct cli
POLICY_HND connect_pol, domain_pol, user_pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
char *acct_name;
- uint16 acb_info;
+ uint16_t acb_info;
uint32_t unknown, user_rid;
if (argc != 1) {