diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-08 11:21:57 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-08 11:21:57 +0000 |
commit | 7d212460a5c00b4039440c2db0dde56e7d519d66 (patch) | |
tree | 7c14238930104c5edc8711f480b3ba0095d8d687 /source4/librpc/ndr/libndr.h | |
parent | 4e4a63d5185d1567c115e7cbf15022b0fbcbc870 (diff) | |
download | samba-7d212460a5c00b4039440c2db0dde56e7d519d66.tar.gz samba-7d212460a5c00b4039440c2db0dde56e7d519d66.tar.bz2 samba-7d212460a5c00b4039440c2db0dde56e7d519d66.zip |
- corrected some lsa idl
- updated lsa parse code from pidl
(This used to be commit 3983b2aee77b0e093847bfc02e02b83ab281f5dd)
Diffstat (limited to 'source4/librpc/ndr/libndr.h')
-rw-r--r-- | source4/librpc/ndr/libndr.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h index 0d28783a6d..870500d169 100644 --- a/source4/librpc/ndr/libndr.h +++ b/source4/librpc/ndr/libndr.h @@ -61,6 +61,12 @@ struct ndr_push_save { #define LIBNDR_FLAG_BIGENDIAN 1 +/* + flags passed to control parse flow +*/ +#define NDR_SCALARS 1 +#define NDR_BUFFERS 2 + /* these are used to make the error checking on each element in libndr less tedious, hopefully making the code more readable */ #define NDR_CHECK(call) do { NTSTATUS _status; \ @@ -75,19 +81,23 @@ struct ndr_push_save { if (!(s)) return NT_STATUS_NO_MEMORY; \ } while (0) -#define NDR_ALLOC_N(ndr, s, n) do { \ +#define NDR_ALLOC_N_SIZE(ndr, s, n, elsize) do { \ if ((n) == 0) { \ (s) = NULL; \ } else { \ - (s) = talloc(ndr->mem_ctx, (n) * sizeof(*(s))); \ + (s) = talloc(ndr->mem_ctx, (n) * elsize); \ if (!(s)) return NT_STATUS_NO_MEMORY; \ } \ } while (0) +#define NDR_ALLOC_N(ndr, s, n) NDR_ALLOC_N_SIZE(ndr, s, n, sizeof(*(s))) /* these are used when generic fn pointers are needed for ndr push/pull fns */ typedef NTSTATUS (*ndr_push_fn_t)(struct ndr_push *, void *); 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_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void *); + /* now pull in the individual parsers */ #include "librpc/ndr/ndr_sec.h" #include "librpc/ndr/ndr_misc.h" |