diff options
author | Kamen Mazdrashki <kamen.mazdrashki@postpath.com> | 2009-10-02 18:30:14 +0300 |
---|---|---|
committer | Anatoliy Atanasov <anatoliy.atanasov@postpath.com> | 2009-10-16 12:54:13 +0300 |
commit | cb71e8a73105f7dbeff42738b9c32194ed9a4023 (patch) | |
tree | 3f9f86419d3b1fda96de352f8a9a2fb6a0c29052 /librpc | |
parent | cf51787382f587795f90b5d1b2ca2ede73b67acd (diff) | |
download | samba-cb71e8a73105f7dbeff42738b9c32194ed9a4023.tar.gz samba-cb71e8a73105f7dbeff42738b9c32194ed9a4023.tar.bz2 samba-cb71e8a73105f7dbeff42738b9c32194ed9a4023.zip |
s4/drs(idl): Regenerate idl
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/gen_ndr/drsuapi.h | 6 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_drsuapi.c | 57 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_drsuapi.h | 2 |
3 files changed, 50 insertions, 15 deletions
diff --git a/librpc/gen_ndr/drsuapi.h b/librpc/gen_ndr/drsuapi.h index 0a03004f94..96b0651c4f 100644 --- a/librpc/gen_ndr/drsuapi.h +++ b/librpc/gen_ndr/drsuapi.h @@ -293,9 +293,9 @@ struct drsuapi_DsGetNCChangesRequest5 { }; struct drsuapi_DsReplicaOID { - uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsReplicaOID_oid(oid,0)),range(0,10000)] */ - const char *oid;/* [unique,charset(DOS),size_is(__ndr_size)] */ -}/* [nopush,nopull] */; + uint32_t length;/* [range(0,10000)] */ + uint8_t *binary_oid;/* [unique,size_is(length)] */ +}/* [noprint] */; struct drsuapi_DsReplicaOIDMapping { uint32_t id_prefix; diff --git a/librpc/gen_ndr/ndr_drsuapi.c b/librpc/gen_ndr/ndr_drsuapi.c index ec799b6ea6..f09affcfb5 100644 --- a/librpc/gen_ndr/ndr_drsuapi.c +++ b/librpc/gen_ndr/ndr_drsuapi.c @@ -1167,18 +1167,55 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest5(struct ndr_print *ndr, co ndr->depth--; } -_PUBLIC_ void ndr_print_drsuapi_DsReplicaOID(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOID *r) +static enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r) { - ndr_print_struct(ndr, name, "drsuapi_DsReplicaOID"); - ndr->depth++; - ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaOID_oid(r->oid, 0):r->__ndr_size); - ndr_print_ptr(ndr, "oid", r->oid); - ndr->depth++; - if (r->oid) { - ndr_print_string(ndr, "oid", r->oid); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 5)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->binary_oid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } - ndr->depth--; - ndr->depth--; + if (ndr_flags & NDR_BUFFERS) { + if (r->binary_oid) { + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->binary_oid, r->length)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r) +{ + uint32_t _ptr_binary_oid; + TALLOC_CTX *_mem_save_binary_oid_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 5)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length)); + if (r->length > 10000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_oid)); + if (_ptr_binary_oid) { + NDR_PULL_ALLOC(ndr, r->binary_oid); + } else { + r->binary_oid = NULL; + } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->binary_oid) { + _mem_save_binary_oid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->binary_oid, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->binary_oid)); + NDR_PULL_ALLOC_N(ndr, r->binary_oid, ndr_get_array_size(ndr, &r->binary_oid)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->binary_oid, ndr_get_array_size(ndr, &r->binary_oid))); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_oid_0, 0); + } + if (r->binary_oid) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->binary_oid, r->length)); + } + } + return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOIDMapping *r) diff --git a/librpc/gen_ndr/ndr_drsuapi.h b/librpc/gen_ndr/ndr_drsuapi.h index 8c4a9e3f6f..bf82ab805f 100644 --- a/librpc/gen_ndr/ndr_drsuapi.h +++ b/librpc/gen_ndr/ndr_drsuapi.h @@ -96,8 +96,6 @@ void ndr_print_drsuapi_DsReplicaNeighbourFlags(struct ndr_print *ndr, const char void ndr_print_drsuapi_DsExtendedOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedOperation r); void ndr_print_drsuapi_DsExtendedError(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedError r); void ndr_print_drsuapi_DsGetNCChangesRequest5(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest5 *r); -enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r); -enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r); void ndr_print_drsuapi_DsReplicaOID(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOID *r); void ndr_print_drsuapi_DsReplicaOIDMapping(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOIDMapping *r); enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOIDMapping_Ctr *r); |