summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-05-25 16:24:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:15 -0500
commitf9d8f8843dc0ab8c9d59abde7222e0f118b86b5d (patch)
tree8c6360be102dee63e893526ac7128e9cd52d362c /source4/librpc
parent59e739a2f9f4b10f5f6184ef397f034d09959f26 (diff)
downloadsamba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.tar.gz
samba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.tar.bz2
samba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.zip
r884: convert samba4 to use [u]int32_t instead of [u]int32
metze (This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/idl/mgmt.idl2
-rw-r--r--source4/librpc/ndr/libndr.h34
-rw-r--r--source4/librpc/ndr/ndr.c40
-rw-r--r--source4/librpc/ndr/ndr_basic.c70
-rw-r--r--source4/librpc/ndr/ndr_sec.c10
-rw-r--r--source4/librpc/ndr/ndr_sec.h4
-rw-r--r--source4/librpc/ndr/ndr_spoolss_buf.c8
-rw-r--r--source4/librpc/rpc/dcerpc.c6
-rw-r--r--source4/librpc/rpc/dcerpc.h16
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c2
-rw-r--r--source4/librpc/rpc/dcerpc_smb.c6
-rw-r--r--source4/librpc/rpc/dcerpc_tcp.c6
-rw-r--r--source4/librpc/rpc/dcerpc_util.c20
13 files changed, 112 insertions, 112 deletions
diff --git a/source4/librpc/idl/mgmt.idl b/source4/librpc/idl/mgmt.idl
index 7e691d3c31..0756e36010 100644
--- a/source4/librpc/idl/mgmt.idl
+++ b/source4/librpc/idl/mgmt.idl
@@ -16,7 +16,7 @@ interface mgmt
} dcerpc_syntax_id_p;
typedef struct {
- unsigned32 count;
+ uint32 count;
[size_is(count)] dcerpc_syntax_id_p if_id[*];
} rpc_if_id_vector_t;
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index 97f36b78d0..9650c1aca6 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -26,7 +26,7 @@
/* offset lists are used to allow a push/pull function to find the
start of an encapsulating structure */
struct ndr_ofs_list {
- uint32 offset;
+ uint32_t offset;
struct ndr_ofs_list *next;
};
@@ -40,10 +40,10 @@ struct ndr_ofs_list {
particular transport
*/
struct ndr_pull {
- uint32 flags; /* LIBNDR_FLAG_* */
+ uint32_t flags; /* LIBNDR_FLAG_* */
char *data;
- uint32 data_size;
- uint32 offset;
+ uint32_t data_size;
+ uint32_t offset;
TALLOC_CTX *mem_ctx;
/* this points at a list of offsets to the structures being processed.
@@ -52,21 +52,21 @@ struct ndr_pull {
};
struct ndr_pull_save {
- uint32 data_size;
- uint32 offset;
+ uint32_t data_size;
+ uint32_t offset;
struct ndr_pull_save *next;
};
/* structure passed to functions that generate NDR formatted data */
struct ndr_push {
- uint32 flags; /* LIBNDR_FLAG_* */
+ uint32_t flags; /* LIBNDR_FLAG_* */
char *data;
- uint32 alloc_size;
- uint32 offset;
+ uint32_t alloc_size;
+ uint32_t offset;
TALLOC_CTX *mem_ctx;
/* this is used to ensure we generate unique reference IDs */
- uint32 ptr_count;
+ uint32_t ptr_count;
/* this points at a list of offsets to the structures being processed.
The first element in the list is the current structure */
@@ -77,16 +77,16 @@ struct ndr_push {
};
struct ndr_push_save {
- uint32 offset;
+ uint32_t offset;
struct ndr_push_save *next;
};
/* structure passed to functions that print IDL structures */
struct ndr_print {
- uint32 flags; /* LIBNDR_FLAG_* */
+ uint32_t flags; /* LIBNDR_FLAG_* */
TALLOC_CTX *mem_ctx;
- uint32 depth;
+ uint32_t depth;
void (*print)(struct ndr_print *, const char *, ...);
void *private;
};
@@ -176,7 +176,7 @@ enum ndr_err_code {
#define NDR_PUSH_ALIGN(ndr, n) do { \
if (!(ndr->flags & LIBNDR_FLAG_NOALIGN)) { \
- uint32 _pad = ((ndr->offset + (n-1)) & ~(n-1)) - ndr->offset; \
+ uint32_t _pad = ((ndr->offset + (n-1)) & ~(n-1)) - ndr->offset; \
while (_pad--) NDR_CHECK(ndr_push_uint8(ndr, 0)); \
} \
} while(0)
@@ -233,11 +233,11 @@ typedef NTSTATUS (*ndr_pull_fn_t)(struct ndr_pull *, void *);
typedef NTSTATUS (*ndr_push_flags_fn_t)(struct ndr_push *, int ndr_flags, void *);
typedef NTSTATUS (*ndr_push_const_fn_t)(struct ndr_push *, int ndr_flags, const void *);
typedef NTSTATUS (*ndr_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void *);
-typedef NTSTATUS (*ndr_push_union_fn_t)(struct ndr_push *, int ndr_flags, uint32, void *);
-typedef NTSTATUS (*ndr_pull_union_fn_t)(struct ndr_pull *, int ndr_flags, uint32, void *);
+typedef NTSTATUS (*ndr_push_union_fn_t)(struct ndr_push *, int ndr_flags, uint32_t, void *);
+typedef NTSTATUS (*ndr_pull_union_fn_t)(struct ndr_pull *, int ndr_flags, uint32_t, void *);
typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, void *);
typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, void *);
-typedef void (*ndr_print_union_fn_t)(struct ndr_print *, const char *, uint32, void *);
+typedef void (*ndr_print_union_fn_t)(struct ndr_print *, const char *, uint32_t, void *);
#include "librpc/ndr/ndr_basic.h"
#include "librpc/ndr/ndr_sec.h"
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index 205607e0cd..3394231726 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -34,7 +34,7 @@
/*
work out the number of bytes needed to align on a n byte boundary
*/
-size_t ndr_align_size(uint32 offset, size_t n)
+size_t ndr_align_size(uint32_t offset, size_t n)
{
if ((offset & (n-1)) == 0) return 0;
return n - (offset & (n-1));
@@ -63,7 +63,7 @@ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
create an ndr sub-context based on an existing context. The new context starts
at the current offset, with the given size limit
*/
-NTSTATUS ndr_pull_subcontext(struct ndr_pull *ndr, struct ndr_pull *ndr2, uint32 size)
+NTSTATUS ndr_pull_subcontext(struct ndr_pull *ndr, struct ndr_pull *ndr2, uint32_t size)
{
NDR_PULL_NEED_BYTES(ndr, size);
*ndr2 = *ndr;
@@ -78,7 +78,7 @@ NTSTATUS ndr_pull_subcontext(struct ndr_pull *ndr, struct ndr_pull *ndr2, uint32
/*
advance by 'size' bytes
*/
-NTSTATUS ndr_pull_advance(struct ndr_pull *ndr, uint32 size)
+NTSTATUS ndr_pull_advance(struct ndr_pull *ndr, uint32_t size)
{
ndr->offset += size;
if (ndr->offset > ndr->data_size) {
@@ -92,7 +92,7 @@ NTSTATUS ndr_pull_advance(struct ndr_pull *ndr, uint32 size)
/*
set the parse offset to 'ofs'
*/
-NTSTATUS ndr_pull_set_offset(struct ndr_pull *ndr, uint32 ofs)
+NTSTATUS ndr_pull_set_offset(struct ndr_pull *ndr, uint32_t ofs)
{
ndr->offset = ofs;
if (ndr->offset > ndr->data_size) {
@@ -177,7 +177,7 @@ DATA_BLOB ndr_push_blob(struct ndr_push *ndr)
/*
expand the available space in the buffer to 'size'
*/
-NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32 size)
+NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t size)
{
if (ndr->alloc_size >= size) {
return NT_STATUS_OK;
@@ -199,7 +199,7 @@ NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32 size)
/*
set the push offset to 'ofs'
*/
-NTSTATUS ndr_push_set_offset(struct ndr_push *ndr, uint32 ofs)
+NTSTATUS ndr_push_set_offset(struct ndr_push *ndr, uint32_t ofs)
{
NDR_CHECK(ndr_push_expand(ndr, ofs));
ndr->offset = ofs;
@@ -210,7 +210,7 @@ NTSTATUS ndr_push_set_offset(struct ndr_push *ndr, uint32 ofs)
push a generic array
*/
NTSTATUS ndr_push_array(struct ndr_push *ndr, int ndr_flags, void *base,
- size_t elsize, uint32 count,
+ size_t elsize, uint32_t count,
NTSTATUS (*push_fn)(struct ndr_push *, int, void *))
{
int i;
@@ -235,7 +235,7 @@ done:
pull a constant sized array
*/
NTSTATUS ndr_pull_array(struct ndr_pull *ndr, int ndr_flags, void *base,
- size_t elsize, uint32 count,
+ size_t elsize, uint32_t count,
NTSTATUS (*pull_fn)(struct ndr_pull *, int, void *))
{
int i;
@@ -262,7 +262,7 @@ done:
print a generic array
*/
void ndr_print_array(struct ndr_print *ndr, const char *name, void *base,
- size_t elsize, uint32 count,
+ size_t elsize, uint32_t count,
void (*print_fn)(struct ndr_print *, const char *, void *))
{
int i;
@@ -322,9 +322,9 @@ void ndr_print_debug(void (*fn)(struct ndr_print *, const char *, void *),
/*
a useful helper function for printing idl unions via DEBUG()
*/
-void ndr_print_union_debug(void (*fn)(struct ndr_print *, const char *, uint32, void *),
+void ndr_print_union_debug(void (*fn)(struct ndr_print *, const char *, uint32_t, void *),
const char *name,
- uint32 level,
+ uint32_t level,
void *ptr)
{
struct ndr_print ndr;
@@ -419,7 +419,7 @@ static NTSTATUS ndr_pull_subcontext_header(struct ndr_pull *ndr,
{
switch (sub_size) {
case 0: {
- uint32 size = ndr->data_size - ndr->offset;
+ uint32_t size = ndr->data_size - ndr->offset;
if (size == 0) return NT_STATUS_OK;
NDR_CHECK(ndr_pull_subcontext(ndr, ndr2, size));
break;
@@ -434,7 +434,7 @@ static NTSTATUS ndr_pull_subcontext_header(struct ndr_pull *ndr,
}
case 4: {
- uint32 size;
+ uint32_t size;
NDR_CHECK(ndr_pull_uint32(ndr, &size));
if (size == 0) return NT_STATUS_OK;
NDR_CHECK(ndr_pull_subcontext(ndr, ndr2, size));
@@ -488,9 +488,9 @@ NTSTATUS ndr_pull_subcontext_flags_fn(struct ndr_pull *ndr,
NTSTATUS ndr_pull_subcontext_union_fn(struct ndr_pull *ndr,
size_t sub_size,
- uint32 level,
+ uint32_t level,
void *base,
- NTSTATUS (*fn)(struct ndr_pull *, int , uint32 , void *))
+ NTSTATUS (*fn)(struct ndr_pull *, int , uint32_t , void *))
{
struct ndr_pull ndr2;
@@ -577,9 +577,9 @@ NTSTATUS ndr_push_subcontext_flags_fn(struct ndr_push *ndr,
*/
NTSTATUS ndr_push_subcontext_union_fn(struct ndr_push *ndr,
size_t sub_size,
- uint32 level,
+ uint32_t level,
void *base,
- NTSTATUS (*fn)(struct ndr_push *, int, uint32, void *))
+ NTSTATUS (*fn)(struct ndr_push *, int, uint32_t, void *))
{
struct ndr_push *ndr2;
@@ -644,7 +644,7 @@ NTSTATUS ndr_pull_relative(struct ndr_pull *ndr, const void **buf, size_t size,
NTSTATUS (*fn)(struct ndr_pull *, int ndr_flags, void *))
{
struct ndr_pull ndr2;
- uint32 ofs;
+ uint32_t ofs;
struct ndr_pull_save save;
void *p;
@@ -719,8 +719,8 @@ NTSTATUS ndr_push_relative(struct ndr_push *ndr, int ndr_flags, const void *p,
/*
pull a union from a blob using NDR
*/
-NTSTATUS ndr_pull_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, uint32 level, void *p,
- NTSTATUS (*fn)(struct ndr_pull *, int ndr_flags, uint32, void *))
+NTSTATUS ndr_pull_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, uint32_t level, void *p,
+ NTSTATUS (*fn)(struct ndr_pull *, int ndr_flags, uint32_t, void *))
{
struct ndr_pull *ndr;
ndr = ndr_pull_init_blob(blob, mem_ctx);
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c
index f4cdf44dc0..5b20f118f7 100644
--- a/source4/librpc/ndr/ndr_basic.c
+++ b/source4/librpc/ndr/ndr_basic.c
@@ -54,9 +54,9 @@ NTSTATUS ndr_pull_uint16(struct ndr_pull *ndr, uint16 *v)
/*
- parse a uint32
+ parse a uint32_t
*/
-NTSTATUS ndr_pull_uint32(struct ndr_pull *ndr, uint32 *v)
+NTSTATUS ndr_pull_uint32(struct ndr_pull *ndr, uint32_t *v)
{
NDR_PULL_ALIGN(ndr, 4);
NDR_PULL_NEED_BYTES(ndr, 4);
@@ -100,7 +100,7 @@ NTSTATUS ndr_pull_HYPER_T(struct ndr_pull *ndr, HYPER_T *v)
*/
NTSTATUS ndr_pull_NTSTATUS(struct ndr_pull *ndr, NTSTATUS *status)
{
- uint32 v;
+ uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, &v));
*status = NT_STATUS(v);
return NT_STATUS_OK;
@@ -124,7 +124,7 @@ void ndr_print_NTSTATUS(struct ndr_print *ndr, const char *name, NTSTATUS *r)
*/
NTSTATUS ndr_pull_WERROR(struct ndr_pull *ndr, WERROR *status)
{
- uint32 v;
+ uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, &v));
*status = W_ERROR(v);
return NT_STATUS_OK;
@@ -146,7 +146,7 @@ void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR *r)
/*
parse a set of bytes
*/
-NTSTATUS ndr_pull_bytes(struct ndr_pull *ndr, char *data, uint32 n)
+NTSTATUS ndr_pull_bytes(struct ndr_pull *ndr, char *data, uint32_t n)
{
NDR_PULL_NEED_BYTES(ndr, n);
memcpy(data, ndr->data + ndr->offset, n);
@@ -157,7 +157,7 @@ NTSTATUS ndr_pull_bytes(struct ndr_pull *ndr, char *data, uint32 n)
/*
pull an array of uint8
*/
-NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, char *data, uint32 n)
+NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, char *data, uint32_t n)
{
if (!(ndr_flags & NDR_SCALARS)) {
return NT_STATUS_OK;
@@ -169,9 +169,9 @@ 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 n)
+NTSTATUS ndr_pull_array_uint16(struct ndr_pull *ndr, int ndr_flags, uint16 *data, uint32_t n)
{
- uint32 i;
+ uint32_t i;
if (!(ndr_flags & NDR_SCALARS)) {
return NT_STATUS_OK;
}
@@ -182,11 +182,11 @@ NTSTATUS ndr_pull_array_uint16(struct ndr_pull *ndr, int ndr_flags, uint16 *data
}
/*
- pull a const array of uint32
+ pull a const array of uint32_t
*/
-NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, int ndr_flags, uint32 *data, uint32 n)
+NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *data, uint32_t n)
{
- uint32 i;
+ uint32_t i;
if (!(ndr_flags & NDR_SCALARS)) {
return NT_STATUS_OK;
}
@@ -220,9 +220,9 @@ NTSTATUS ndr_push_uint16(struct ndr_push *ndr, uint16 v)
}
/*
- push a uint32
+ push a uint32_t
*/
-NTSTATUS ndr_push_uint32(struct ndr_push *ndr, uint32 v)
+NTSTATUS ndr_push_uint32(struct ndr_push *ndr, uint32_t v)
{
NDR_PUSH_ALIGN(ndr, 4);
NDR_PUSH_NEED_BYTES(ndr, 4);
@@ -276,7 +276,7 @@ NTSTATUS ndr_pull_align(struct ndr_pull *ndr, size_t size)
/*
push some bytes
*/
-NTSTATUS ndr_push_bytes(struct ndr_push *ndr, const char *data, uint32 n)
+NTSTATUS ndr_push_bytes(struct ndr_push *ndr, const char *data, uint32_t n)
{
NDR_PUSH_NEED_BYTES(ndr, n);
memcpy(ndr->data + ndr->offset, data, n);
@@ -287,7 +287,7 @@ NTSTATUS ndr_push_bytes(struct ndr_push *ndr, const char *data, uint32 n)
/*
push some zero bytes
*/
-NTSTATUS ndr_push_zero(struct ndr_push *ndr, uint32 n)
+NTSTATUS ndr_push_zero(struct ndr_push *ndr, uint32_t n)
{
NDR_PUSH_NEED_BYTES(ndr, n);
memset(ndr->data + ndr->offset, 0, n);
@@ -298,7 +298,7 @@ NTSTATUS ndr_push_zero(struct ndr_push *ndr, uint32 n)
/*
push an array of uint8
*/
-NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const char *data, uint32 n)
+NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const char *data, uint32_t n)
{
if (!(ndr_flags & NDR_SCALARS)) {
return NT_STATUS_OK;
@@ -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 n)
+NTSTATUS ndr_push_array_uint16(struct ndr_push *ndr, int ndr_flags, const uint16 *data, uint32_t n)
{
int i;
if (!(ndr_flags & NDR_SCALARS)) {
@@ -322,9 +322,9 @@ NTSTATUS ndr_push_array_uint16(struct ndr_push *ndr, int ndr_flags, const uint16
}
/*
- push an array of uint32
+ push an array of uint32_t
*/
-NTSTATUS ndr_push_array_uint32(struct ndr_push *ndr, int ndr_flags, const uint32 *data, uint32 n)
+NTSTATUS ndr_push_array_uint32(struct ndr_push *ndr, int ndr_flags, const uint32_t *data, uint32_t n)
{
int i;
if (!(ndr_flags & NDR_SCALARS)) {
@@ -357,7 +357,7 @@ void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save)
*/
NTSTATUS ndr_push_ptr(struct ndr_push *ndr, const void *p)
{
- uint32 ptr = 0;
+ uint32_t ptr = 0;
if (p) {
/* we do this to ensure that we generate unique ref ids,
which means we can handle the case where a MS programmer
@@ -375,7 +375,7 @@ NTSTATUS ndr_push_ptr(struct ndr_push *ndr, const void *p)
NTSTATUS ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, const char **s)
{
char *as=NULL;
- uint32 len1, ofs, len2;
+ uint32_t len1, ofs, len2;
uint16 len3;
int ret;
int chset = CH_UCS2;
@@ -666,7 +666,7 @@ NTSTATUS ndr_push_time_t(struct ndr_push *ndr, time_t t)
*/
NTSTATUS ndr_pull_time_t(struct ndr_pull *ndr, time_t *t)
{
- uint32 tt;
+ uint32_t tt;
NDR_CHECK(ndr_pull_uint32(ndr, &tt));
*t = tt;
return NT_STATUS_OK;
@@ -688,27 +688,27 @@ void ndr_print_uint16(struct ndr_print *ndr, const char *name, uint16 v)
ndr->print(ndr, "%-25s: 0x%04x (%u)", name, v, v);
}
-void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32 v)
+void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t v)
{
ndr->print(ndr, "%-25s: 0x%08x (%u)", name, v, v);
}
void ndr_print_uint64(struct ndr_print *ndr, const char *name, uint64 v)
{
- ndr->print(ndr, "%-25s: 0x%08x%08x", name, (uint32)(v >> 32), (uint32)(v & 0xFFFFFFFF));
+ ndr->print(ndr, "%-25s: 0x%08x%08x", name, (uint32_t)(v >> 32), (uint32_t)(v & 0xFFFFFFFF));
}
void ndr_print_int64(struct ndr_print *ndr, const char *name, int64 v)
{
ndr->print(ndr, "%-25s: 0x%08x%08x (%lld)", name,
- (uint32)(v >> 32),
- (uint32)(v & 0xFFFFFFFF),
+ (uint32_t)(v >> 32),
+ (uint32_t)(v & 0xFFFFFFFF),
v);
}
void ndr_print_HYPER_T(struct ndr_print *ndr, const char *name, HYPER_T v)
{
- ndr->print(ndr, "%-25s: 0x%08x%08x", name, (uint32)(v >> 32), (uint32)(v & 0xFFFFFFFF));
+ ndr->print(ndr, "%-25s: 0x%08x%08x", name, (uint32_t)(v >> 32), (uint32_t)(v & 0xFFFFFFFF));
}
void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p)
@@ -754,7 +754,7 @@ void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16 level)
}
void ndr_print_array_uint32(struct ndr_print *ndr, const char *name,
- const uint32 *data, uint32 count)
+ const uint32_t *data, uint32_t count)
{
int i;
@@ -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 count)
+ const uint16 *data, uint32_t count)
{
int i;
@@ -790,7 +790,7 @@ void ndr_print_array_uint16(struct ndr_print *ndr, const char *name,
}
void ndr_print_array_uint8(struct ndr_print *ndr, const char *name,
- const uint8 *data, uint32 count)
+ const uint8 *data, uint32_t count)
{
int i;
@@ -822,10 +822,10 @@ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name,
*/
NTSTATUS GUID_from_string(const char *s, struct GUID *guid)
{
- uint32 time_low;
- uint32 time_mid, time_hi_and_version;
- uint32 clock_seq[2];
- uint32 node[6];
+ uint32_t time_low;
+ uint32_t time_mid, time_hi_and_version;
+ uint32_t clock_seq[2];
+ uint32_t node[6];
int i;
if (11 != sscanf(s, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
@@ -904,7 +904,7 @@ NTSTATUS ndr_push_DATA_BLOB(struct ndr_push *ndr, DATA_BLOB blob)
*/
NTSTATUS ndr_pull_DATA_BLOB(struct ndr_pull *ndr, DATA_BLOB *blob)
{
- uint32 length;
+ uint32_t length;
if (ndr->flags & LIBNDR_ALIGN_FLAGS) {
if (ndr->flags & LIBNDR_FLAG_ALIGN2) {
diff --git a/source4/librpc/ndr/ndr_sec.c b/source4/librpc/ndr/ndr_sec.c
index 8c1c0c5597..0c3982f390 100644
--- a/source4/librpc/ndr/ndr_sec.c
+++ b/source4/librpc/ndr/ndr_sec.c
@@ -29,7 +29,7 @@
*/
NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid)
{
- uint32 num_auths;
+ uint32_t num_auths;
if (!(ndr_flags & NDR_SCALARS)) {
return NT_STATUS_OK;
}
@@ -56,7 +56,7 @@ NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, struct dom_sid *
char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
{
int i, ofs, maxlen;
- uint32 ia;
+ uint32_t ia;
char *ret;
if (!sid) {
@@ -110,7 +110,7 @@ size_t ndr_size_dom_sid(struct dom_sid *sid)
*/
struct dom_sid *dom_sid_add_rid(TALLOC_CTX *mem_ctx,
const struct dom_sid *domain_sid,
- uint32 rid)
+ uint32_t rid)
{
struct dom_sid *sid;
@@ -118,11 +118,11 @@ struct dom_sid *dom_sid_add_rid(TALLOC_CTX *mem_ctx,
if (!sid) return NULL;
*sid = *domain_sid;
- sid->sub_auths = talloc_array_p(mem_ctx, uint32, sid->num_auths+1);
+ sid->sub_auths = talloc_array_p(mem_ctx, uint32_t, sid->num_auths+1);
if (!sid->sub_auths) {
return NULL;
}
- memcpy(sid->sub_auths, domain_sid->sub_auths, sid->num_auths*sizeof(uint32));
+ memcpy(sid->sub_auths, domain_sid->sub_auths, sid->num_auths*sizeof(uint32_t));
sid->sub_auths[sid->num_auths] = rid;
sid->num_auths++;
return sid;
diff --git a/source4/librpc/ndr/ndr_sec.h b/source4/librpc/ndr/ndr_sec.h
index 728d46535d..1578fde3d7 100644
--- a/source4/librpc/ndr/ndr_sec.h
+++ b/source4/librpc/ndr/ndr_sec.h
@@ -39,7 +39,7 @@
struct smb_query_secdesc {
struct {
uint16 fnum;
- uint32 secinfo_flags;
+ uint32_t secinfo_flags;
} in;
struct {
struct security_descriptor *sd;
@@ -50,7 +50,7 @@ struct smb_query_secdesc {
struct smb_set_secdesc {
struct {
uint16 fnum;
- uint32 secinfo_flags;
+ uint32_t secinfo_flags;
struct security_descriptor *sd;
} in;
};
diff --git a/source4/librpc/ndr/ndr_spoolss_buf.c b/source4/librpc/ndr/ndr_spoolss_buf.c
index d8a3f6a07e..aa91a27ab7 100644
--- a/source4/librpc/ndr/ndr_spoolss_buf.c
+++ b/source4/librpc/ndr/ndr_spoolss_buf.c
@@ -25,7 +25,7 @@
#include "includes.h"
NTSTATUS pull_spoolss_PrinterInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
- uint32 level, uint32 count,
+ uint32_t level, uint32_t count,
union spoolss_PrinterInfo **info)
{
int i;
@@ -42,7 +42,7 @@ NTSTATUS pull_spoolss_PrinterInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
}
NTSTATUS pull_spoolss_FormInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
- uint32 level, uint32 count,
+ uint32_t level, uint32_t count,
union spoolss_FormInfo **info)
{
int i;
@@ -59,7 +59,7 @@ NTSTATUS pull_spoolss_FormInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
}
NTSTATUS pull_spoolss_JobInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
- uint32 level, uint32 count,
+ uint32_t level, uint32_t count,
union spoolss_JobInfo **info)
{
int i;
@@ -76,7 +76,7 @@ NTSTATUS pull_spoolss_JobInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
}
NTSTATUS pull_spoolss_DriverInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
- uint32 level, uint32 count,
+ uint32_t level, uint32_t count,
union spoolss_DriverInfo **info)
{
int i;
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index e4c5174af3..0e3ceaf757 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -469,7 +469,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p,
struct dcerpc_packet pkt;
NTSTATUS status;
DATA_BLOB blob, payload;
- uint32 remaining, chunk_size;
+ uint32_t remaining, chunk_size;
/* allow the application to tell when a fault has happened */
p->last_fault_code = 0;
@@ -560,7 +560,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p,
/* continue receiving fragments */
while (!(pkt.pfc_flags & DCERPC_PFC_FLAG_LAST)) {
- uint32 length;
+ uint32_t length;
status = p->transport.secondary_request(p, mem_ctx, &blob);
if (!NT_STATUS_IS_OK(status)) {
@@ -764,7 +764,7 @@ static NTSTATUS dcerpc_ndr_validate_out(TALLOC_CTX *mem_ctx,
standard format
*/
NTSTATUS dcerpc_ndr_request(struct dcerpc_pipe *p,
- uint32 opnum,
+ uint32_t opnum,
TALLOC_CTX *mem_ctx,
NTSTATUS (*ndr_push)(struct ndr_push *, int, void *),
NTSTATUS (*ndr_pull)(struct ndr_pull *, int, void *),
diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h
index 25c2029f34..6afde2deb0 100644
--- a/source4/librpc/rpc/dcerpc.h
+++ b/source4/librpc/rpc/dcerpc.h
@@ -47,9 +47,9 @@ struct dcerpc_security {
struct dcerpc_pipe {
TALLOC_CTX *mem_ctx;
int reference_count;
- uint32 call_id;
- uint32 srv_max_xmit_frag;
- uint32 srv_max_recv_frag;
+ uint32_t call_id;
+ uint32_t srv_max_xmit_frag;
+ uint32_t srv_max_recv_frag;
unsigned flags;
struct dcerpc_security *security_state;
struct dcerpc_auth *auth_info;
@@ -67,7 +67,7 @@ struct dcerpc_pipe {
} transport;
/* the last fault code from a DCERPC fault */
- uint32 last_fault_code;
+ uint32_t last_fault_code;
};
/* dcerpc pipe flags */
@@ -99,15 +99,15 @@ struct dcerpc_interface_call {
};
struct dcerpc_endpoint_list {
- uint32 count;
+ uint32_t count;
const char * const *names;
};
struct dcerpc_interface_table {
const char *name;
const char *uuid;
- uint32 if_version;
- uint32 num_calls;
+ uint32_t if_version;
+ uint32_t num_calls;
const struct dcerpc_interface_call *calls;
const struct dcerpc_endpoint_list *endpoints;
};
@@ -118,5 +118,5 @@ struct dcerpc_binding {
enum dcerpc_transport_t transport;
const char *host;
const char **options;
- uint32 flags;
+ uint32_t flags;
};
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index f368ce30b3..f511ecb819 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -90,7 +90,7 @@ NTSTATUS dcerpc_schannel_key(struct dcerpc_pipe *p,
uint8 mach_pwd[16];
struct creds_CredentialState creds;
const char *workgroup, *workstation;
- uint32 negotiate_flags = 0;
+ uint32_t negotiate_flags = 0;
workstation = username;
workgroup = domain;
diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c
index 3d646944ac..070f554800 100644
--- a/source4/librpc/rpc/dcerpc_smb.c
+++ b/source4/librpc/rpc/dcerpc_smb.c
@@ -105,7 +105,7 @@ static NTSTATUS dcerpc_raw_recv(struct dcerpc_pipe *p,
/* the rest of the data is available via SMBreadX */
while (frag_length > payload.length) {
- uint32 n;
+ uint32_t n;
union smb_read io;
n = frag_length - payload.length;
@@ -169,8 +169,8 @@ static NTSTATUS smb_secondary_request(struct dcerpc_pipe *p,
{
struct smb_private *smb = p->transport.private;
union smb_read io;
- uint32 n = 0x2000;
- uint32 frag_length;
+ uint32_t n = 0x2000;
+ uint32_t frag_length;
NTSTATUS status;
*blob = data_blob_talloc(mem_ctx, NULL, n);
diff --git a/source4/librpc/rpc/dcerpc_tcp.c b/source4/librpc/rpc/dcerpc_tcp.c
index 1b016b8957..05c700ea89 100644
--- a/source4/librpc/rpc/dcerpc_tcp.c
+++ b/source4/librpc/rpc/dcerpc_tcp.c
@@ -26,7 +26,7 @@
struct tcp_private {
int fd;
char *server_name;
- uint32 port;
+ uint32_t port;
};
@@ -47,7 +47,7 @@ static NTSTATUS tcp_raw_recv(struct dcerpc_pipe *p,
{
struct tcp_private *tcp = p->transport.private;
ssize_t ret;
- uint32 frag_length;
+ uint32_t frag_length;
DATA_BLOB blob1;
blob1 = data_blob_talloc(mem_ctx, NULL, 16);
@@ -171,7 +171,7 @@ static const char *tcp_peer_name(struct dcerpc_pipe *p)
*/
NTSTATUS dcerpc_pipe_open_tcp(struct dcerpc_pipe **p,
const char *server,
- uint32 port)
+ uint32_t port)
{
struct tcp_private *tcp;
int fd;
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index dce325d7e1..5022449182 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -53,7 +53,7 @@ size_t ndr_size_epm_towers(struct epm_towers *towers)
*/
NTSTATUS dcerpc_epm_map_tcp_port(const char *server,
const char *uuid, unsigned version,
- uint32 *port)
+ uint32_t *port)
{
struct dcerpc_pipe *p;
NTSTATUS status;
@@ -160,7 +160,7 @@ NTSTATUS dcerpc_epm_map_tcp_port(const char *server,
/*
find the pipe name for a local IDL interface
*/
-const char *idl_pipe_name(const char *uuid, uint32 if_version)
+const char *idl_pipe_name(const char *uuid, uint32_t if_version)
{
int i;
for (i=0;dcerpc_pipes[i];i++) {
@@ -175,7 +175,7 @@ const char *idl_pipe_name(const char *uuid, uint32 if_version)
/*
find the number of calls defined by local IDL
*/
-int idl_num_calls(const char *uuid, uint32 if_version)
+int idl_num_calls(const char *uuid, uint32_t if_version)
{
int i;
for (i=0;dcerpc_pipes[i];i++) {
@@ -271,7 +271,7 @@ static const struct {
static const struct {
const char *name;
- uint32 flag;
+ uint32_t flag;
} ncacn_options[] = {
{"sign", DCERPC_SIGN},
{"seal", DCERPC_SEAL},
@@ -429,7 +429,7 @@ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_
static NTSTATUS dcerpc_pipe_connect_ncacn_np(struct dcerpc_pipe **p,
struct dcerpc_binding *binding,
const char *pipe_uuid,
- uint32 pipe_version,
+ uint32_t pipe_version,
const char *domain,
const char *username,
const char *password)
@@ -514,13 +514,13 @@ done:
static NTSTATUS dcerpc_pipe_connect_ncacn_ip_tcp(struct dcerpc_pipe **p,
struct dcerpc_binding *binding,
const char *pipe_uuid,
- uint32 pipe_version,
+ uint32_t pipe_version,
const char *domain,
const char *username,
const char *password)
{
NTSTATUS status;
- uint32 port = 0;
+ uint32_t port = 0;
if (binding->options && binding->options[0]) {
port = atoi(binding->options[0]);
@@ -574,7 +574,7 @@ static NTSTATUS dcerpc_pipe_connect_ncacn_ip_tcp(struct dcerpc_pipe **p,
NTSTATUS dcerpc_pipe_connect_b(struct dcerpc_pipe **p,
struct dcerpc_binding *binding,
const char *pipe_uuid,
- uint32 pipe_version,
+ uint32_t pipe_version,
const char *domain,
const char *username,
const char *password)
@@ -606,7 +606,7 @@ NTSTATUS dcerpc_pipe_connect_b(struct dcerpc_pipe **p,
NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **p,
const char *binding,
const char *pipe_uuid,
- uint32 pipe_version,
+ uint32_t pipe_version,
const char *domain,
const char *username,
const char *password)
@@ -642,7 +642,7 @@ NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **p,
NTSTATUS dcerpc_secondary_smb(struct dcerpc_pipe *p, struct dcerpc_pipe **p2,
const char *pipe_name,
const char *pipe_uuid,
- uint32 pipe_version)
+ uint32_t pipe_version)
{
NTSTATUS status;
struct cli_tree *tree;