summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librpc/ndr/ndr_drsuapi.c97
-rw-r--r--librpc/ndr/ndr_drsuapi.h3
2 files changed, 0 insertions, 100 deletions
diff --git a/librpc/ndr/ndr_drsuapi.c b/librpc/ndr/ndr_drsuapi.c
index 0c790e52ca..a551a01cca 100644
--- a/librpc/ndr/ndr_drsuapi.c
+++ b/librpc/ndr/ndr_drsuapi.c
@@ -82,103 +82,6 @@ void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const ch
} \
} while (0)
-enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaOID_oid(r->oid, 0)));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->oid));
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->oid) {
- DATA_BLOB blob;
-
- if (strncasecmp("ff", r->oid, 2) == 0) {
- blob = strhex_to_data_blob(ndr, r->oid);
- if (!blob.data) {
- return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT,
- "HEX String Conversion Error: %s\n",
- __location__);
- }
- } else {
- _OID_PUSH_CHECK(ber_write_OID_String(&blob, r->oid));
- talloc_steal(ndr, blob.data);
- }
-
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length));
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.data, blob.length));
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r)
-{
- uint32_t _ptr_oid;
- TALLOC_CTX *_mem_save_oid_0;
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
- if (r->__ndr_size < 0 || r->__ndr_size > 10000) {
- return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
- }
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_oid));
- if (_ptr_oid) {
- NDR_PULL_ALLOC(ndr, r->oid);
- } else {
- r->oid = NULL;
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->oid) {
- DATA_BLOB _oid_array;
- const char *_oid;
-
- _mem_save_oid_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, ndr, 0);
- NDR_CHECK(ndr_pull_array_size(ndr, &r->oid));
- _oid_array.length = ndr_get_array_size(ndr, &r->oid);
- NDR_PULL_ALLOC_N(ndr, _oid_array.data, _oid_array.length);
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, _oid_array.data, _oid_array.length));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oid_0, 0);
-
- if (_oid_array.length && _oid_array.data[0] == 0xFF) {
- _oid = data_blob_hex_string(ndr, &_oid_array);
- NDR_ERR_HAVE_NO_MEMORY(_oid);
- } else {
- _OID_PULL_CHECK(ber_read_OID_String(ndr, _oid_array, &_oid));
- }
- data_blob_free(&_oid_array);
- talloc_steal(r->oid, _oid);
- r->oid = _oid;
- }
- if (r->oid) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->oid, r->__ndr_size));
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags)
-{
- DATA_BLOB _blob;
- size_t ret = 0;
-
- if (!oid) return 0;
-
- if (strncasecmp("ff", oid, 2) == 0) {
- _blob = strhex_to_data_blob(NULL, oid);
- if (_blob.data) {
- ret = _blob.length;
- }
- } else {
- if (ber_write_OID_String(&_blob, oid)) {
- ret = _blob.length;
- }
- }
- data_blob_free(&_blob);
- return ret;
-}
enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
{
diff --git a/librpc/ndr/ndr_drsuapi.h b/librpc/ndr/ndr_drsuapi.h
index 12c2c78bde..179879a3b7 100644
--- a/librpc/ndr/ndr_drsuapi.h
+++ b/librpc/ndr/ndr_drsuapi.h
@@ -28,8 +28,5 @@ void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char
void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name,
const struct drsuapi_DsReplicaObjectListItemEx *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);
-size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags);
#endif /* _LIBRPC_NDR_NDR_DRSUAPI_H */