diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-11 04:38:51 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-11 04:38:51 +0000 |
commit | deeb8d98a10a0fb1dbeca13653a802cef43d9e07 (patch) | |
tree | 52e058702da89b0b408d73688fd1f7f8f60da008 /source4/librpc/ndr/ndr_basic.c | |
parent | 161321f68db0e83e71099364a654c796e49b8152 (diff) | |
download | samba-deeb8d98a10a0fb1dbeca13653a802cef43d9e07.tar.gz samba-deeb8d98a10a0fb1dbeca13653a802cef43d9e07.tar.bz2 samba-deeb8d98a10a0fb1dbeca13653a802cef43d9e07.zip |
start using automatic union printing
(This used to be commit e81040a902f67fd10ca1f9c9ca1c22bc95e36005)
Diffstat (limited to 'source4/librpc/ndr/ndr_basic.c')
-rw-r--r-- | source4/librpc/ndr/ndr_basic.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index 11f3bb5e23..2276b76e95 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -375,9 +375,9 @@ NTSTATUS ndr_pull_NTTIME(struct ndr_pull *ndr, NTTIME *t) } -void ndr_print_struct(struct ndr_print *ndr, const char *name) +void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type) { - ndr->print(ndr, "%s:", name); + ndr->print(ndr, "%s: struct %s", name, type); } void ndr_print_uint8(struct ndr_print *ndr, const char *name, uint8 v) @@ -418,3 +418,13 @@ void ndr_print_NTTIME(struct ndr_print *ndr, const char *name, NTTIME t) { ndr->print(ndr, "%-25s: %s", name, nt_time_string(ndr->mem_ctx, &t)); } + +void ndr_print_union(struct ndr_print *ndr, const char *name, uint16 level, const char *type) +{ + ndr->print(ndr, "%-25s: union %s(case %u)", name, type, level); +} + +void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16 level) +{ + ndr->print(ndr, "UNKNOWN LEVEL %u", level); +} |