diff options
author | Kamen Mazdrashki <kamen.mazdrashki@postpath.com> | 2009-10-05 13:28:12 +0300 |
---|---|---|
committer | Anatoliy Atanasov <anatoliy.atanasov@postpath.com> | 2009-10-16 12:54:13 +0300 |
commit | 7e8fb4ad06a3e2e5ae17b06299c7c4cd4e87012e (patch) | |
tree | 1e0076b42bffe8434a0e260059290302949be4cf /librpc | |
parent | 4bfd132b0820644bb41c6d1c3075875d94b9cdd7 (diff) | |
download | samba-7e8fb4ad06a3e2e5ae17b06299c7c4cd4e87012e.tar.gz samba-7e8fb4ad06a3e2e5ae17b06299c7c4cd4e87012e.tar.bz2 samba-7e8fb4ad06a3e2e5ae17b06299c7c4cd4e87012e.zip |
s4/drs(NDR): Print implementation for drsuapi_DsReplicaOID
Custom ndr_print functions is implemented so that transmited
partia-binary-oid to be printed both in hex and
partial-oid formats
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/ndr/ndr_drsuapi.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/librpc/ndr/ndr_drsuapi.c b/librpc/ndr/ndr_drsuapi.c index a551a01cca..bfc3c75b4e 100644 --- a/librpc/ndr/ndr_drsuapi.c +++ b/librpc/ndr/ndr_drsuapi.c @@ -82,6 +82,25 @@ void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const ch } \ } while (0) +_PUBLIC_ void ndr_print_drsuapi_DsReplicaOID(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOID *r) +{ + ndr_print_struct(ndr, name, "drsuapi_DsReplicaOID"); + ndr->depth++; + ndr_print_uint32(ndr, "length", r->length); + 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(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--; +} enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r) { |