summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/libndr.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-17 11:55:56 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-17 11:55:56 +0000
commitd285c6f14f7ad7037e1a81d59da8b3c892a49884 (patch)
tree07c6ac5184aef953d5cf82b653f9f56dd6942cfd /source4/librpc/ndr/libndr.h
parentfb53302c8eb32603098b17bcf2fad16af66e9a60 (diff)
downloadsamba-d285c6f14f7ad7037e1a81d59da8b3c892a49884.tar.gz
samba-d285c6f14f7ad7037e1a81d59da8b3c892a49884.tar.bz2
samba-d285c6f14f7ad7037e1a81d59da8b3c892a49884.zip
* add another WERR err code
* use the top-level function argument printing to show more detail in RPC-* tests (This used to be commit 33bb8785625b1845750f28f2d810e7096afe9f8e)
Diffstat (limited to 'source4/librpc/ndr/libndr.h')
-rw-r--r--source4/librpc/ndr/libndr.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index 8c224d9a01..f0a906e5fa 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -94,6 +94,10 @@ struct ndr_print {
/* useful macro for debugging */
#define NDR_PRINT_DEBUG(type, p) ndr_print_debug((ndr_print_fn_t)ndr_print_ ##type, #p, p)
#define NDR_PRINT_UNION_DEBUG(type, level, p) ndr_print_union_debug((ndr_print_union_fn_t)ndr_print_ ##type, #p, level, p)
+#define NDR_PRINT_FUNCTION_DEBUG(type, flags, p) ndr_print_function_debug((ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
+#define NDR_PRINT_BOTH_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_BOTH, p)
+#define NDR_PRINT_OUT_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_OUT, p)
+#define NDR_PRINT_IN_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_IN, p)
enum ndr_err_code {
@@ -112,6 +116,13 @@ enum ndr_err_code {
#define NDR_SCALARS 1
#define NDR_BUFFERS 2
+/*
+ flags passed to ndr_print_*()
+*/
+#define NDR_IN 1
+#define NDR_OUT 2
+#define NDR_BOTH 3
+
#define NDR_PULL_NEED_BYTES(ndr, n) do { \
if ((n) > ndr->data_size || ndr->offset + (n) > ndr->data_size) { \
return NT_STATUS_BUFFER_TOO_SMALL; \
@@ -171,6 +182,7 @@ 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, uint16, void *);
typedef NTSTATUS (*ndr_pull_union_fn_t)(struct ndr_pull *, int ndr_flags, uint16 *, 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 *, uint16, void *);
/* now pull in the individual parsers */