From 8448dd6ea0c706e0d5ec5d8773939aa188b62904 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 4 Jan 2005 23:26:12 +0000 Subject: r4519: added the enum print function in ndr_basic.c (This used to be commit 29955004aa256d5ac27b941f48384ab97ff5e4b8) --- source4/librpc/ndr/ndr_basic.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/librpc/ndr/ndr_basic.c') diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index 315dc76059..8874984f4b 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -999,6 +999,12 @@ void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type) ndr->print(ndr, "%s: struct %s", name, type); } +void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, + const char *val, uint32_t value) +{ + ndr->print(ndr, "%-25s: %s (%u)", name, val?val:"UNKNOWN", value); +} + void ndr_print_uint8(struct ndr_print *ndr, const char *name, uint8_t v) { ndr->print(ndr, "%-25s: 0x%02x (%u)", name, v, v); -- cgit