r889: convert samba4 to use [u]int16_t instead of [u]int16
authorStefan Metzmacher <metze@samba.org>
Tue, 25 May 2004 17:24:24 +0000 (17:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:56:16 +0000 (12:56 -0500)
metze
(This used to be commit af6f1f8a01bebbecd99bc8c066519e89966e65e3)

97 files changed:
source4/auth/auth_domain.c
source4/auth/auth_sam.c
source4/build/m4/rewrite.m4
source4/client/client.c
source4/client/clitar.c
source4/client/smbmount.c
source4/include/byteorder.h
source4/include/cli_context.h
source4/include/client.h
source4/include/context.h
source4/include/events.h
source4/include/includes.h
source4/include/nameserv.h
source4/include/smb.h
source4/include/smb_interfaces.h
source4/lib/cmdline/popt_common.c
source4/lib/events.c
source4/lib/smbpasswd.c
source4/lib/tdb/common/tdbutil.c
source4/lib/time.c
source4/lib/util_str.c
source4/libads/krb5_setpw.c
source4/libads/ldap.c
source4/libcli/auth/ntlmssp_parse.c
source4/libcli/clidfs.c
source4/libcli/clifile.c
source4/libcli/clilist.c
source4/libcli/clireadwrite.c
source4/libcli/clitrans2.c
source4/libcli/nmblib.c
source4/libcli/raw/clioplock.c
source4/libcli/raw/clisession.c
source4/libcli/raw/clitransport.c
source4/libcli/raw/raweas.c
source4/libcli/raw/rawfile.c
source4/libcli/raw/rawfileinfo.c
source4/libcli/raw/rawfsinfo.c
source4/libcli/raw/rawioctl.c
source4/libcli/raw/rawnotify.c
source4/libcli/raw/rawrequest.c
source4/libcli/raw/rawsearch.c
source4/libcli/raw/rawsetfileinfo.c
source4/libcli/raw/rawtrans.c
source4/libcli/raw/smb_signing.c
source4/libcli/util/smbencrypt.c
source4/libcli/util/smberr.c
source4/librpc/ndr/ndr.c
source4/librpc/ndr/ndr_basic.c
source4/librpc/ndr/ndr_sec.h
source4/librpc/rpc/dcerpc.c
source4/librpc/rpc/dcerpc_smb.c
source4/ntvfs/cifs/vfs_cifs.c
source4/ntvfs/ipc/vfs_ipc.c
source4/ntvfs/reference/ref.h
source4/ntvfs/simple/svfs.h
source4/ntvfs/simple/svfs_util.c
source4/rpc_server/dcerpc_server.c
source4/rpc_server/dcerpc_tcp.c
source4/rpc_server/netlogon/dcerpc_netlogon.c
source4/rpc_server/remote/dcesrv_remote.c
source4/rpc_server/samr/samdb.c
source4/rpc_server/samr/samr_utils.c
source4/smb_server/conn.c
source4/smb_server/negprot.c
source4/smb_server/nttrans.c
source4/smb_server/password.c
source4/smb_server/reply.c
source4/smb_server/request.c
source4/smb_server/search.c
source4/smb_server/service.c
source4/smb_server/signing.c
source4/smb_server/smb_server.c
source4/smb_server/trans2.c
source4/smbd/build_options.c
source4/smbd/process_model.h
source4/smbd/process_single.c
source4/smbd/process_standard.c
source4/smbd/process_thread.c
source4/smbd/server.c
source4/torture/basic/aliases.c
source4/torture/basic/scanner.c
source4/torture/gentest.c
source4/torture/nbench/nbio.c
source4/torture/raw/context.c
source4/torture/raw/open.c
source4/torture/raw/oplock.c
source4/torture/rpc/dfs.c
source4/torture/rpc/lsa.c
source4/torture/rpc/samr.c
source4/torture/rpc/spoolss.c
source4/torture/rpc/winreg.c
source4/torture/rpc/wkssvc.c
source4/torture/torture.c
source4/torture/torture_util.c
source4/utils/net_ads_cldap.c
source4/utils/net_rap.c
source4/utils/net_rpc.c

index a19d0f78464100069bf9d94da73aba54e3589584..3064da72de817cb1ddf6bd132a50c440fcb3f360 100644 (file)
@@ -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)
 {
index 549b5ab36271a0104728fa2cc2cc475faff1e283..141be3ae9aa1704a53ddee29e7add6c6d823c1e7 100644 (file)
@@ -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;
index d99712c12618671f4b065b6d68531f2ec9729de2..ef59d451bb3cb6c78ccf4682098592293c0c68c0 100644 (file)
@@ -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)
index 6599e143ddb6594d957ea4d14c22734557903c6e..1f813a3d180781b3370369f1b49e2cab776ad2b3 100644 (file)
@@ -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;
index 09f10edee7535113ce478aec48e301d065a20364..dce914e9a6e87c15c5ab2808494d32f9af508906 100644 (file)
@@ -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;
index ac1a742ab7293310645a5493b961381f3d6fe41c..6373e556b565b6ee2ad30d5310ca37a9562da94a 100644 (file)
@@ -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)
index a1e161ba6cd7a0e2e874f4fdb9518f7437bdf850..e237b5d762184912db15536091663b4ff0938fbd 100644 (file)
@@ -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 */
index 89f7826789bf20b6079acfabac269db094c6f652..b94d83ffa1db12ca3e58c3a96d43f782df71db5a 100644 (file)
@@ -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 */
index 0750ff4363989a3df9a2a2fc12e3bc405c32d3d7..c9b3f1c7c55a44a88767ebbfba902e7e933d4c8f 100644 (file)
@@ -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];
 };
 
index 47dd67c813e700889f5380c693a68f27029ea927..d2b3d0ffb911265be5dbd45d0af275d5a84f7e83 100644 (file)
@@ -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;
index 7d04a38a051422cbf4003f51ae8083097dcf1f2e..7dde3b2ba0f50bac0bb5b0cc042adc0fb7ba4ccd 100644 (file)
@@ -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;
index e6593754ed133f710da1eb08a340ae1192c33c13..a47ede67965fa9af74f66e472a642e1479e9e30e 100644 (file)
@@ -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)
index 68cc98828014c5950af0e3c0f98eb2e4cccd8235..c8bb670feb2038d4280164adc2af83d3b2f586b1 100644 (file)
@@ -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;
index ea8769681c4a64cec22089cd2e2a88dffe0be8ee..74f71a0304af7607313be500110c9394b9c6ddab 100644 (file)
@@ -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;
 
index 39944f832e07952ba834679f1ee9d7677cf5e186..4e6ba6b13ba4cd7e1589434544e4f872a982824a 100644 (file)
@@ -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;
 };
index 1b8e3bd93e96a3ec688b3a7c7af25ed7309be38b..f659468561d88e3d5a4a538794936d88a25df683 100644 (file)
@@ -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)
index 85a2cee70f6e177e6e3c8958cac3485f29d86f36..50f3f53c942393e70fe33e4b412ec543cfd04eea 100644 (file)
@@ -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) {
index 92ae1ffea26a3d282fb34da7290bb8b3fff544ae..5cb8439878643330c8a7533fe5dd9da1ae3234a5 100644 (file)
@@ -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;
index bdb8621d16c70e1d1a336fd0786dae9fb062e0f8..3fe3ff4b118496b537fc7ef75f5e2096226a4d82 100644 (file)
@@ -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);
index 99738d5a4a00cbfd1d2053139cd3f90a3225d4b8..1f95ef7daf23932c1adc9e8ac76f72d62e67aa1f 100644 (file)
@@ -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;
index 7d6505bab2ba103218f61f128fb016bb7e307b4e..4002c21e9a53b181edd0e66690ef390b73ed0d5d 100644 (file)
@@ -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);
 }
index 9cf15221a8dd2417ca96415c300d4bdccdd5075f..5a736d4dcdb4d8c9fd54d16478369dcf35a428a4 100644 (file)
@@ -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)
index 9161c356923b5b27af0db27cec8af661ed69eeaf..1e109ea5f20604c5678212fb84da0d4b2b44cb79 100644 (file)
@@ -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];
 };
 
index 6d0d644a89af57a4c31335d8d1d24cfe007bbd46..91596e7bdb28fa1f5eb1a425e1cfddf7974e1d61 100644 (file)
@@ -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;
index fc24cccf5410ee795cad9a4bf6ca2105ab3b3dea..ae7a8dc6eb0674064e2694a1523dfe3fed9df8c7 100644 (file)
@@ -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;
index 803e27699f7d1e5e9f06e5cd61689cbc22ea4ae3..a417ae621c4dacf3fd7383940999acadc3b4bb22 100644 (file)
@@ -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;
index ca4b6acdc7858350360cf7c4b4a64b86fb112799..09d536a7102c75fe7a4e34d98302679a75a18a9b 100644 (file)
@@ -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)
index 7b47281e2c2bb6281cf5b174471b75c3a0b6c617..e9c8b80c4f3dd0bb2c87a8c290f11b7a879e0e4f 100644 (file)
@@ -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;
index dc8c2cdfec1d53e5440a4ec23b6ff5103f3bca38..a83660685b8dd285e53012489b88c169c51854e1 100644 (file)
@@ -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)
 {
index a875f4652eb7194b1163ea94372b1e161e69f661..0fe9ee2453bf5d2e59e1c7d103579f7487de8c12 100644 (file)
@@ -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);
     }
index f27bf937ce505f7cdd7f9a030f97888ee3254bc9..eacfd411a015e56f7f22b66b93a080787d62b24a 100644 (file)
@@ -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;
index fe64565597a5582eb301911aba6f21f56aa666ec..b3876f2490f555881d94ef9401e0f20d1f101181 100644 (file)
@@ -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)) {
index 72cad2e9251d1b207995926d74a4bdbb6641e6f0..1e9032459fe739924b7e788bba5aa06fdfa502e9 100644 (file)
@@ -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;
index f265c8281d36241cb1a908d5ff5acacac3c47c10..ae58790baa8a50f89feed3964cfb17e197c97960 100644 (file)
@@ -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;
index d1a665ab14b145bac5c75af61d40a221a4ca80d5..5128ba96cec15fc9ba4c13880e60d68b010bc906 100644 (file)
@@ -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);
 
index 9d715e61049d81026ff36c20eea2ffd2521288cb..f27a0d7281b110d736d45e24ceaaf3e60d9a60d2 100644 (file)
@@ -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");
 
index 85daf654d36b5f91f4a79d0993fa1d3e1ae421de..faf375deb0afb0f99be748dc202e4c3b72cdf823 100644 (file)
@@ -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);
 }
index 2ea2cabb8994d5d16d2b5cb0d918f818a7d506e6..271758c65c5a1cf07af6a2b9a336224f36163927 100644 (file)
@@ -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;
index 1030a61704f96278baae8c43c6cea1dd38997acd..b8efa2fcd61aebf17e504507409b0da5c4d31be4 100644 (file)
@@ -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;
index d8e4d80b390e35b80512903ff51f44904e03c25a..d7085ea3d231a27b9a2aaf628bc6f769be8f25bd 100644 (file)
@@ -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;
index 8b60633fe8db90ee39fc80996b8e16c7841f60ba..bdb57aa6c4f629063e48edc41b100220797bc81e 100644 (file)
@@ -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);
index d8fc78972d4edb14e0a3334a202dc47225ff6fc4..3dcda401f5ffdd0a74cad66114cebac355538845 100644 (file)
@@ -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; 
index d13a1227dd0ccf471ddecd236b75c3c3bbbfc27b..04dbcdc87d0f52ddd733fd46527148745cacfcd1 100644 (file)
@@ -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));
index bb295ee991c6842d817330fb4ef044a940f67359..989b5527aae93acec87f0eb3cd05b4aabbe8666c 100644 (file)
@@ -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);
index b31f62c727c2117a8654217344ab9e219d775408..fa29059585b7bbc1dddc09663bbdfb3f956d1f37 100644 (file)
@@ -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);      
index d6eabcfbce9d4477f37524f2e290ac98185b63a6..577308a7c012c0a796dff1eb7312012a31136555 100644 (file)
@@ -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;
index 3394231726c6e39d2d723b294cc18fb34978e1f7..57a1e517b51ec915c8896cd321b9efc2754269ed 100644 (file)
@@ -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));
index 5b20f118f7538b9726f36ea7cfcbe2bf27314fd3..9bfb312c3a92d0772b313502af5057c840b44d43 100644 (file)
@@ -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;
 
index 1578fde3d7cf6027423fc176d285f51af7e88ba6..d5e7288fe2f1f3eb3054d6f6cdda4f7203bc1f5e 100644 (file)
@@ -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;
index 0e3ceaf757fa763ee8a9c7885d9f0fd3ed3c503e..f0a9649a444b2a08bc3d27e33f96fc7bf0874a86 100644 (file)
@@ -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)
index 070f5548003cd159bb6fcab08b81f17ca54e4044..95e157b700d370940cdaf5cacb6f023e66206bfe 100644 (file)
@@ -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);
index 2a87d59a06ba8a56b5355c46c0bd8073846c7f0c..751280ad6cfcf779276dcaa4b43eff6d7c67b3c7 100644 (file)
@@ -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;
index 635b14b8215f57d6a2c7a48e55c09c4e67fcd30b..9a2589a2eebc7d3b6afab9ef31efddc16e6f9d33 100644 (file)
    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;
 
index 00eab760948516f5475794747a3a4a40b687116b..8ac455642070846f4dc0503d52fae240e8da1211 100644 (file)
@@ -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;
 };
index 6e44d290dace1abef0eb827dfa8a67e6d8cc9d0c..373e6dc126348003d83bbece0bdf2fcc8b7dd90f 100644 (file)
@@ -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;
 };
index 11e70d72c2dac3fbdc3fee33b35b14089eea9b41..ec1c07dff7ebe6e8bd6e7bd0f016c4b3bdc821fd 100644 (file)
@@ -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;
index 350621aa6b0ff20ea7fff9f2b9ef0fe39b6b17b5..4191c42edca7db5a59f37f65dde4c83292e3c8f2 100644 (file)
@@ -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;
index e349de6194a0597c5eb99520e9451f924adaf141..81f1631c19d27b1fb82259e63ca77203abb83dfe 100644 (file)
@@ -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);
index f6b758ad98ed5818d1d74a72216197e2855b429f..c3ec1f48a148e835dcb7007695a70f9052145bb2 100644 (file)
@@ -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;
index 7856908236782c35d5399f2116fba55c7c8ef8b8..37fa89f17501ab5140da038d08d004f4989a4a34 100644 (file)
@@ -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;
index 98374c6c86cc9e6562aa5dc4c732f4f5d0cfb22d..76de3e3c3010a4aed03049216a1150bc9875ada5 100644 (file)
@@ -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);
index 6b8a2ff19a6abce5969e98b51ce2d1e03b31edf1..8297792cc24a8c9f2b16e7ede5c1c1071ab69d12 100644 (file)
@@ -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;
index f8cb145cd80614355b32432335cd5c6ab40e0841..821981a1c8093a0f99142f1230dc17f116156755 100644 (file)
@@ -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;
index 43dc5094df12d399d1acaa8ccd81b5c9b3e8e3d8..42e706a816360e3661d81645f7b31f78e1b0894d 100644 (file)
@@ -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},
index 2847efcef5ac4a89b49625505ec9da3a965a6f1c..299d5b73334e3e56aee4702690b2f93aba8cb579 100644 (file)
 /* 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);
index 5f7431f62384349b0bfc5ebd766e3d095d689722..8b6018575b9512670b2bdafff8051c15be049c64 100644 (file)
@@ -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);
 
index 5680618bd3caba741ee170d6ffd15106e1472ea5..9a4cee2a66268ea6bfe856bc5380c5abea34eb6c 100644 (file)
@@ -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);
index 068e43cd09ff1c882cec04bf197cd0584b037f8c..558d1406007f833a617f90fd6737ac87ef56bd0c 100644 (file)
@@ -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;
index 55d1ae7c332757bbd34e4024b52e5ffbb9f71d13..ae83a2b4a098187ef0b3e3ce2b4703259850b83e 100644 (file)
@@ -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));
 
index 86c42a2ee678c2e24b5f10736b7f6707b9ccafb8..74e8746b0f855eba5d8ab4567dd58efafb2ebdd7 100644 (file)
@@ -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;
index a3779e17cfd78ca0d321ecd3c3d4a6bb424a6688..1440026291f61a4069e219319ed72fed2def29c0 100644 (file)
@@ -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);
index ce50df04c3a80331e70ed27272620839d51b618a..9d971383b536003464c53a0f7d1df2a8f9865f75 100644 (file)
@@ -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;
index 46ab11237430875956ffdda797137b042c742928..e416b63bd401b54d6ba643ef9cf3a4dbab84449a 100644 (file)
@@ -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);
index dea17df2e070c6ee5c1fc21285a93ae469379c2d..bdb4ce35498ab96941f050cb77565f6d1b725318 100644 (file)
@@ -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*));
index 688ae65226228fc9571a36a2cf7a269fe5828534..f56635e62c136759958ed99a8fb927e73f383bde 100644 (file)
@@ -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);
index 0c626e45c63abc030bb11c20aa07cdd94cf9218a..ac0d9fc6f95391c6a1365d1c26aef9ab00352372 100644 (file)
@@ -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;
index 3dfb8d7e2732ee9b1e39de3dbb402276deeff168..bf21e21157fe5076c7b280c3a518962830c8e97d 100644 (file)
@@ -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;
index d37cf8d7ffb9f3098d7dc9e04ccdfb4f36c0be8d..5bf18e34d2220c3e8aed3df29f8a458fc9488f40 100644 (file)
@@ -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;
index 8a06a5b7df44393d6280e2301004171600617b9d..1dc8082b309c3b0f5a8b237f8cb8df3615e1f7cf 100644 (file)
@@ -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);
        }
index c4d6f947009fe45449079188bb6cf3d68f6b3a78..9fe2baa30006976c479e0ade2fde5c7eee8c04c7 100644 (file)
@@ -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;
index 736852820083271f3cdd08d07bcd9ffa7a743a0d..cf513414e8d953337b7bd0d35035442fcbae6687 100644 (file)
@@ -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");
index 1f33257e6afab2f6aacb64f76ef74bc1e752d940..c66f5161d50c81c7214051e0d616d1432bb61af3 100644 (file)
@@ -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; \
index e65815fb807bf0dabf7fb82a28732297217d2c4d..3ce7d66b25e6b4db89d853d3b94e4812b4668324 100644 (file)
@@ -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);
index 91763da86fd6d0c651bb5bc87c0361dec8f4f5a5..29aa915b5dbb6e84ff8eee3aff4c122462fc1072 100644 (file)
@@ -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");
 
index 88cadf7b66f4517236f3632448d29747d9923539..8a4e09374bab8ae7ac6c8896583722e59069ef59 100644 (file)
@@ -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[] = {
index 403d19113d149c38ff52c1df7779179dcbfbbf67..c610f9a78d90a2d1c54593e16f53a8b21e5c5003 100644 (file)
@@ -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);
index 3aa17b6ecce31deca8dc2a76a463a0e3f868b080..30c352680aeb4673c8daaad60a6b003d9a80088a 100644 (file)
@@ -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])) {
index f3e1c04d29fa8cfc3dc9b45d77635ec90f452259..306197dcf25af72879cedf91dbcbda26339ef59b 100644 (file)
@@ -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");
 
index 4b65cc75f9d04a02f5e6afd5f7970183ba0d14a0..cce650983ae372024434125dd320fba0f92839e0 100644 (file)
@@ -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;
 
index 6e6d325ab0f2a41963681231a4fa6b946717b08c..74860cd369e25e194929a454989a8c06910e8f8c 100644 (file)
@@ -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;
 
index 7fa93aa0c91cbc5d3fe05c6a1f8eb4840e9ee143..3a1d7be68b28926db47867ebb4e5b6c30b4f6402 100644 (file)
@@ -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;
        
index b1dc2edfcfddd7c8af948b4c846bf9a264700bac..4768163d5c857fca599c4103bbce3b0db4f1a71a 100644 (file)
@@ -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;
 
index d5e7fbd3b2d7d7be48c3010a4e8755ea75d8b120..28e43b2fa84352d3a72c47035963813ae9baea1b 100644 (file)
@@ -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;
index 5b9e36ea71344b734d9c5f9bad6aa8d3b7ca10db..a9173aade1938b0323ffc73dca7071c43e0685e8 100644 (file)
@@ -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;
index fd3ded8e82c6b3518de8112f263cf0f6e4202790..d96154a94b59d727850632be73e51f8bb3cb99ad 100644 (file)
@@ -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;
 };
 
 /*
index 3f6543629bc7aef0789e5458179cff0c692ad1e0..b78117b7ecc15cf212c0e1e6c3ec71c19a3e9a20 100644 (file)
@@ -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)
 {
index b4b11b49043bd91aa993f5e30752c893309e1001..ce957f57e069807ca3fa670fb01a01f4d135e476 100644 (file)
@@ -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) {