_PUBLIC_ void ndr_print_security_ace_object(struct ndr_print *ndr, const char *name, const struct security_ace_object *r) { ndr_print_struct(ndr, name, "security_ace_object"); ndr->depth++; ndr_print_security_ace_object_flags(ndr, "flags", r->flags); ndr_print_set_switch_value(ndr, &r->type, r->flags & SEC_ACE_OBJECT_TYPE_PRESENT); ndr_print_security_ace_object_type(ndr, "type", &r->type); ndr_print_set_switch_value(ndr, &r->inherited_type, r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT); ndr_print_security_ace_object_inherited_type(ndr, "inherited_type", &r->inherited_type); ndr->depth--; }
_PUBLIC_ void ndr_print_echo_TestCall2(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestCall2 *r) { ndr_print_struct(ndr, name, "echo_TestCall2"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "echo_TestCall2"); ndr->depth++; ndr_print_uint16(ndr, "level", r->in.level); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "echo_TestCall2"); ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; ndr_print_set_switch_value(ndr, r->out.info, r->in.level); ndr_print_echo_Info(ndr, "info", r->out.info); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; }
_PUBLIC_ void ndr_print_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r) { ndr_print_struct(ndr, name, "dssetup_DsRoleGetPrimaryDomainInformation"); if (r == NULL) { ndr_print_null(ndr); return; } ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dssetup_DsRoleGetPrimaryDomainInformation"); ndr->depth++; ndr_print_dssetup_DsRoleInfoLevel(ndr, "level", r->in.level); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "dssetup_DsRoleGetPrimaryDomainInformation"); ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; if (r->out.info) { ndr_print_set_switch_value(ndr, r->out.info, r->in.level); ndr_print_dssetup_DsRoleInfo(ndr, "info", r->out.info); } ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; }
_PUBLIC_ void ndr_print_echo_TestEnum(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestEnum *r) { ndr_print_struct(ndr, name, "echo_TestEnum"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "echo_TestEnum"); ndr->depth++; ndr_print_ptr(ndr, "foo1", r->in.foo1); ndr->depth++; ndr_print_echo_Enum1(ndr, "foo1", *r->in.foo1); ndr->depth--; ndr_print_ptr(ndr, "foo2", r->in.foo2); ndr->depth++; ndr_print_echo_Enum2(ndr, "foo2", r->in.foo2); ndr->depth--; ndr_print_ptr(ndr, "foo3", r->in.foo3); ndr->depth++; ndr_print_set_switch_value(ndr, r->in.foo3, *r->in.foo1); ndr_print_echo_Enum3(ndr, "foo3", r->in.foo3); ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "echo_TestEnum"); ndr->depth++; ndr_print_ptr(ndr, "foo1", r->out.foo1); ndr->depth++; ndr_print_echo_Enum1(ndr, "foo1", *r->out.foo1); ndr->depth--; ndr_print_ptr(ndr, "foo2", r->out.foo2); ndr->depth++; ndr_print_echo_Enum2(ndr, "foo2", r->out.foo2); ndr->depth--; ndr_print_ptr(ndr, "foo3", r->out.foo3); ndr->depth++; ndr_print_set_switch_value(ndr, r->out.foo3, *r->out.foo1); ndr_print_echo_Enum3(ndr, "foo3", r->out.foo3); ndr->depth--; ndr->depth--; } ndr->depth--; }
_PUBLIC_ void ndr_print_xattr_NTACL(struct ndr_print *ndr, const char *name, const struct xattr_NTACL *r) { ndr_print_struct(ndr, name, "xattr_NTACL"); ndr->depth++; ndr_print_uint16(ndr, "version", r->version); ndr_print_set_switch_value(ndr, &r->info, r->version); ndr_print_xattr_NTACL_Info(ndr, "info", &r->info); ndr->depth--; }
_PUBLIC_ void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struct security_ace *r) { ndr_print_struct(ndr, name, "security_ace"); ndr->depth++; ndr_print_security_ace_type(ndr, "type", r->type); ndr_print_security_ace_flags(ndr, "flags", r->flags); ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_ace(r, ndr->iconv_convenience, ndr->flags):r->size); ndr_print_uint32(ndr, "access_mask", r->access_mask); ndr_print_set_switch_value(ndr, &r->object, r->type); ndr_print_security_ace_object_ctr(ndr, "object", &r->object); ndr_print_dom_sid(ndr, "trustee", &r->trustee); ndr->depth--; }
/* a useful helper function for printing idl unions via DEBUG() */ _PUBLIC_ void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr) { struct ndr_print *ndr; DEBUG(1,(" ")); ndr = talloc_zero(NULL, struct ndr_print); if (!ndr) return; ndr->print = ndr_print_debug_helper; ndr->depth = 1; ndr->flags = 0; ndr_print_set_switch_value(ndr, ptr, level); fn(ndr, name, ptr); talloc_free(ndr); }
void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r) { ndr_print_struct(ndr, name, "PAC_BUFFER"); ndr->depth++; ndr_print_PAC_TYPE(ndr, "type", r->type); ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?_ndr_size_PAC_INFO(r->info,r->type,ndr->iconv_convenience,0):r->_ndr_size); ndr_print_ptr(ndr, "info", r->info); ndr->depth++; if (r->info) { ndr_print_set_switch_value(ndr, r->info, r->type); ndr_print_PAC_INFO(ndr, "info", r->info); } ndr->depth--; ndr_print_uint32(ndr, "_pad", r->_pad); ndr->depth--; }
_PUBLIC_ void ndr_print_dnsp_DnssrvRpcRecord(struct ndr_print *ndr, const char *name, const struct dnsp_DnssrvRpcRecord *r) { ndr_print_struct(ndr, name, "dnsp_DnssrvRpcRecord"); if (r == NULL) { ndr_print_null(ndr); return; } ndr->depth++; ndr_print_uint16(ndr, "wDataLength", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dnsRecordData(&r->data, r->wType, ndr->flags):r->wDataLength); ndr_print_dns_record_type(ndr, "wType", r->wType); ndr_print_uint8(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?5:r->version); ndr_print_dns_record_rank(ndr, "rank", r->rank); ndr_print_uint16(ndr, "flags", r->flags); ndr_print_uint32(ndr, "dwSerial", r->dwSerial); ndr_print_uint32(ndr, "dwTtlSeconds", r->dwTtlSeconds); ndr_print_uint32(ndr, "dwReserved", r->dwReserved); ndr_print_uint32(ndr, "dwTimeStamp", r->dwTimeStamp); ndr_print_set_switch_value(ndr, &r->data, r->wType); ndr_print_dnsRecordData(ndr, "data", &r->data); ndr->depth--; }
_PUBLIC_ void ndr_print_xattr_DOSATTRIB(struct ndr_print *ndr, const char *name, const struct xattr_DOSATTRIB *r) { char *attrib_hex; ndr_print_struct(ndr, name, "xattr_DOSATTRIB"); ndr->depth++; if (ndr->flags & LIBNDR_PRINT_SET_VALUES) { attrib_hex = ndr_compat_xattr_attrib_hex(ndr, r); } else { attrib_hex = talloc_strdup(ndr, r->attrib_hex); } ndr_print_string(ndr, "attrib_hex", attrib_hex); ndr_print_uint16(ndr, "version", r->version); ndr_print_set_switch_value(ndr, &r->info, r->version); ndr_print_xattr_DosInfo(ndr, "info", &r->info); ndr->depth--; }
/* a useful helper function for printing idl unions to a string */ _PUBLIC_ char *ndr_print_union_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr) { struct ndr_print *ndr; char *ret = NULL; ndr = talloc_zero(mem_ctx, struct ndr_print); if (!ndr) return NULL; ndr->private_data = talloc_strdup(ndr, ""); if (!ndr->private_data) { goto failed; } ndr->print = ndr_print_string_helper; ndr->depth = 1; ndr->flags = 0; ndr_print_set_switch_value(ndr, ptr, level); fn(ndr, name, ptr); ret = talloc_steal(mem_ctx, (char *)ndr->private_data); failed: talloc_free(ndr); return ret; }
_PUBLIC_ void ndr_print_bkrp_BackupKey(struct ndr_print *ndr, const char *name, int flags, const struct bkrp_BackupKey *r) { ndr_print_struct(ndr, name, "bkrp_BackupKey"); if (r == NULL) { ndr_print_null(ndr); return; } ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { union bkrp_data_in_blob inblob; DATA_BLOB blob; uint32_t level; enum ndr_err_code ndr_err; ndr_print_struct(ndr, "in", "bkrp_BackupKey"); ndr->depth++; ndr_print_ptr(ndr, "guidActionAgent", r->in.guidActionAgent); ndr->depth++; ndr_print_GUID(ndr, "guidActionAgent", r->in.guidActionAgent); ndr->depth--; level = backupkeyguid_to_uint(r->in.guidActionAgent); ndr_err = ndr_print_set_switch_value(ndr, &inblob, level); if (unlikely(!NDR_ERR_CODE_IS_SUCCESS(ndr_err))) { \ DEBUG(0,("ERROR: ndr_print_bkrp_BackupKey ndr_print_set_switch_value failed: %d\n", ndr_err)); return; } blob.data = r->in.data_in; blob.length = r->in.data_in_len; ndr_err = ndr_pull_union_blob(&blob, ndr, &inblob, level, (ndr_pull_flags_fn_t)ndr_pull_bkrp_data_in_blob); ndr_print_ptr(ndr, "data_in", r->in.data_in); ndr->depth++; if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { ndr_print_bkrp_data_in_blob(ndr, "data_in", &inblob); } else { ndr_print_array_uint8(ndr, "data_in", r->in.data_in, r->in.data_in_len); } ndr->depth--; ndr_print_uint32(ndr, "data_in_len", r->in.data_in_len); ndr_print_uint32(ndr, "param", r->in.param); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "bkrp_BackupKey"); ndr->depth++; ndr_print_ptr(ndr, "data_out", r->out.data_out); ndr->depth++; ndr_print_ptr(ndr, "data_out", *r->out.data_out); ndr->depth++; if (*r->out.data_out) { ndr_print_array_uint8(ndr, "data_out", *r->out.data_out, *r->out.data_out_len); } ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "data_out_len", r->out.data_out_len); ndr->depth++; ndr_print_uint32(ndr, "data_out_len", *r->out.data_out_len); ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; }