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 | 4adbebef5df2f833d2d4bfcdda72a34179d52f5c (patch) | |
tree | 2c2633bbb48cfb53394e815bf48c384956474777 /source/librpc/rpc | |
parent | 473bca74dc9d9dc54a239c9b5d3dc5fcf5a117a9 (diff) | |
download | samba-4adbebef5df2f833d2d4bfcdda72a34179d52f5c.tar.gz |
r24551: rename dcerpc_interface_table -> ndr_interface_table
rename dcerpc_interface_list -> ndr_interface_list
and move them to libndr.h
metze
Diffstat (limited to 'source/librpc/rpc')
-rw-r--r-- | source/librpc/rpc/dcerpc.c | 6 | ||||
-rw-r--r-- | source/librpc/rpc/dcerpc.h | 19 | ||||
-rw-r--r-- | source/librpc/rpc/dcerpc_auth.c | 10 | ||||
-rw-r--r-- | source/librpc/rpc/dcerpc_connect.c | 10 | ||||
-rw-r--r-- | source/librpc/rpc/dcerpc_schannel.c | 6 | ||||
-rw-r--r-- | source/librpc/rpc/dcerpc_secondary.c | 4 | ||||
-rw-r--r-- | source/librpc/rpc/dcerpc_util.c | 18 | ||||
-rw-r--r-- | source/librpc/rpc/table.c | 22 |
8 files changed, 40 insertions, 55 deletions
diff --git a/source/librpc/rpc/dcerpc.c b/source/librpc/rpc/dcerpc.c index 1560719bb81..ed9eb7da78c 100644 --- a/source/librpc/rpc/dcerpc.c +++ b/source/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/source/librpc/rpc/dcerpc.h b/source/librpc/rpc/dcerpc.h index 3be0ba77316..88b6ff20c2a 100644 --- a/source/librpc/rpc/dcerpc.h +++ b/source/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/source/librpc/rpc/dcerpc_auth.c b/source/librpc/rpc/dcerpc_auth.c index 8298b1ecbec..756cb58e3a6 100644 --- a/source/librpc/rpc/dcerpc_auth.c +++ b/source/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/source/librpc/rpc/dcerpc_connect.c b/source/librpc/rpc/dcerpc_connect.c index 3e49e6972b1..710474ce3b1 100644 --- a/source/librpc/rpc/dcerpc_connect.c +++ b/source/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/source/librpc/rpc/dcerpc_schannel.c b/source/librpc/rpc/dcerpc_schannel.c index 611c2a6bca2..2d43c96d3cc 100644 --- a/source/librpc/rpc/dcerpc_schannel.c +++ b/source/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/source/librpc/rpc/dcerpc_secondary.c b/source/librpc/rpc/dcerpc_secondary.c index 685055d9572..2e6311adbda 100644 --- a/source/librpc/rpc/dcerpc_secondary.c +++ b/source/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/source/librpc/rpc/dcerpc_util.c b/source/librpc/rpc/dcerpc_util.c index 684dd3d56bc..bb2d332c0bd 100644 --- a/source/librpc/rpc/dcerpc_util.c +++ b/source/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/source/librpc/rpc/table.c b/source/librpc/rpc/table.c index 39ec3e64f5d..e08d670c992 100644 --- a/source/librpc/rpc/table.c +++ b/source/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; } |