summaryrefslogtreecommitdiff
path: root/librpc/ndr/libndr.h
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2013-01-18 18:35:15 +0100
committerKai Blin <kai@samba.org>2013-05-18 10:58:05 +0200
commit0f5e9d29f607f9d910641632dfcd20ef800b0bc4 (patch)
treefc66c762984af20933c1405bca8d83d559c7674a /librpc/ndr/libndr.h
parent30cba0d201fc91cff30b6ea2bd11979930650169 (diff)
downloadsamba-0f5e9d29f607f9d910641632dfcd20ef800b0bc4.tar.gz
samba-0f5e9d29f607f9d910641632dfcd20ef800b0bc4.tar.bz2
samba-0f5e9d29f607f9d910641632dfcd20ef800b0bc4.zip
librpc: Add NDR_PRINT_DEBUGC to ndr print to a debug class
Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'librpc/ndr/libndr.h')
-rw-r--r--librpc/ndr/libndr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index 1bd284f798..a950519057 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -162,6 +162,7 @@ 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_DEBUGC(dbgc_class, type, p) ndr_print_debugc(dbgc_class, (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)
#define NDR_PRINT_BOTH_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_BOTH, p)
@@ -460,9 +461,11 @@ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx);
DATA_BLOB ndr_push_blob(struct ndr_push *ndr);
enum ndr_err_code ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size);
void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
+void ndr_print_debugc_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
void ndr_print_printf_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
void ndr_print_string_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr);
+void ndr_print_debugc(int dbgc_class, ndr_print_fn_t fn, const char *name, void *ptr);
void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr);
void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int flags, void *ptr);
char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, void *ptr);