diff options
author | Kamen Mazdrashki <kamen.mazdrashki@postpath.com> | 2010-01-19 16:53:32 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-02-01 15:23:30 +0100 |
commit | 20db3211ae406004425dd2e2b4294b03b4c4ecbf (patch) | |
tree | fefa1534d976d41efa5991a2895931142f0038d5 /librpc/ndr | |
parent | cd3d165778e51987f185a58ff49c124a555e14e7 (diff) | |
download | samba-20db3211ae406004425dd2e2b4294b03b4c4ecbf.tar.gz samba-20db3211ae406004425dd2e2b4294b03b4c4ecbf.tar.bz2 samba-20db3211ae406004425dd2e2b4294b03b4c4ecbf.zip |
s4/drsblobs: Custom ndr_print_ implementation for drsuapi_MSPrefixMap_Entry
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'librpc/ndr')
-rw-r--r-- | librpc/ndr/ndr_drsblobs.c | 25 | ||||
-rw-r--r-- | librpc/ndr/ndr_drsblobs.h | 2 |
2 files changed, 26 insertions, 1 deletions
diff --git a/librpc/ndr/ndr_drsblobs.c b/librpc/ndr/ndr_drsblobs.c index aecb0c3b16..741bf71191 100644 --- a/librpc/ndr/ndr_drsblobs.c +++ b/librpc/ndr/ndr_drsblobs.c @@ -21,6 +21,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_drsblobs.h" +#include "../lib/util/asn1.h" /* parser auto-generated by pidl, then hand-modified by abartlet */ @@ -211,3 +212,27 @@ _PUBLIC_ enum ndr_err_code ndr_pull_trustDomainPasswords(struct ndr_pull *ndr, i return NDR_ERR_SUCCESS; } +_PUBLIC_ void ndr_print_drsuapi_MSPrefixMap_Entry(struct ndr_print *ndr, const char *name, const struct drsuapi_MSPrefixMap_Entry *r) +{ + ndr_print_struct(ndr, name, "drsuapi_MSPrefixMap_Entry"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + ndr->depth++; + ndr_print_uint16(ndr, "entryID", r->entryID); + ndr->print(ndr, "%-25s: length=%u", "oid", r->length); + if (r->binary_oid) { + char *partial_oid = NULL; + DATA_BLOB oid_blob = data_blob_const(r->binary_oid, r->length); + char *hex_str = data_blob_hex_string_upper(ndr, &oid_blob); + ber_read_partial_OID_String(ndr, oid_blob, (const char **)&partial_oid); + ndr->depth++; + ndr->print(ndr, "%-25s: 0x%s (%s)", "binary_oid", hex_str, partial_oid); + ndr->depth--; + talloc_free(hex_str); + talloc_free(partial_oid); + } + ndr->depth--; + ndr->flags = _flags_save_STRUCT; + } +} diff --git a/librpc/ndr/ndr_drsblobs.h b/librpc/ndr/ndr_drsblobs.h index 27532257de..255bba6117 100644 --- a/librpc/ndr/ndr_drsblobs.h +++ b/librpc/ndr/ndr_drsblobs.h @@ -24,4 +24,4 @@ _PUBLIC_ enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int _PUBLIC_ enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r); _PUBLIC_ void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r); _PUBLIC_ enum ndr_err_code ndr_pull_trustDomainPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustDomainPasswords *r); - +_PUBLIC_ void ndr_print_drsuapi_MSPrefixMap_Entry(struct ndr_print *ndr, const char *name, const struct drsuapi_MSPrefixMap_Entry *r); |