diff options
-rw-r--r-- | librpc/gen_ndr/drsblobs.h | 12 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_drsblobs.c | 103 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_drsblobs.h | 5 |
3 files changed, 120 insertions, 0 deletions
diff --git a/librpc/gen_ndr/drsblobs.h b/librpc/gen_ndr/drsblobs.h index 57712a46f0..7fa201daf6 100644 --- a/librpc/gen_ndr/drsblobs.h +++ b/librpc/gen_ndr/drsblobs.h @@ -134,6 +134,18 @@ struct partialAttributeSetBlob { union partialAttributeSetCtr ctr;/* [switch_is(version)] */ }/* [public] */; +struct drsuapi_MSPrefixMap_Entry { + uint16_t entryID; + uint16_t length; + uint8_t *binary_oid; +}/* [noprint,flag(LIBNDR_FLAG_NOALIGN)] */; + +struct drsuapi_MSPrefixMap_Ctr { + uint32_t num_entries; + uint32_t __ndr_size;/* [value(ndr_size_drsuapi_MSPrefixMap_Ctr(r,ndr->iconv_convenience,ndr->flags))] */ + struct drsuapi_MSPrefixMap_Entry *entries; +}/* [gensize,public] */; + enum prefixMapVersion #ifndef USE_UINT_ENUMS { diff --git a/librpc/gen_ndr/ndr_drsblobs.c b/librpc/gen_ndr/ndr_drsblobs.c index 3102251bdb..4290ce5325 100644 --- a/librpc/gen_ndr/ndr_drsblobs.c +++ b/librpc/gen_ndr/ndr_drsblobs.c @@ -1213,6 +1213,109 @@ _PUBLIC_ void ndr_print_partialAttributeSetBlob(struct ndr_print *ndr, const cha ndr->depth--; } +static enum ndr_err_code ndr_push_drsuapi_MSPrefixMap_Entry(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_MSPrefixMap_Entry *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 2)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->entryID)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->binary_oid, r->length)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_MSPrefixMap_Entry(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_MSPrefixMap_Entry *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 2)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->entryID)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length)); + NDR_PULL_ALLOC_N(ndr, r->binary_oid, r->length); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->binary_oid, r->length)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_push_drsuapi_MSPrefixMap_Ctr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_MSPrefixMap_Ctr *r) +{ + uint32_t cntr_entries_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_entries)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_MSPrefixMap_Ctr(r, ndr->iconv_convenience, ndr->flags))); + for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { + NDR_CHECK(ndr_push_drsuapi_MSPrefixMap_Entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0])); + } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_MSPrefixMap_Ctr(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_MSPrefixMap_Ctr *r) +{ + uint32_t cntr_entries_0; + TALLOC_CTX *_mem_save_entries_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_entries)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size)); + NDR_PULL_ALLOC_N(ndr, r->entries, r->num_entries); + _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { + NDR_CHECK(ndr_pull_drsuapi_MSPrefixMap_Entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_MSPrefixMap_Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_MSPrefixMap_Ctr *r) +{ + uint32_t cntr_entries_0; + ndr_print_struct(ndr, name, "drsuapi_MSPrefixMap_Ctr"); + ndr->depth++; + ndr_print_uint32(ndr, "num_entries", r->num_entries); + ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_MSPrefixMap_Ctr(r, ndr->iconv_convenience, ndr->flags):r->__ndr_size); + ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->num_entries); + ndr->depth++; + for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) { + char *idx_0=NULL; + if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) { + ndr_print_drsuapi_MSPrefixMap_Entry(ndr, "entries", &r->entries[cntr_entries_0]); + free(idx_0); + } + } + ndr->depth--; + ndr->depth--; +} + +_PUBLIC_ size_t ndr_size_drsuapi_MSPrefixMap_Ctr(const struct drsuapi_MSPrefixMap_Ctr *r, struct smb_iconv_convenience *ic, int flags) +{ + return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_MSPrefixMap_Ctr, ic); +} + static enum ndr_err_code ndr_push_prefixMapVersion(struct ndr_push *ndr, int ndr_flags, enum prefixMapVersion r) { NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r)); diff --git a/librpc/gen_ndr/ndr_drsblobs.h b/librpc/gen_ndr/ndr_drsblobs.h index d32d178689..866334853a 100644 --- a/librpc/gen_ndr/ndr_drsblobs.h +++ b/librpc/gen_ndr/ndr_drsblobs.h @@ -78,6 +78,11 @@ void ndr_print_partialAttributeSetCtr(struct ndr_print *ndr, const char *name, c enum ndr_err_code ndr_push_partialAttributeSetBlob(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetBlob *r); enum ndr_err_code ndr_pull_partialAttributeSetBlob(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetBlob *r); void ndr_print_partialAttributeSetBlob(struct ndr_print *ndr, const char *name, const struct partialAttributeSetBlob *r); +void ndr_print_drsuapi_MSPrefixMap_Entry(struct ndr_print *ndr, const char *name, const struct drsuapi_MSPrefixMap_Entry *r); +enum ndr_err_code ndr_push_drsuapi_MSPrefixMap_Ctr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_MSPrefixMap_Ctr *r); +enum ndr_err_code ndr_pull_drsuapi_MSPrefixMap_Ctr(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_MSPrefixMap_Ctr *r); +void ndr_print_drsuapi_MSPrefixMap_Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_MSPrefixMap_Ctr *r); +size_t ndr_size_drsuapi_MSPrefixMap_Ctr(const struct drsuapi_MSPrefixMap_Ctr *r, struct smb_iconv_convenience *ic, int flags); void ndr_print_prefixMapVersion(struct ndr_print *ndr, const char *name, enum prefixMapVersion r); void ndr_print_prefixMapCtr(struct ndr_print *ndr, const char *name, const union prefixMapCtr *r); enum ndr_err_code ndr_push_prefixMapBlob(struct ndr_push *ndr, int ndr_flags, const struct prefixMapBlob *r); |