diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-08-19 20:46:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:02:12 -0500 |
commit | b8cdadced4d2a26a63b8bbe397c12df949783ed4 (patch) | |
tree | 4d84ee7ca1faf790f347ebbbc172eef3b48dac78 | |
parent | 6b62f15ce7ffc6f47bf61a9b87b2b892da3c3f2b (diff) | |
download | samba-b8cdadced4d2a26a63b8bbe397c12df949783ed4.tar.gz samba-b8cdadced4d2a26a63b8bbe397c12df949783ed4.tar.bz2 samba-b8cdadced4d2a26a63b8bbe397c12df949783ed4.zip |
r24551: rename dcerpc_interface_table -> ndr_interface_table
rename dcerpc_interface_list -> ndr_interface_list
and move them to libndr.h
metze
(This used to be commit 4adbebef5df2f833d2d4bfcdda72a34179d52f5c)
28 files changed, 110 insertions, 110 deletions
diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h index b8081b544d..2f75857e06 100644 --- a/source4/lib/messaging/irpc.h +++ b/source4/lib/messaging/irpc.h @@ -62,7 +62,7 @@ typedef NTSTATUS (*irpc_function_t)(struct irpc_message *, void *r); */ struct irpc_request { struct messaging_context *msg_ctx; - const struct dcerpc_interface_table *table; + const struct ndr_interface_table *table; int callnum; int callid; void *r; @@ -103,16 +103,16 @@ void messaging_deregister(struct messaging_context *msg, uint32_t msg_type, void NTSTATUS irpc_register(struct messaging_context *msg_ctx, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, int call, irpc_function_t fn, void *private); struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx, struct server_id server_id, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, int callnum, void *r, TALLOC_CTX *ctx); NTSTATUS irpc_call_recv(struct irpc_request *irpc); NTSTATUS irpc_call(struct messaging_context *msg_ctx, struct server_id server_id, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, int callnum, void *r, TALLOC_CTX *ctx); NTSTATUS irpc_add_name(struct messaging_context *msg_ctx, const char *name); diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 2a5c941584..24b5ff408d 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -620,7 +620,7 @@ struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx, struct irpc_list { struct irpc_list *next, *prev; struct GUID uuid; - const struct dcerpc_interface_table *table; + const struct ndr_interface_table *table; int callnum; irpc_function_t fn; void *private; @@ -631,7 +631,7 @@ struct irpc_list { register a irpc server function */ NTSTATUS irpc_register(struct messaging_context *msg_ctx, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, int callnum, irpc_function_t fn, void *private) { struct irpc_list *irpc; @@ -843,7 +843,7 @@ static void irpc_timeout(struct event_context *ev, struct timed_event *te, */ struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx, struct server_id server_id, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, int callnum, void *r, TALLOC_CTX *ctx) { struct irpc_header header; @@ -933,7 +933,7 @@ NTSTATUS irpc_call_recv(struct irpc_request *irpc) */ NTSTATUS irpc_call(struct messaging_context *msg_ctx, struct server_id server_id, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, int callnum, void *r, TALLOC_CTX *mem_ctx) { diff --git a/source4/libnet/libnet_rpc.h b/source4/libnet/libnet_rpc.h index 8aaf0e8011..b3e1620c75 100644 --- a/source4/libnet/libnet_rpc.h +++ b/source4/libnet/libnet_rpc.h @@ -44,7 +44,7 @@ struct libnet_RpcConnect { const char *name; const char *address; const char *binding; - const struct dcerpc_interface_table *dcerpc_iface; + const struct ndr_interface_table *dcerpc_iface; } in; struct { struct dcerpc_pipe *dcerpc_pipe; diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h index c49165e8cb..e44b12746d 100644 --- a/source4/librpc/ndr/libndr.h +++ b/source4/librpc/ndr/libndr.h @@ -304,6 +304,21 @@ struct ndr_interface_string_array { const char * const *names; }; +struct ndr_interface_table { + const char *name; + struct ndr_syntax_id syntax_id; + const char *helpstring; + uint32_t num_calls; + const struct ndr_interface_call *calls; + const struct ndr_interface_string_array *endpoints; + const struct ndr_interface_string_array *authservices; +}; + +struct ndr_interface_list { + struct ndr_interface_list *prev, *next; + const struct ndr_interface_table *table; +}; + /* 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); diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 1560719bb8..ed9eb7da78 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -1312,7 +1312,7 @@ static NTSTATUS dcerpc_ndr_validate_out(struct dcerpc_connection *c, */ struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p, const struct GUID *object, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, uint32_t opnum, TALLOC_CTX *mem_ctx, void *r) @@ -1390,7 +1390,7 @@ _PUBLIC_ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req) TALLOC_CTX *mem_ctx = req->ndr.mem_ctx; void *r = req->ndr.struct_ptr; uint32_t opnum = req->ndr.opnum; - const struct dcerpc_interface_table *table = req->ndr.table; + const struct ndr_interface_table *table = req->ndr.table; const struct ndr_interface_call *call = &table->calls[opnum]; /* make sure the recv code doesn't free the request, as we @@ -1469,7 +1469,7 @@ _PUBLIC_ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req) */ NTSTATUS dcerpc_ndr_request(struct dcerpc_pipe *p, const struct GUID *object, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, uint32_t opnum, TALLOC_CTX *mem_ctx, void *r) diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h index 3be0ba7731..88b6ff20c2 100644 --- a/source4/librpc/rpc/dcerpc.h +++ b/source4/librpc/rpc/dcerpc.h @@ -158,21 +158,6 @@ struct dcerpc_pipe { /* this triggers the DCERPC_PFC_FLAG_CONC_MPX flag in the bind request */ #define DCERPC_CONCURRENT_MULTIPLEX (1<<19) -struct dcerpc_interface_table { - const char *name; - struct ndr_syntax_id syntax_id; - const char *helpstring; - uint32_t num_calls; - const struct ndr_interface_call *calls; - const struct ndr_interface_string_array *endpoints; - const struct ndr_interface_string_array *authservices; -}; - -struct dcerpc_interface_list { - struct dcerpc_interface_list *prev, *next; - const struct dcerpc_interface_table *table; -}; - /* this describes a binding to a particular transport/pipe */ struct dcerpc_binding { enum dcerpc_transport_t transport; @@ -190,7 +175,7 @@ struct dcerpc_pipe_connect { struct dcerpc_pipe *pipe; struct dcerpc_binding *binding; const char *pipe_name; - const struct dcerpc_interface_table *interface; + const struct ndr_interface_table *interface; struct cli_credentials *creds; }; @@ -227,7 +212,7 @@ struct rpc_request { /* use by the ndr level async recv call */ struct { - const struct dcerpc_interface_table *table; + const struct ndr_interface_table *table; uint32_t opnum; void *struct_ptr; TALLOC_CTX *mem_ctx; diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c index 8298b1ecbe..756cb58e3a 100644 --- a/source4/librpc/rpc/dcerpc_auth.c +++ b/source4/librpc/rpc/dcerpc_auth.c @@ -29,7 +29,7 @@ /* return the rpc syntax and transfer syntax given the pipe uuid and version */ -static NTSTATUS dcerpc_init_syntaxes(const struct dcerpc_interface_table *table, +static NTSTATUS dcerpc_init_syntaxes(const struct ndr_interface_table *table, struct ndr_syntax_id *syntax, struct ndr_syntax_id *transfer_syntax) { @@ -47,7 +47,7 @@ static NTSTATUS dcerpc_init_syntaxes(const struct dcerpc_interface_table *table, */ struct composite_context *dcerpc_bind_auth_none_send(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *p, - const struct dcerpc_interface_table *table) + const struct ndr_interface_table *table) { struct ndr_syntax_id syntax; struct ndr_syntax_id transfer_syntax; @@ -86,7 +86,7 @@ NTSTATUS dcerpc_bind_auth_none_recv(struct composite_context *ctx) Perform sync non-authenticated dcerpc bind */ NTSTATUS dcerpc_bind_auth_none(struct dcerpc_pipe *p, - const struct dcerpc_interface_table *table) + const struct ndr_interface_table *table) { struct composite_context *ctx; @@ -209,7 +209,7 @@ static void bind_auth_recv_bindreply(struct composite_context *creq) struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *p, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct cli_credentials *credentials, uint8_t auth_type, uint8_t auth_level, const char *service) @@ -370,7 +370,7 @@ NTSTATUS dcerpc_bind_auth_recv(struct composite_context *creq) */ NTSTATUS dcerpc_bind_auth(struct dcerpc_pipe *p, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct cli_credentials *credentials, uint8_t auth_type, uint8_t auth_level, const char *service) diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c index 3e49e6972b..710474ce3b 100644 --- a/source4/librpc/rpc/dcerpc_connect.c +++ b/source4/librpc/rpc/dcerpc_connect.c @@ -459,7 +459,7 @@ static NTSTATUS dcerpc_pipe_connect_ncalrpc_recv(struct composite_context *c) struct pipe_connect_state { struct dcerpc_pipe *pipe; struct dcerpc_binding *binding; - const struct dcerpc_interface_table *table; + const struct ndr_interface_table *table; struct cli_credentials *credentials; }; @@ -693,7 +693,7 @@ static void dcerpc_connect_timeout_handler(struct event_context *ev, struct time */ struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent_ctx, struct dcerpc_binding *binding, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct cli_credentials *credentials, struct event_context *ev) { @@ -781,7 +781,7 @@ NTSTATUS dcerpc_pipe_connect_b_recv(struct composite_context *c, TALLOC_CTX *mem NTSTATUS dcerpc_pipe_connect_b(TALLOC_CTX *parent_ctx, struct dcerpc_pipe **pp, struct dcerpc_binding *binding, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct cli_credentials *credentials, struct event_context *ev) { @@ -808,7 +808,7 @@ static void continue_pipe_connect_b(struct composite_context *ctx); */ struct composite_context* dcerpc_pipe_connect_send(TALLOC_CTX *parent_ctx, const char *binding, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct cli_credentials *credentials, struct event_context *ev) { @@ -904,7 +904,7 @@ NTSTATUS dcerpc_pipe_connect_recv(struct composite_context *c, NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx, struct dcerpc_pipe **pp, const char *binding, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct cli_credentials *credentials, struct event_context *ev) { diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c index 611c2a6bca..2d43c96d3c 100644 --- a/source4/librpc/rpc/dcerpc_schannel.c +++ b/source4/librpc/rpc/dcerpc_schannel.c @@ -285,7 +285,7 @@ NTSTATUS dcerpc_schannel_key_recv(struct composite_context *c) struct auth_schannel_state { struct dcerpc_pipe *pipe; struct cli_credentials *credentials; - const struct dcerpc_interface_table *table; + const struct ndr_interface_table *table; uint8_t auth_level; }; @@ -344,7 +344,7 @@ static void continue_bind_auth(struct composite_context *ctx) */ struct composite_context *dcerpc_bind_auth_schannel_send(TALLOC_CTX *tmp_ctx, struct dcerpc_pipe *p, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct cli_credentials *credentials, uint8_t auth_level) { @@ -392,7 +392,7 @@ NTSTATUS dcerpc_bind_auth_schannel_recv(struct composite_context *c) */ NTSTATUS dcerpc_bind_auth_schannel(TALLOC_CTX *tmp_ctx, struct dcerpc_pipe *p, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct cli_credentials *credentials, uint8_t auth_level) { diff --git a/source4/librpc/rpc/dcerpc_secondary.c b/source4/librpc/rpc/dcerpc_secondary.c index 685055d957..2e6311adbd 100644 --- a/source4/librpc/rpc/dcerpc_secondary.c +++ b/source4/librpc/rpc/dcerpc_secondary.c @@ -222,7 +222,7 @@ NTSTATUS dcerpc_secondary_connection(struct dcerpc_pipe *p, struct sec_auth_conn_state { struct dcerpc_pipe *pipe2; struct dcerpc_binding *binding; - const struct dcerpc_interface_table *table; + const struct ndr_interface_table *table; struct cli_credentials *credentials; struct composite_context *ctx; }; @@ -232,7 +232,7 @@ static void dcerpc_secondary_auth_connection_continue(struct composite_context * struct composite_context* dcerpc_secondary_auth_connection_send(struct dcerpc_pipe *p, struct dcerpc_binding *binding, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct cli_credentials *credentials) { diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index 684dd3d56b..bb2d332c0b 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -33,7 +33,7 @@ /* find a dcerpc call on an interface by name */ -const struct ndr_interface_call *dcerpc_iface_find_call(const struct dcerpc_interface_table *iface, +const struct ndr_interface_call *dcerpc_iface_find_call(const struct ndr_interface_table *iface, const char *name) { int i; @@ -770,7 +770,7 @@ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding * struct epm_map_binding_state { struct dcerpc_binding *binding; - const struct dcerpc_interface_table *table; + const struct ndr_interface_table *table; struct dcerpc_pipe *pipe; struct policy_handle handle; struct GUID guid; @@ -871,7 +871,7 @@ static void continue_epm_map(struct rpc_request *req) */ struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct event_context *ev) { struct composite_context *c; @@ -981,7 +981,7 @@ NTSTATUS dcerpc_epm_map_binding_recv(struct composite_context *c) Get endpoint mapping for rpc connection */ NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, - const struct dcerpc_interface_table *table, struct event_context *ev) + const struct ndr_interface_table *table, struct event_context *ev) { struct composite_context *c; @@ -993,7 +993,7 @@ NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *bind struct pipe_auth_state { struct dcerpc_pipe *pipe; struct dcerpc_binding *binding; - const struct dcerpc_interface_table *table; + const struct ndr_interface_table *table; struct cli_credentials *credentials; }; @@ -1156,7 +1156,7 @@ static void continue_auth_none(struct composite_context *ctx) */ struct composite_context *dcerpc_pipe_auth_send(struct dcerpc_pipe *p, struct dcerpc_binding *binding, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct cli_credentials *credentials) { struct composite_context *c; @@ -1298,7 +1298,7 @@ NTSTATUS dcerpc_pipe_auth_recv(struct composite_context *c, TALLOC_CTX *mem_ctx, NTSTATUS dcerpc_pipe_auth(TALLOC_CTX *mem_ctx, struct dcerpc_pipe **p, struct dcerpc_binding *binding, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, struct cli_credentials *credentials) { struct composite_context *c; @@ -1333,7 +1333,7 @@ NTSTATUS dcerpc_fetch_session_key(struct dcerpc_pipe *p, this triggers on a debug level of >= 10 */ -void dcerpc_log_packet(const struct dcerpc_interface_table *ndr, +void dcerpc_log_packet(const struct ndr_interface_table *ndr, uint32_t opnum, uint32_t flags, DATA_BLOB *pkt) { const int num_examples = 20; @@ -1369,7 +1369,7 @@ void dcerpc_log_packet(const struct dcerpc_interface_table *ndr, */ NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p, struct dcerpc_pipe **pp2, - const struct dcerpc_interface_table *table) + const struct ndr_interface_table *table) { NTSTATUS status; struct dcerpc_pipe *p2; diff --git a/source4/librpc/rpc/table.c b/source4/librpc/rpc/table.c index 39ec3e64f5..e08d670c99 100644 --- a/source4/librpc/rpc/table.c +++ b/source4/librpc/rpc/table.c @@ -25,14 +25,14 @@ #include "librpc/rpc/dcerpc.h" #include "librpc/rpc/dcerpc_table.h" -struct dcerpc_interface_list *dcerpc_pipes = NULL; +struct ndr_interface_list *dcerpc_pipes = NULL; /* register a dcerpc client interface */ -NTSTATUS librpc_register_interface(const struct dcerpc_interface_table *interface) +NTSTATUS librpc_register_interface(const struct ndr_interface_table *interface) { - struct dcerpc_interface_list *l; + struct ndr_interface_list *l; for (l = dcerpc_pipes; l; l = l->next) { if (GUID_equal(&interface->syntax_id.uuid, &l->table->syntax_id.uuid)) { @@ -43,7 +43,7 @@ NTSTATUS librpc_register_interface(const struct dcerpc_interface_table *interfac } } - l = talloc(talloc_autofree_context(), struct dcerpc_interface_list); + l = talloc(talloc_autofree_context(), struct ndr_interface_list); l->table = interface; DLIST_ADD(dcerpc_pipes, l); @@ -56,7 +56,7 @@ NTSTATUS librpc_register_interface(const struct dcerpc_interface_table *interfac */ const char *idl_pipe_name(const struct GUID *uuid, uint32_t if_version) { - const struct dcerpc_interface_list *l; + const struct ndr_interface_list *l; for (l=librpc_dcerpc_pipes();l;l=l->next) { if (GUID_equal(&l->table->syntax_id.uuid, uuid) && l->table->syntax_id.if_version == if_version) { @@ -71,7 +71,7 @@ const char *idl_pipe_name(const struct GUID *uuid, uint32_t if_version) */ int idl_num_calls(const struct GUID *uuid, uint32_t if_version) { - const struct dcerpc_interface_list *l; + const struct ndr_interface_list *l; for (l=librpc_dcerpc_pipes();l;l=l->next){ if (GUID_equal(&l->table->syntax_id.uuid, uuid) && l->table->syntax_id.if_version == if_version) { @@ -85,9 +85,9 @@ int idl_num_calls(const struct GUID *uuid, uint32_t if_version) /* find a dcerpc interface by name */ -const struct dcerpc_interface_table *idl_iface_by_name(const char *name) +const struct ndr_interface_table *idl_iface_by_name(const char *name) { - const struct dcerpc_interface_list *l; + const struct ndr_interface_list *l; for (l=librpc_dcerpc_pipes();l;l=l->next) { if (strcasecmp(l->table->name, name) == 0) { return l->table; @@ -99,9 +99,9 @@ const struct dcerpc_interface_table *idl_iface_by_name(const char *name) /* find a dcerpc interface by uuid */ -const struct dcerpc_interface_table *idl_iface_by_uuid(const struct GUID *uuid) +const struct ndr_interface_table *idl_iface_by_uuid(const struct GUID *uuid) { - const struct dcerpc_interface_list *l; + const struct ndr_interface_list *l; for (l=librpc_dcerpc_pipes();l;l=l->next) { if (GUID_equal(&l->table->syntax_id.uuid, uuid)) { return l->table; @@ -113,7 +113,7 @@ const struct dcerpc_interface_table *idl_iface_by_uuid(const struct GUID *uuid) /* return the list of registered dcerpc_pipes */ -const struct dcerpc_interface_list *librpc_dcerpc_pipes(void) +const struct ndr_interface_list *librpc_dcerpc_pipes(void) { return dcerpc_pipes; } diff --git a/source4/librpc/tables.pl b/source4/librpc/tables.pl index 9ad0675cb2..946159c6f0 100644 --- a/source4/librpc/tables.pl +++ b/source4/librpc/tables.pl @@ -51,7 +51,7 @@ sub process_file($) my $found = 0; while (my $line = <FILE>) { - if ($line =~ /extern const struct dcerpc_interface_table (\w+);/) { + if ($line =~ /extern const struct ndr_interface_table (\w+);/) { $found = 1; $init_fns.="\tstatus = librpc_register_interface(&$1);\n"; $init_fns.="\tif (NT_STATUS_IS_ERR(status)) return status;\n\n"; diff --git a/source4/librpc/tools/ndrdump.c b/source4/librpc/tools/ndrdump.c index b7db31733c..966ca9b98d 100644 --- a/source4/librpc/tools/ndrdump.c +++ b/source4/librpc/tools/ndrdump.c @@ -28,7 +28,7 @@ #endif static const struct ndr_interface_call *find_function( - const struct dcerpc_interface_table *p, + const struct ndr_interface_table *p, const char *function) { int i; @@ -52,7 +52,7 @@ static const struct ndr_interface_call *find_function( static void show_pipes(void) { - const struct dcerpc_interface_list *l; + const struct ndr_interface_list *l; printf("\nYou must specify a pipe\n"); printf("known pipes are:\n"); for (l=librpc_dcerpc_pipes();l;l=l->next) { @@ -67,7 +67,7 @@ static void show_pipes(void) #endif -static void show_functions(const struct dcerpc_interface_table *p) +static void show_functions(const struct ndr_interface_table *p) { int i; printf("\nYou must specify a function\n"); @@ -104,9 +104,9 @@ static char *stdin_load(TALLOC_CTX *mem_ctx, size_t *size) return result; } -const struct dcerpc_interface_table *load_iface_from_plugin(const char *plugin, const char *pipe_name) +const struct ndr_interface_table *load_iface_from_plugin(const char *plugin, const char *pipe_name) { - const struct dcerpc_interface_table *p; + const struct ndr_interface_table *p; void *handle; char *symbol; @@ -132,7 +132,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 ndr_interface_table *p = NULL; const struct ndr_interface_call *f; const char *pipe_name, *function, *inout, *filename; uint8_t *data; diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm index 3b12c8f173..bf8ac300ac 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm @@ -74,7 +74,7 @@ sub ParseInterface($) $res_hdr .= "#define _HEADER_RPC_$interface->{NAME}\n\n"; if (defined $interface->{PROPERTIES}->{uuid}) { - $res_hdr .= "extern const struct dcerpc_interface_table dcerpc_table_$interface->{NAME};\n"; + $res_hdr .= "extern const struct ndr_interface_table dcerpc_table_$interface->{NAME};\n"; } $res .= "/* $interface->{NAME} - client functions generated by pidl */\n\n"; diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 1e701b9a0e..91ceed1e62 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -2333,7 +2333,7 @@ sub FunctionTable($$) $self->pidl("};"); $self->pidl(""); - $self->pidl("\nconst struct dcerpc_interface_table dcerpc_table_$interface->{NAME} = {"); + $self->pidl("\nconst struct ndr_interface_table dcerpc_table_$interface->{NAME} = {"); $self->pidl("\t.name\t\t= \"$interface->{NAME}\","); $self->pidl("\t.syntax_id\t= {"); $self->pidl("\t\t" . print_uuid($interface->{UUID}) .","); @@ -2406,7 +2406,7 @@ sub HeaderInterface($$) if(!defined $interface->{PROPERTIES}->{helpstring}) { $interface->{PROPERTIES}->{helpstring} = "NULL"; } $self->pidl_hdr("#define DCERPC_$name\_HELPSTRING $interface->{PROPERTIES}->{helpstring}"); - $self->pidl_hdr("extern const struct dcerpc_interface_table dcerpc_table_$interface->{NAME};"); + $self->pidl_hdr("extern const struct ndr_interface_table dcerpc_table_$interface->{NAME};"); $self->pidl_hdr("NTSTATUS dcerpc_server_$interface->{NAME}_init(void);"); } diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c index 4e65684c22..9a929e951c 100644 --- a/source4/rpc_server/remote/dcesrv_remote.c +++ b/source4/rpc_server/remote/dcesrv_remote.c @@ -37,7 +37,7 @@ static NTSTATUS remote_op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX * static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface) { NTSTATUS status; - const struct dcerpc_interface_table *table; + const struct ndr_interface_table *table; struct dcesrv_remote_private *private; const char *binding = lp_parm_string(-1, "dcerpc_remote", "binding"); const char *user, *pass, *domain; @@ -124,7 +124,7 @@ static void remote_op_unbind(struct dcesrv_connection_context *context, const st static NTSTATUS remote_op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r) { NTSTATUS status; - const struct dcerpc_interface_table *table = dce_call->context->iface->private; + const struct ndr_interface_table *table = dce_call->context->iface->private; uint16_t opnum = dce_call->pkt.u.request.opnum; dce_call->fault_code = 0; @@ -155,7 +155,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 ndr_interface_table *table = dce_call->context->iface->private; const struct ndr_interface_call *call; const char *name; @@ -188,7 +188,7 @@ static NTSTATUS remote_op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CT static NTSTATUS remote_op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r) { NTSTATUS status; - const struct dcerpc_interface_table *table = dce_call->context->iface->private; + const struct ndr_interface_table *table = dce_call->context->iface->private; uint16_t opnum = dce_call->pkt.u.request.opnum; /* unravel the NDR for the packet */ @@ -204,7 +204,7 @@ static NTSTATUS remote_op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CT static NTSTATUS remote_register_one_iface(struct dcesrv_context *dce_ctx, const struct dcesrv_interface *iface) { int i; - const struct dcerpc_interface_table *table = iface->private; + const struct ndr_interface_table *table = iface->private; for (i=0;i<table->endpoints->count;i++) { NTSTATUS ret; @@ -252,7 +252,7 @@ static NTSTATUS remote_op_init_server(struct dcesrv_context *dce_ctx, const stru return NT_STATUS_OK; } -static BOOL remote_fill_interface(struct dcesrv_interface *iface, const struct dcerpc_interface_table *if_tabl) +static BOOL remote_fill_interface(struct dcesrv_interface *iface, const struct ndr_interface_table *if_tabl) { iface->name = if_tabl->name; iface->syntax_id = if_tabl->syntax_id; @@ -272,7 +272,7 @@ static BOOL remote_fill_interface(struct dcesrv_interface *iface, const struct d static BOOL remote_op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version) { - const struct dcerpc_interface_list *l; + const struct ndr_interface_list *l; for (l=librpc_dcerpc_pipes();l;l=l->next) { if (l->table->syntax_id.if_version == if_version && @@ -286,7 +286,7 @@ static BOOL remote_op_interface_by_uuid(struct dcesrv_interface *iface, const st static BOOL remote_op_interface_by_name(struct dcesrv_interface *iface, const char *name) { - const struct dcerpc_interface_table *tbl = idl_iface_by_name(name); + const struct ndr_interface_table *tbl = idl_iface_by_name(name); if (tbl) return remote_fill_interface(iface, tbl); diff --git a/source4/scripting/ejs/ejsrpc.h b/source4/scripting/ejs/ejsrpc.h index 4c7e5d9ee5..3bfb666dec 100644 --- a/source4/scripting/ejs/ejsrpc.h +++ b/source4/scripting/ejs/ejsrpc.h @@ -42,7 +42,7 @@ NTSTATUS smbcalls_register_ejs(const char *name, MprCFunction fn); int ejs_rpc_call(int eid, int argc, struct MprVar **argv, - const struct dcerpc_interface_table *iface, int callnum, + const struct ndr_interface_table *iface, int callnum, ejs_pull_function_t ejs_pull, ejs_push_function_t ejs_push); NTSTATUS ejs_pull_struct_start(struct ejs_rpc *ejs, struct MprVar **v, const char *name); diff --git a/source4/scripting/ejs/smbcalls_rpc.c b/source4/scripting/ejs/smbcalls_rpc.c index 854a42e5fb..995760bfe1 100644 --- a/source4/scripting/ejs/smbcalls_rpc.c +++ b/source4/scripting/ejs/smbcalls_rpc.c @@ -110,7 +110,7 @@ static int ejs_irpc_connect(MprVarHandle eid, int argc, char **argv) static int ejs_rpc_connect(MprVarHandle eid, int argc, char **argv) { const char *binding, *pipe_name; - const struct dcerpc_interface_table *iface; + const struct ndr_interface_table *iface; NTSTATUS status; struct dcerpc_pipe *p; struct cli_credentials *creds; @@ -176,7 +176,7 @@ done: make an irpc call - called via the same interface as rpc */ static int ejs_irpc_call(int eid, struct MprVar *io, - const struct dcerpc_interface_table *iface, int callnum, + const struct ndr_interface_table *iface, int callnum, ejs_pull_function_t ejs_pull, ejs_push_function_t ejs_push) { NTSTATUS status; @@ -276,7 +276,7 @@ done: code */ int ejs_rpc_call(int eid, int argc, struct MprVar **argv, - const struct dcerpc_interface_table *iface, int callnum, + const struct ndr_interface_table *iface, int callnum, ejs_pull_function_t ejs_pull, ejs_push_function_t ejs_push) { struct MprVar *io; diff --git a/source4/torture/libnet/libnet_rpc.c b/source4/torture/libnet/libnet_rpc.c index 08f5032599..cfcee39c8e 100644 --- a/source4/torture/libnet/libnet_rpc.c +++ b/source4/torture/libnet/libnet_rpc.c @@ -32,7 +32,7 @@ static BOOL test_connect_service(struct libnet_context *ctx, - const struct dcerpc_interface_table *iface, + const struct ndr_interface_table *iface, const char *binding_string, const char *hostname, const enum libnet_RpcConnect_level level, diff --git a/source4/torture/rpc/alter_context.c b/source4/torture/rpc/alter_context.c index a78cd38893..c61954f268 100644 --- a/source4/torture/rpc/alter_context.c +++ b/source4/torture/rpc/alter_context.c @@ -33,7 +33,7 @@ BOOL torture_rpc_alter_context(struct torture_context *torture) TALLOC_CTX *mem_ctx; BOOL ret = True; struct policy_handle *handle; - struct dcerpc_interface_table tmptbl; + struct ndr_interface_table tmptbl; struct ndr_syntax_id syntax; struct ndr_syntax_id transfer_syntax; diff --git a/source4/torture/rpc/async_bind.c b/source4/torture/rpc/async_bind.c index 36b0756208..585266219c 100644 --- a/source4/torture/rpc/async_bind.c +++ b/source4/torture/rpc/async_bind.c @@ -47,7 +47,7 @@ BOOL torture_async_bind(struct torture_context *torture) struct composite_context **bind_req; struct dcerpc_pipe **pipe; - const struct dcerpc_interface_table **table; + const struct ndr_interface_table **table; if (!torture_setting_bool(torture, "async", False)) { printf("async bind test disabled - enable async tests to use\n"); @@ -64,7 +64,7 @@ BOOL torture_async_bind(struct torture_context *torture) if (bind_req == NULL) return False; pipe = talloc_array(torture, struct dcerpc_pipe*, torture_numasync); if (pipe == NULL) return False; - table = talloc_array(torture, const struct dcerpc_interface_table*, torture_numasync); + table = talloc_array(torture, const struct ndr_interface_table*, torture_numasync); if (table == NULL) return False; /* credentials */ diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c index 28b45560f6..d6011265e7 100644 --- a/source4/torture/rpc/autoidl.c +++ b/source4/torture/rpc/autoidl.c @@ -89,7 +89,7 @@ static void fill_blob_handle(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, static void reopen(TALLOC_CTX *mem_ctx, struct dcerpc_pipe **p, - const struct dcerpc_interface_table *iface) + const struct ndr_interface_table *iface) { NTSTATUS status; @@ -111,10 +111,10 @@ static void print_depth(int depth) } } -static void test_ptr_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table *iface, +static void test_ptr_scan(TALLOC_CTX *mem_ctx, const struct ndr_interface_table *iface, int opnum, DATA_BLOB *base_in, int min_ofs, int max_ofs, int depth); -static void try_expand(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table *iface, +static void try_expand(TALLOC_CTX *mem_ctx, const struct ndr_interface_table *iface, int opnum, DATA_BLOB *base_in, int insert_ofs, int depth) { DATA_BLOB stub_in, stub_out; @@ -156,7 +156,7 @@ static void try_expand(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table } -static void test_ptr_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table *iface, +static void test_ptr_scan(TALLOC_CTX *mem_ctx, const struct ndr_interface_table *iface, int opnum, DATA_BLOB *base_in, int min_ofs, int max_ofs, int depth) { DATA_BLOB stub_in, stub_out; @@ -196,7 +196,7 @@ static void test_ptr_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_tab } -static void test_scan_call(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table *iface, int opnum) +static void test_scan_call(TALLOC_CTX *mem_ctx, const struct ndr_interface_table *iface, int opnum) { DATA_BLOB stub_in, stub_out; int i; @@ -254,7 +254,7 @@ static void test_scan_call(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_ta } -static void test_auto_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table *iface) +static void test_auto_scan(TALLOC_CTX *mem_ctx, const struct ndr_interface_table *iface) { test_scan_call(mem_ctx, iface, 2); } @@ -262,7 +262,7 @@ static void test_auto_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_ta BOOL torture_rpc_autoidl(struct torture_context *torture) { TALLOC_CTX *mem_ctx; - const struct dcerpc_interface_table *iface; + const struct ndr_interface_table *iface; iface = idl_iface_by_name("drsuapi"); if (!iface) { diff --git a/source4/torture/rpc/countcalls.c b/source4/torture/rpc/countcalls.c index e081d0d625..e400fcdbe3 100644 --- a/source4/torture/rpc/countcalls.c +++ b/source4/torture/rpc/countcalls.c @@ -29,7 +29,7 @@ BOOL count_calls(TALLOC_CTX *mem_ctx, - const struct dcerpc_interface_table *iface, + const struct ndr_interface_table *iface, BOOL all) { struct dcerpc_pipe *p; @@ -102,10 +102,10 @@ BOOL count_calls(TALLOC_CTX *mem_ctx, BOOL torture_rpc_countcalls(struct torture_context *torture) { - const struct dcerpc_interface_table *iface; + const struct ndr_interface_table *iface; const char *iface_name; BOOL ret = True; - const struct dcerpc_interface_list *l; + const struct ndr_interface_list *l; TALLOC_CTX *mem_ctx = talloc_named(torture, 0, "torture_rpc_countcalls context"); if (!mem_ctx) { return False; diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c index 80388f319d..62150de33b 100644 --- a/source4/torture/rpc/mgmt.c +++ b/source4/torture/rpc/mgmt.c @@ -30,7 +30,7 @@ ask the server what interface IDs are available on this endpoint */ BOOL test_inq_if_ids(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, - BOOL (*per_id_test)(const struct dcerpc_interface_table *iface, + BOOL (*per_id_test)(const struct ndr_interface_table *iface, TALLOC_CTX *mem_ctx, struct ndr_syntax_id *id), const void *priv) @@ -194,7 +194,7 @@ BOOL torture_rpc_mgmt(struct torture_context *torture) TALLOC_CTX *mem_ctx, *loop_ctx; BOOL ret = True; const char *binding = torture_setting_string(torture, "binding", NULL); - const struct dcerpc_interface_list *l; + const struct ndr_interface_list *l; struct dcerpc_binding *b; mem_ctx = talloc_init("torture_rpc_mgmt"); diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c index 6f95e14301..dfb2e535aa 100644 --- a/source4/torture/rpc/rpc.c +++ b/source4/torture/rpc/rpc.c @@ -30,7 +30,7 @@ /* open a rpc connection to the chosen binding string */ _PUBLIC_ NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx, struct dcerpc_pipe **p, - const struct dcerpc_interface_table *table) + const struct ndr_interface_table *table) { NTSTATUS status; const char *binding = lp_parm_string(-1, "torture", "binding"); @@ -54,7 +54,7 @@ _PUBLIC_ NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx, /* open a rpc connection to a specific transport */ NTSTATUS torture_rpc_connection_transport(TALLOC_CTX *parent_ctx, struct dcerpc_pipe **p, - const struct dcerpc_interface_table *table, + const struct ndr_interface_table *table, enum dcerpc_transport_t transport, uint32_t assoc_group_id) { @@ -97,7 +97,7 @@ static bool torture_rpc_setup (struct torture_context *tctx, void **data) status = torture_rpc_connection(tctx, (struct dcerpc_pipe **)data, - (const struct dcerpc_interface_table *)tctx->active_tcase->data); + (const struct ndr_interface_table *)tctx->active_tcase->data); torture_assert_ntstatus_ok(tctx, status, "Error connecting to server"); @@ -112,7 +112,7 @@ static bool torture_rpc_teardown (struct torture_context *tcase, void *data) _PUBLIC_ struct torture_tcase *torture_suite_add_rpc_iface_tcase(struct torture_suite *suite, const char *name, - const struct dcerpc_interface_table *table) + const struct ndr_interface_table *table) { struct torture_tcase *tcase = torture_suite_add_tcase(suite, name); diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index 9e5eedab3a..f904d43ee4 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -1368,7 +1368,7 @@ BOOL torture_samba3_sessionkey(struct torture_context *torture) static NTSTATUS pipe_bind_smb(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree, const char *pipe_name, - const struct dcerpc_interface_table *iface, + const struct ndr_interface_table *iface, struct dcerpc_pipe **p) { struct dcerpc_pipe *result; diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c index 62de0a9e63..6dee60d599 100644 --- a/source4/torture/rpc/scanner.c +++ b/source4/torture/rpc/scanner.c @@ -28,7 +28,7 @@ /* work out how many calls there are for an interface */ -static BOOL test_num_calls(const struct dcerpc_interface_table *iface, +static BOOL test_num_calls(const struct ndr_interface_table *iface, TALLOC_CTX *mem_ctx, struct ndr_syntax_id *id) { @@ -37,7 +37,7 @@ static BOOL test_num_calls(const struct dcerpc_interface_table *iface, int i; DATA_BLOB stub_in, stub_out; int idl_calls; - struct dcerpc_interface_table tbl; + struct ndr_interface_table tbl; /* FIXME: This should be fixed when torture_rpc_connection * takes a ndr_syntax_id */ @@ -98,7 +98,7 @@ BOOL torture_rpc_scanner(struct torture_context *torture) struct dcerpc_pipe *p; TALLOC_CTX *mem_ctx, *loop_ctx; BOOL ret = True; - const struct dcerpc_interface_list *l; + const struct ndr_interface_list *l; const char *binding = torture_setting_string(torture, "binding", NULL); struct dcerpc_binding *b; |