summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-04 23:26:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:17 -0500
commit8448dd6ea0c706e0d5ec5d8773939aa188b62904 (patch)
tree40377cdb06b2f2db4deafdbe5a078498a4b9910a /source4
parent3acf026603944b2de6e55e1d3068f6c9cdde9429 (diff)
downloadsamba-8448dd6ea0c706e0d5ec5d8773939aa188b62904.tar.gz
samba-8448dd6ea0c706e0d5ec5d8773939aa188b62904.tar.bz2
samba-8448dd6ea0c706e0d5ec5d8773939aa188b62904.zip
r4519: added the enum print function in ndr_basic.c
(This used to be commit 29955004aa256d5ac27b941f48384ab97ff5e4b8)
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/ndr/ndr_basic.c6
1 files changed, 6 insertions, 0 deletions
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);