summaryrefslogtreecommitdiff
path: root/source3/librpc/ndr/libndr.h
diff options
context:
space:
mode:
authorDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-01-16 00:45:06 +0000
committerDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-01-16 00:45:06 +0000
commit6e94cbdc30afc3c9b5d2504aa8649fa9c87af7aa (patch)
tree6d6f4fbb0d3a4a4763c178e32d220c76f3deae0d /source3/librpc/ndr/libndr.h
parent9788383a6c08189564cd18a824aab4ccdbe57a21 (diff)
parent9a6a5fff9ca387ec698eaae2b3abc6a1937f2bab (diff)
downloadsamba-6e94cbdc30afc3c9b5d2504aa8649fa9c87af7aa.tar.gz
samba-6e94cbdc30afc3c9b5d2504aa8649fa9c87af7aa.tar.bz2
samba-6e94cbdc30afc3c9b5d2504aa8649fa9c87af7aa.zip
Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit f963d57096184dd9381fcc5f175150d27460ea7a)
Diffstat (limited to 'source3/librpc/ndr/libndr.h')
-rw-r--r--source3/librpc/ndr/libndr.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/librpc/ndr/libndr.h b/source3/librpc/ndr/libndr.h
index 6341e20b65..d0c2c74db9 100644
--- a/source3/librpc/ndr/libndr.h
+++ b/source3/librpc/ndr/libndr.h
@@ -149,7 +149,7 @@ struct ndr_print {
/* set to avoid recursion in ndr_size_*() calculation */
#define LIBNDR_FLAG_NO_NDR_SIZE (1<<31)
-/* useful macro for debugging */
+/* useful macro for debugging with DEBUG */
#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_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)
@@ -157,6 +157,14 @@ struct ndr_print {
#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 | NDR_SET_VALUES, p)
+/* useful macro for debugging in strings */
+#define NDR_PRINT_STRUCT_STRING(ctx, type, p) ndr_print_struct_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, p)
+#define NDR_PRINT_UNION_STRING(ctx, type, level, p) ndr_print_union_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, level, p)
+#define NDR_PRINT_FUNCTION_STRING(ctx, type, flags, p) ndr_print_function_string(ctx, (ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
+#define NDR_PRINT_BOTH_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_BOTH, p)
+#define NDR_PRINT_OUT_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_OUT, p)
+#define NDR_PRINT_IN_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_IN | NDR_SET_VALUES, p)
+
#define NDR_BE(ndr) (((ndr)->flags & (LIBNDR_FLAG_BIGENDIAN|LIBNDR_FLAG_LITTLE_ENDIAN)) == LIBNDR_FLAG_BIGENDIAN)
enum ndr_err_code {