r24535: rename struct dcerpc_interface_call -> struct ndr_interface_call
authorStefan Metzmacher <metze@samba.org>
Sat, 18 Aug 2007 10:30:40 +0000 (10:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:02:11 +0000 (15:02 -0500)
and move it to librpc/ndr/libndr.h

metze
(This used to be commit abd5551aabae1820baaa52a963e8c7aa9605914e)

source4/librpc/ndr/libndr.h
source4/librpc/rpc/dcerpc.c
source4/librpc/rpc/dcerpc.h
source4/librpc/rpc/dcerpc_util.c
source4/librpc/tools/ndrdump.c
source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
source4/rpc_server/remote/dcesrv_remote.c
source4/scripting/ejs/smbcalls_rpc.c

index 93da5b02d5c5bbb92f0c254c64d0762d30068c64..16d215e053d3c7abeb7492ae8c14ede4c0976b49 100644 (file)
@@ -290,6 +290,15 @@ typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, cons
 extern const struct ndr_syntax_id ndr_transfer_syntax;
 extern const struct ndr_syntax_id ndr64_transfer_syntax;
 
+struct ndr_interface_call {
+       const char *name;
+       size_t struct_size;
+       ndr_push_flags_fn_t ndr_push;
+       ndr_pull_flags_fn_t ndr_pull;
+       ndr_print_function_t ndr_print;
+       BOOL async;
+};
+
 /* FIXME: Use represent_as instead */
 struct dom_sid;
 NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
index a687df86b08e00129e564db6795f4ef49cd19281..1560719bb815edaed0d33d660be16428c3048470 100644 (file)
@@ -1317,7 +1317,7 @@ struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p,
                                                TALLOC_CTX *mem_ctx, 
                                                void *r)
 {
-       const struct dcerpc_interface_call *call;
+       const struct ndr_interface_call *call;
        struct ndr_push *push;
        NTSTATUS status;
        DATA_BLOB request;
@@ -1391,7 +1391,7 @@ _PUBLIC_ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req)
        void *r = req->ndr.struct_ptr;
        uint32_t opnum = req->ndr.opnum;
        const struct dcerpc_interface_table *table = req->ndr.table;
-       const struct dcerpc_interface_call *call = &table->calls[opnum];
+       const struct ndr_interface_call *call = &table->calls[opnum];
 
        /* make sure the recv code doesn't free the request, as we
           need to grab the flags element before it is freed */
index 362c0f9c251b02fe6dccbbefa57b3f0cbd63e9ef..29f1ad013cc664e0da5f87b5e654da5374088527 100644 (file)
@@ -158,18 +158,6 @@ struct dcerpc_pipe {
 /* this triggers the DCERPC_PFC_FLAG_CONC_MPX flag in the bind request */
 #define DCERPC_CONCURRENT_MULTIPLEX     (1<<19)
 
-/*
-  this is used to find pointers to calls
-*/
-struct dcerpc_interface_call {
-       const char *name;
-       size_t struct_size;
-       ndr_push_flags_fn_t ndr_push;
-       ndr_pull_flags_fn_t ndr_pull;
-       ndr_print_function_t ndr_print;
-       BOOL async;
-};
-
 struct dcerpc_endpoint_list {
        uint32_t count;
        const char * const *names;
@@ -185,7 +173,7 @@ struct dcerpc_interface_table {
        struct ndr_syntax_id syntax_id;
        const char *helpstring;
        uint32_t num_calls;
-       const struct dcerpc_interface_call *calls;
+       const struct ndr_interface_call *calls;
        const struct dcerpc_endpoint_list *endpoints;
        const struct dcerpc_authservice_list *authservices;
 };
index 3e18a66af5def17d513231ba8304226a7c62ab6b..684dd3d56bcae16cc14c1496b7a7163bce8bfa39 100644 (file)
@@ -33,8 +33,8 @@
 /*
   find a dcerpc call on an interface by name
 */
-const struct dcerpc_interface_call *dcerpc_iface_find_call(const struct dcerpc_interface_table *iface,
-                                                          const char *name)
+const struct ndr_interface_call *dcerpc_iface_find_call(const struct dcerpc_interface_table *iface,
+                                                       const char *name)
 {
        int i;
        for (i=0;i<iface->num_calls;i++) {
index 6616ba0778443d7cb61041fe9b4994af23261a7e..b7db31733c0a73279c402eda7e11d81297c5d27e 100644 (file)
@@ -27,7 +27,7 @@
 #include "librpc/rpc/dcerpc_table.h"
 #endif
 
-static const struct dcerpc_interface_call *find_function(
+static const struct ndr_interface_call *find_function(
        const struct dcerpc_interface_table *p,
        const char *function)
 {
@@ -133,7 +133,7 @@ const struct dcerpc_interface_table *load_iface_from_plugin(const char *plugin,
  int main(int argc, const char *argv[])
 {
        const struct dcerpc_interface_table *p = NULL;
-       const struct dcerpc_interface_call *f;
+       const struct ndr_interface_call *f;
        const char *pipe_name, *function, *inout, *filename;
        uint8_t *data;
        size_t size;
index 73ff28eed02b592a503f9e0f33417b2aa629daac..51273104aa08c5320e31855659a03ed56be5de6d 100644 (file)
@@ -2281,7 +2281,7 @@ sub FunctionTable($$)
        return if ($#{$interface->{FUNCTIONS}}+1 == 0);
        return unless defined ($interface->{PROPERTIES}->{uuid});
 
-       $self->pidl("static const struct dcerpc_interface_call $interface->{NAME}\_calls[] = {");
+       $self->pidl("static const struct ndr_interface_call $interface->{NAME}\_calls[] = {");
        foreach my $d (@{$interface->{FUNCTIONS}}) {
                next if not defined($d->{OPNUM});
                $self->pidl("\t{");
index 2071aa219916d3bc03e610cb4701d96cc0c6cfd1..4e65684c22335e2091e594c4ad2f3371caeaa049 100644 (file)
@@ -156,7 +156,7 @@ static NTSTATUS remote_op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CT
        struct dcesrv_remote_private *private = dce_call->context->private;
        uint16_t opnum = dce_call->pkt.u.request.opnum;
        const struct dcerpc_interface_table *table = dce_call->context->iface->private;
-       const struct dcerpc_interface_call *call;
+       const struct ndr_interface_call *call;
        const char *name;
 
        name = table->calls[opnum].name;
index 8fdb7d1414ac467ae8e5593b2027acab24582031..854a42e5fbadd13c88e7db5d821aaddcc02b79fb 100644 (file)
@@ -182,7 +182,7 @@ static int ejs_irpc_call(int eid, struct MprVar *io,
        NTSTATUS status;
        void *ptr;
        struct ejs_rpc *ejs;
-       const struct dcerpc_interface_call *call;
+       const struct ndr_interface_call *call;
        struct ejs_irpc_connection *p;
        struct irpc_request **reqs;
        int i, count;
@@ -285,7 +285,7 @@ done:
        void *ptr;
        struct rpc_request *req;
        struct ejs_rpc *ejs;
-       const struct dcerpc_interface_call *call;
+       const struct ndr_interface_call *call;
 
        if (argc != 1 || argv[0]->type != MPR_TYPE_OBJECT) {
                ejsSetErrorMsg(eid, "rpc_call invalid arguments");