summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/libndr.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc/ndr/libndr.h')
-rw-r--r--source4/librpc/ndr/libndr.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index 870500d169..24ae09f538 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -58,9 +58,23 @@ struct ndr_push_save {
uint32 offset;
};
+
+/* structure passed to functions that print IDL structures */
+struct ndr_print {
+ uint32 flags; /* LIBNDR_FLAG_* */
+ TALLOC_CTX *mem_ctx;
+ uint32 depth;
+ void (*print)(struct ndr_print *, const char *, ...);
+};
+
#define LIBNDR_FLAG_BIGENDIAN 1
+/* useful macro for debugging */
+#define NDR_PRINT_DEBUG(type, p) ndr_print_debug((ndr_print_fn_t)ndr_print_ ##type, #p, p)
+
+
+
/*
flags passed to control parse flow
*/
@@ -97,6 +111,7 @@ 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 *);
+typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, void *);
/* now pull in the individual parsers */
#include "librpc/ndr/ndr_sec.h"