diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-03-11 08:27:00 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-03-11 11:02:23 +0100 |
commit | c774a50aaf12924ff89430ae9d91e77d97616c72 (patch) | |
tree | e25a3a34af85a88653e7e7d4fa667d8358622b69 /source4 | |
parent | 6771ade5e7933af57b286870d73e7773521b8fdd (diff) | |
download | samba-c774a50aaf12924ff89430ae9d91e77d97616c72.tar.gz samba-c774a50aaf12924ff89430ae9d91e77d97616c72.tar.bz2 samba-c774a50aaf12924ff89430ae9d91e77d97616c72.zip |
s4:librpc/rpc: s/struct dcerpc_connection/struct dcecli_connection/g
The name 'struct dcerpc_connection' will be used in the new generic
dcerpc code. It will be used for client and server.
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 48 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc.h | 24 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_smb.c | 38 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_smb2.c | 36 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_sock.c | 46 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 4 |
6 files changed, 98 insertions, 98 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 3b67512f91..d467845472 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -38,20 +38,20 @@ _PUBLIC_ NTSTATUS dcerpc_init(struct loadparm_context *lp_ctx) return gensec_init(lp_ctx); } -static void dcerpc_connection_dead(struct dcerpc_connection *conn, NTSTATUS status); -static void dcerpc_ship_next_request(struct dcerpc_connection *c); +static void dcerpc_connection_dead(struct dcecli_connection *conn, NTSTATUS status); +static void dcerpc_ship_next_request(struct dcecli_connection *c); static struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p, const struct GUID *object, uint16_t opnum, DATA_BLOB *stub_data); -static NTSTATUS dcerpc_ndr_validate_in(struct dcerpc_connection *c, +static NTSTATUS dcerpc_ndr_validate_in(struct dcecli_connection *c, TALLOC_CTX *mem_ctx, DATA_BLOB blob, size_t struct_size, ndr_push_flags_fn_t ndr_push, ndr_pull_flags_fn_t ndr_pull); -static NTSTATUS dcerpc_ndr_validate_out(struct dcerpc_connection *c, +static NTSTATUS dcerpc_ndr_validate_out(struct dcecli_connection *c, struct ndr_pull *pull_in, void *struct_ptr, size_t struct_size, @@ -60,7 +60,7 @@ static NTSTATUS dcerpc_ndr_validate_out(struct dcerpc_connection *c, ndr_print_function_t ndr_print); /* destroy a dcerpc connection */ -static int dcerpc_connection_destructor(struct dcerpc_connection *conn) +static int dcerpc_connection_destructor(struct dcecli_connection *conn) { if (conn->dead) { conn->free_skipped = true; @@ -74,12 +74,12 @@ static int dcerpc_connection_destructor(struct dcerpc_connection *conn) /* initialise a dcerpc connection. the event context is optional */ -static struct dcerpc_connection *dcerpc_connection_init(TALLOC_CTX *mem_ctx, +static struct dcecli_connection *dcerpc_connection_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev) { - struct dcerpc_connection *c; + struct dcecli_connection *c; - c = talloc_zero(mem_ctx, struct dcerpc_connection); + c = talloc_zero(mem_ctx, struct dcecli_connection); if (!c) { return NULL; } @@ -554,7 +554,7 @@ _PUBLIC_ struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct tevent /* choose the next call id to use */ -static uint32_t next_call_id(struct dcerpc_connection *c) +static uint32_t next_call_id(struct dcecli_connection *c) { c->call_id++; if (c->call_id == 0) { @@ -566,7 +566,7 @@ static uint32_t next_call_id(struct dcerpc_connection *c) /** setup for a ndr pull, also setting up any flags from the binding string */ -static struct ndr_pull *ndr_pull_init_flags(struct dcerpc_connection *c, +static struct ndr_pull *ndr_pull_init_flags(struct dcecli_connection *c, DATA_BLOB *blob, TALLOC_CTX *mem_ctx) { struct ndr_pull *ndr = ndr_pull_init_blob(blob, mem_ctx); @@ -592,7 +592,7 @@ static struct ndr_pull *ndr_pull_init_flags(struct dcerpc_connection *c, parse a data blob into a ncacn_packet structure. This handles both input and output packets */ -static NTSTATUS ncacn_pull(struct dcerpc_connection *c, DATA_BLOB *blob, TALLOC_CTX *mem_ctx, +static NTSTATUS ncacn_pull(struct dcecli_connection *c, DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct ncacn_packet *pkt) { struct ndr_pull *ndr; @@ -618,7 +618,7 @@ static NTSTATUS ncacn_pull(struct dcerpc_connection *c, DATA_BLOB *blob, TALLOC_ /* parse the authentication information on a dcerpc response packet */ -static NTSTATUS ncacn_pull_request_auth(struct dcerpc_connection *c, TALLOC_CTX *mem_ctx, +static NTSTATUS ncacn_pull_request_auth(struct dcecli_connection *c, TALLOC_CTX *mem_ctx, DATA_BLOB *raw_packet, struct ncacn_packet *pkt) { @@ -706,7 +706,7 @@ static NTSTATUS ncacn_pull_request_auth(struct dcerpc_connection *c, TALLOC_CTX /* push a dcerpc request packet into a blob, possibly signing it. */ -static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c, +static NTSTATUS ncacn_push_request_sign(struct dcecli_connection *c, DATA_BLOB *blob, TALLOC_CTX *mem_ctx, size_t sig_size, struct ncacn_packet *pkt) @@ -856,7 +856,7 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c, /* fill in the fixed values in a dcerpc header */ -static void init_ncacn_hdr(struct dcerpc_connection *c, struct ncacn_packet *pkt) +static void init_ncacn_hdr(struct dcecli_connection *c, struct ncacn_packet *pkt) { pkt->rpc_vers = 5; pkt->rpc_vers_minor = 0; @@ -916,7 +916,7 @@ static int dcerpc_req_dequeue(struct rpc_request *req) /* mark the dcerpc connection dead. All outstanding requests get an error */ -static void dcerpc_connection_dead(struct dcerpc_connection *conn, NTSTATUS status) +static void dcerpc_connection_dead(struct dcecli_connection *conn, NTSTATUS status) { if (conn->dead) return; @@ -947,7 +947,7 @@ static void dcerpc_connection_dead(struct dcerpc_connection *conn, NTSTATUS stat forward declarations of the recv_data handlers for the types of packets we need to handle */ -static void dcerpc_request_recv_data(struct dcerpc_connection *c, +static void dcerpc_request_recv_data(struct dcecli_connection *c, DATA_BLOB *raw_packet, struct ncacn_packet *pkt); /* @@ -955,7 +955,7 @@ static void dcerpc_request_recv_data(struct dcerpc_connection *c, type of reply it is (normal request, bind or alter context) and dispatch to the appropriate handler */ -static void dcerpc_recv_data(struct dcerpc_connection *conn, DATA_BLOB *blob, NTSTATUS status) +static void dcerpc_recv_data(struct dcecli_connection *conn, DATA_BLOB *blob, NTSTATUS status) { struct ncacn_packet pkt; @@ -988,7 +988,7 @@ static void dcerpc_bind_recv_handler(struct rpc_request *req, DATA_BLOB *raw_packet, struct ncacn_packet *pkt) { struct composite_context *c; - struct dcerpc_connection *conn; + struct dcecli_connection *conn; c = talloc_get_type(req->async.private_data, struct composite_context); @@ -1203,7 +1203,7 @@ NTSTATUS dcerpc_auth3(struct dcerpc_pipe *p, This function frees the data */ -static void dcerpc_request_recv_data(struct dcerpc_connection *c, +static void dcerpc_request_recv_data(struct dcecli_connection *c, DATA_BLOB *raw_packet, struct ncacn_packet *pkt) { struct rpc_request *req; @@ -1381,7 +1381,7 @@ static struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p, Send a request using the transport */ -static void dcerpc_ship_next_request(struct dcerpc_connection *c) +static void dcerpc_ship_next_request(struct dcecli_connection *c) { struct rpc_request *req; struct dcerpc_pipe *p; @@ -1559,7 +1559,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p, for that to the NDR we initially generated. If they don't match then we know we must have a bug in either the pull or push side of our code */ -static NTSTATUS dcerpc_ndr_validate_in(struct dcerpc_connection *c, +static NTSTATUS dcerpc_ndr_validate_in(struct dcecli_connection *c, TALLOC_CTX *mem_ctx, DATA_BLOB blob, size_t struct_size, @@ -1644,7 +1644,7 @@ static NTSTATUS dcerpc_ndr_validate_in(struct dcerpc_connection *c, initially generated. If they don't match then we know we must have a bug in either the pull or push side of our code */ -static NTSTATUS dcerpc_ndr_validate_out(struct dcerpc_connection *c, +static NTSTATUS dcerpc_ndr_validate_out(struct dcecli_connection *c, struct ndr_pull *pull_in, void *struct_ptr, size_t struct_size, @@ -1954,7 +1954,7 @@ _PUBLIC_ const char *dcerpc_server_name(struct dcerpc_pipe *p) /* get the dcerpc auth_level for a open connection */ -uint32_t dcerpc_auth_level(struct dcerpc_connection *c) +uint32_t dcerpc_auth_level(struct dcecli_connection *c) { uint8_t auth_level; @@ -2009,7 +2009,7 @@ static void dcerpc_alter_recv_handler(struct rpc_request *req, /* the alter_resp might contain a reply set of credentials */ if (recv_pipe->conn->security_state.auth_info && pkt->u.alter_resp.auth_info.length) { - struct dcerpc_connection *conn = recv_pipe->conn; + struct dcecli_connection *conn = recv_pipe->conn; NTSTATUS status; uint32_t auth_length; status = dcerpc_pull_auth_trailer(pkt, conn, &pkt->u.alter_resp.auth_info, diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h index 4edb521854..2369a4c35b 100644 --- a/source4/librpc/rpc/dcerpc.h +++ b/source4/librpc/rpc/dcerpc.h @@ -44,20 +44,20 @@ enum dcerpc_transport_t { /* this defines a generic security context for signed/sealed dcerpc pipes. */ -struct dcerpc_connection; +struct dcecli_connection; struct gensec_settings; struct dcerpc_security { struct dcerpc_auth *auth_info; struct gensec_security *generic_state; /* get the session key */ - NTSTATUS (*session_key)(struct dcerpc_connection *, DATA_BLOB *); + NTSTATUS (*session_key)(struct dcecli_connection *, DATA_BLOB *); }; /* this holds the information that is not specific to a particular rpc context_id */ -struct dcerpc_connection { +struct dcecli_connection { uint32_t call_id; uint32_t srv_max_xmit_frag; uint32_t srv_max_recv_frag; @@ -76,21 +76,21 @@ struct dcerpc_connection { enum dcerpc_transport_t transport; void *private_data; - NTSTATUS (*shutdown_pipe)(struct dcerpc_connection *, NTSTATUS status); + NTSTATUS (*shutdown_pipe)(struct dcecli_connection *, NTSTATUS status); - const char *(*peer_name)(struct dcerpc_connection *); + const char *(*peer_name)(struct dcecli_connection *); - const char *(*target_hostname)(struct dcerpc_connection *); + const char *(*target_hostname)(struct dcecli_connection *); /* send a request to the server */ - NTSTATUS (*send_request)(struct dcerpc_connection *, DATA_BLOB *, bool trigger_read); + NTSTATUS (*send_request)(struct dcecli_connection *, DATA_BLOB *, bool trigger_read); /* send a read request to the server */ - NTSTATUS (*send_read)(struct dcerpc_connection *); + NTSTATUS (*send_read)(struct dcecli_connection *); /* a callback to the dcerpc code when a full fragment has been received */ - void (*recv_data)(struct dcerpc_connection *, DATA_BLOB *, NTSTATUS status); + void (*recv_data)(struct dcecli_connection *, DATA_BLOB *, NTSTATUS status); } transport; /* Requests that have been sent, waiting for a reply */ @@ -116,7 +116,7 @@ struct dcerpc_pipe { struct ndr_syntax_id syntax; struct ndr_syntax_id transfer_syntax; - struct dcerpc_connection *conn; + struct dcecli_connection *conn; struct dcerpc_binding *binding; /** the last fault code from a DCERPC fault */ @@ -326,8 +326,8 @@ NTSTATUS dcerpc_bind_auth_schannel(TALLOC_CTX *tmp_ctx, uint8_t auth_level); struct tevent_context *dcerpc_event_context(struct dcerpc_pipe *p); NTSTATUS dcerpc_init(struct loadparm_context *lp_ctx); -struct smbcli_tree *dcerpc_smb_tree(struct dcerpc_connection *c); -uint16_t dcerpc_smb_fnum(struct dcerpc_connection *c); +struct smbcli_tree *dcerpc_smb_tree(struct dcecli_connection *c); +uint16_t dcerpc_smb_fnum(struct dcecli_connection *c); NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p, struct dcerpc_pipe **pp2, const struct ndr_interface_table *table); diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c index 5a404556c8..395e067255 100644 --- a/source4/librpc/rpc/dcerpc_smb.c +++ b/source4/librpc/rpc/dcerpc_smb.c @@ -39,7 +39,7 @@ struct smb_private { /* tell the dcerpc layer that the transport is dead */ -static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status) +static void pipe_dead(struct dcecli_connection *c, NTSTATUS status) { struct smb_private *smb = (struct smb_private *)c->transport.private_data; @@ -67,7 +67,7 @@ static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status) this holds the state of an in-flight call */ struct smb_read_state { - struct dcerpc_connection *c; + struct dcecli_connection *c; struct smbcli_request *req; size_t received; DATA_BLOB data; @@ -110,7 +110,7 @@ static void smb_read_callback(struct smbcli_request *req) if (frag_length <= state->received) { DATA_BLOB data = state->data; - struct dcerpc_connection *c = state->c; + struct dcecli_connection *c = state->c; data.length = state->received; talloc_steal(state->c, data.data); talloc_free(state); @@ -141,7 +141,7 @@ static void smb_read_callback(struct smbcli_request *req) trigger a read request from the server, possibly with some initial data in the read buffer */ -static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLOB *blob) +static NTSTATUS send_read_request_continue(struct dcecli_connection *c, DATA_BLOB *blob) { struct smb_private *smb = (struct smb_private *)c->transport.private_data; union smb_read *io; @@ -197,7 +197,7 @@ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLO /* trigger a read request from the server */ -static NTSTATUS send_read_request(struct dcerpc_connection *c) +static NTSTATUS send_read_request(struct dcecli_connection *c) { struct smb_private *smb = (struct smb_private *)c->transport.private_data; @@ -212,7 +212,7 @@ static NTSTATUS send_read_request(struct dcerpc_connection *c) this holds the state of an in-flight trans call */ struct smb_trans_state { - struct dcerpc_connection *c; + struct dcecli_connection *c; struct smbcli_request *req; struct smb_trans2 *trans; }; @@ -223,7 +223,7 @@ struct smb_trans_state { static void smb_trans_callback(struct smbcli_request *req) { struct smb_trans_state *state = (struct smb_trans_state *)req->async.private_data; - struct dcerpc_connection *c = state->c; + struct dcecli_connection *c = state->c; NTSTATUS status; status = smb_raw_trans_recv(req, state, state->trans); @@ -249,7 +249,7 @@ static void smb_trans_callback(struct smbcli_request *req) /* send a SMBtrans style request */ -static NTSTATUS smb_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *blob) +static NTSTATUS smb_send_trans_request(struct dcecli_connection *c, DATA_BLOB *blob) { struct smb_private *smb = (struct smb_private *)c->transport.private_data; struct smb_trans2 *trans; @@ -306,7 +306,7 @@ static NTSTATUS smb_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *b */ static void smb_write_callback(struct smbcli_request *req) { - struct dcerpc_connection *c = (struct dcerpc_connection *)req->async.private_data; + struct dcecli_connection *c = (struct dcecli_connection *)req->async.private_data; if (!NT_STATUS_IS_OK(req->status)) { DEBUG(0,("dcerpc_smb: write callback error\n")); @@ -319,7 +319,7 @@ static void smb_write_callback(struct smbcli_request *req) /* send a packet to the server */ -static NTSTATUS smb_send_request(struct dcerpc_connection *c, DATA_BLOB *blob, +static NTSTATUS smb_send_request(struct dcecli_connection *c, DATA_BLOB *blob, bool trigger_read) { struct smb_private *smb = (struct smb_private *)c->transport.private_data; @@ -370,7 +370,7 @@ static void free_request(struct smbcli_request *req) /* shutdown SMB pipe connection */ -static NTSTATUS smb_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status) +static NTSTATUS smb_shutdown_pipe(struct dcecli_connection *c, NTSTATUS status) { struct smb_private *smb = (struct smb_private *)c->transport.private_data; union smb_close io; @@ -397,7 +397,7 @@ static NTSTATUS smb_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status) /* return SMB server name (called name) */ -static const char *smb_peer_name(struct dcerpc_connection *c) +static const char *smb_peer_name(struct dcecli_connection *c) { struct smb_private *smb = (struct smb_private *)c->transport.private_data; if (smb == NULL) return ""; @@ -407,7 +407,7 @@ static const char *smb_peer_name(struct dcerpc_connection *c) /* return remote name we make the actual connection (good for kerberos) */ -static const char *smb_target_hostname(struct dcerpc_connection *c) +static const char *smb_target_hostname(struct dcecli_connection *c) { struct smb_private *smb = talloc_get_type(c->transport.private_data, struct smb_private); if (smb == NULL) return ""; @@ -417,7 +417,7 @@ static const char *smb_target_hostname(struct dcerpc_connection *c) /* fetch the user session key */ -static NTSTATUS smb_session_key(struct dcerpc_connection *c, DATA_BLOB *session_key) +static NTSTATUS smb_session_key(struct dcecli_connection *c, DATA_BLOB *session_key) { struct smb_private *smb = (struct smb_private *)c->transport.private_data; @@ -431,7 +431,7 @@ static NTSTATUS smb_session_key(struct dcerpc_connection *c, DATA_BLOB *session_ struct pipe_open_smb_state { union smb_open *open; - struct dcerpc_connection *c; + struct dcecli_connection *c; struct smbcli_tree *tree; struct composite_context *ctx; }; @@ -445,7 +445,7 @@ struct composite_context *dcerpc_pipe_open_smb_send(struct dcerpc_pipe *p, struct composite_context *ctx; struct pipe_open_smb_state *state; struct smbcli_request *req; - struct dcerpc_connection *c = p->conn; + struct dcecli_connection *c = p->conn; /* if we don't have a binding on this pipe yet, then create one */ if (p->binding == NULL) { @@ -515,7 +515,7 @@ static void pipe_open_recv(struct smbcli_request *req) struct pipe_open_smb_state *state = talloc_get_type(req->async.private_data, struct pipe_open_smb_state); struct composite_context *ctx = state->ctx; - struct dcerpc_connection *c = state->c; + struct dcecli_connection *c = state->c; struct smb_private *smb; ctx->status = smb_raw_open_recv(req, state, state->open); @@ -571,7 +571,7 @@ _PUBLIC_ NTSTATUS dcerpc_pipe_open_smb(struct dcerpc_pipe *p, /* return the SMB tree used for a dcerpc over SMB pipe */ -_PUBLIC_ struct smbcli_tree *dcerpc_smb_tree(struct dcerpc_connection *c) +_PUBLIC_ struct smbcli_tree *dcerpc_smb_tree(struct dcecli_connection *c) { struct smb_private *smb; @@ -586,7 +586,7 @@ _PUBLIC_ struct smbcli_tree *dcerpc_smb_tree(struct dcerpc_connection *c) /* return the SMB fnum used for a dcerpc over SMB pipe (hack for torture operations) */ -_PUBLIC_ uint16_t dcerpc_smb_fnum(struct dcerpc_connection *c) +_PUBLIC_ uint16_t dcerpc_smb_fnum(struct dcecli_connection *c) { struct smb_private *smb; diff --git a/source4/librpc/rpc/dcerpc_smb2.c b/source4/librpc/rpc/dcerpc_smb2.c index 46dc379f80..50aed8cfd8 100644 --- a/source4/librpc/rpc/dcerpc_smb2.c +++ b/source4/librpc/rpc/dcerpc_smb2.c @@ -41,7 +41,7 @@ struct smb2_private { /* tell the dcerpc layer that the transport is dead */ -static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status) +static void pipe_dead(struct dcecli_connection *c, NTSTATUS status) { struct smb2_private *smb = (struct smb2_private *)c->transport.private_data; @@ -69,7 +69,7 @@ static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status) this holds the state of an in-flight call */ struct smb2_read_state { - struct dcerpc_connection *c; + struct dcecli_connection *c; DATA_BLOB data; }; @@ -113,7 +113,7 @@ static void smb2_read_callback(struct smb2_request *req) if (frag_length <= state->data.length) { DATA_BLOB data = state->data; - struct dcerpc_connection *c = state->c; + struct dcecli_connection *c = state->c; talloc_steal(c, data.data); talloc_free(state); c->transport.recv_data(c, &data, NT_STATUS_OK); @@ -145,7 +145,7 @@ static void smb2_read_callback(struct smb2_request *req) trigger a read request from the server, possibly with some initial data in the read buffer */ -static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLOB *blob) +static NTSTATUS send_read_request_continue(struct dcecli_connection *c, DATA_BLOB *blob) { struct smb2_private *smb = (struct smb2_private *)c->transport.private_data; struct smb2_read io; @@ -190,7 +190,7 @@ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLO /* trigger a read request from the server */ -static NTSTATUS send_read_request(struct dcerpc_connection *c) +static NTSTATUS send_read_request(struct dcecli_connection *c) { struct smb2_private *smb = (struct smb2_private *)c->transport.private_data; @@ -205,7 +205,7 @@ static NTSTATUS send_read_request(struct dcerpc_connection *c) this holds the state of an in-flight trans call */ struct smb2_trans_state { - struct dcerpc_connection *c; + struct dcecli_connection *c; }; /* @@ -215,7 +215,7 @@ static void smb2_trans_callback(struct smb2_request *req) { struct smb2_trans_state *state = talloc_get_type(req->async.private_data, struct smb2_trans_state); - struct dcerpc_connection *c = state->c; + struct dcecli_connection *c = state->c; NTSTATUS status; struct smb2_ioctl io; @@ -241,7 +241,7 @@ static void smb2_trans_callback(struct smb2_request *req) /* send a SMBtrans style request, using a named pipe read_write fsctl */ -static NTSTATUS smb2_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *blob) +static NTSTATUS smb2_send_trans_request(struct dcecli_connection *c, DATA_BLOB *blob) { struct smb2_private *smb = talloc_get_type(c->transport.private_data, struct smb2_private); @@ -282,7 +282,7 @@ static NTSTATUS smb2_send_trans_request(struct dcerpc_connection *c, DATA_BLOB * */ static void smb2_write_callback(struct smb2_request *req) { - struct dcerpc_connection *c = (struct dcerpc_connection *)req->async.private_data; + struct dcecli_connection *c = (struct dcecli_connection *)req->async.private_data; if (!NT_STATUS_IS_OK(req->status)) { DEBUG(0,("dcerpc_smb2: write callback error\n")); @@ -295,7 +295,7 @@ static void smb2_write_callback(struct smb2_request *req) /* send a packet to the server */ -static NTSTATUS smb2_send_request(struct dcerpc_connection *c, DATA_BLOB *blob, +static NTSTATUS smb2_send_request(struct dcecli_connection *c, DATA_BLOB *blob, bool trigger_read) { struct smb2_private *smb = (struct smb2_private *)c->transport.private_data; @@ -333,7 +333,7 @@ static void free_request(struct smb2_request *req) /* shutdown SMB pipe connection */ -static NTSTATUS smb2_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status) +static NTSTATUS smb2_shutdown_pipe(struct dcecli_connection *c, NTSTATUS status) { struct smb2_private *smb = (struct smb2_private *)c->transport.private_data; struct smb2_close io; @@ -358,7 +358,7 @@ static NTSTATUS smb2_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status) /* return SMB server name */ -static const char *smb2_peer_name(struct dcerpc_connection *c) +static const char *smb2_peer_name(struct dcecli_connection *c) { struct smb2_private *smb = talloc_get_type(c->transport.private_data, struct smb2_private); @@ -368,7 +368,7 @@ static const char *smb2_peer_name(struct dcerpc_connection *c) /* return remote name we make the actual connection (good for kerberos) */ -static const char *smb2_target_hostname(struct dcerpc_connection *c) +static const char *smb2_target_hostname(struct dcecli_connection *c) { struct smb2_private *smb = talloc_get_type(c->transport.private_data, struct smb2_private); @@ -378,7 +378,7 @@ static const char *smb2_target_hostname(struct dcerpc_connection *c) /* fetch the user session key */ -static NTSTATUS smb2_session_key(struct dcerpc_connection *c, DATA_BLOB *session_key) +static NTSTATUS smb2_session_key(struct dcecli_connection *c, DATA_BLOB *session_key) { struct smb2_private *smb = talloc_get_type(c->transport.private_data, struct smb2_private); @@ -390,7 +390,7 @@ static NTSTATUS smb2_session_key(struct dcerpc_connection *c, DATA_BLOB *session } struct pipe_open_smb2_state { - struct dcerpc_connection *c; + struct dcecli_connection *c; struct composite_context *ctx; }; @@ -404,7 +404,7 @@ struct composite_context *dcerpc_pipe_open_smb2_send(struct dcerpc_pipe *p, struct pipe_open_smb2_state *state; struct smb2_create io; struct smb2_request *req; - struct dcerpc_connection *c = p->conn; + struct dcecli_connection *c = p->conn; ctx = composite_create(c, c->event_ctx); if (ctx == NULL) return NULL; @@ -453,7 +453,7 @@ static void pipe_open_recv(struct smb2_request *req) talloc_get_type(req->async.private_data, struct pipe_open_smb2_state); struct composite_context *ctx = state->ctx; - struct dcerpc_connection *c = state->c; + struct dcecli_connection *c = state->c; struct smb2_tree *tree = req->tree; struct smb2_private *smb; struct smb2_create io; @@ -510,7 +510,7 @@ NTSTATUS dcerpc_pipe_open_smb2(struct dcerpc_pipe *p, /* return the SMB2 tree used for a dcerpc over SMB2 pipe */ -struct smb2_tree *dcerpc_smb2_tree(struct dcerpc_connection *c) +struct smb2_tree *dcerpc_smb2_tree(struct dcecli_connection *c) { struct smb2_private *smb = talloc_get_type(c->transport.private_data, struct smb2_private); diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c index 782710c6c4..f0451ac674 100644 --- a/source4/librpc/rpc/dcerpc_sock.c +++ b/source4/librpc/rpc/dcerpc_sock.c @@ -47,7 +47,7 @@ struct sock_private { /* mark the socket dead */ -static void sock_dead(struct dcerpc_connection *p, NTSTATUS status) +static void sock_dead(struct dcecli_connection *p, NTSTATUS status) { struct sock_private *sock = (struct sock_private *)p->transport.private_data; @@ -88,8 +88,8 @@ static void sock_dead(struct dcerpc_connection *p, NTSTATUS status) */ static void sock_error_handler(void *private_data, NTSTATUS status) { - struct dcerpc_connection *p = talloc_get_type(private_data, - struct dcerpc_connection); + struct dcecli_connection *p = talloc_get_type(private_data, + struct dcecli_connection); sock_dead(p, status); } @@ -113,8 +113,8 @@ static NTSTATUS sock_complete_packet(void *private_data, DATA_BLOB blob, size_t */ static NTSTATUS sock_process_recv(void *private_data, DATA_BLOB blob) { - struct dcerpc_connection *p = talloc_get_type(private_data, - struct dcerpc_connection); + struct dcecli_connection *p = talloc_get_type(private_data, + struct dcecli_connection); struct sock_private *sock = (struct sock_private *)p->transport.private_data; sock->pending_reads--; if (sock->pending_reads == 0) { @@ -130,8 +130,8 @@ static NTSTATUS sock_process_recv(void *private_data, DATA_BLOB blob) static void sock_io_handler(struct tevent_context *ev, struct tevent_fd *fde, uint16_t flags, void *private_data) { - struct dcerpc_connection *p = talloc_get_type(private_data, - struct dcerpc_connection); + struct dcecli_connection *p = talloc_get_type(private_data, + struct dcecli_connection); struct sock_private *sock = (struct sock_private *)p->transport.private_data; if (flags & EVENT_FD_WRITE) { @@ -151,7 +151,7 @@ static void sock_io_handler(struct tevent_context *ev, struct tevent_fd *fde, /* initiate a read request - not needed for dcerpc sockets */ -static NTSTATUS sock_send_read(struct dcerpc_connection *p) +static NTSTATUS sock_send_read(struct dcecli_connection *p) { struct sock_private *sock = (struct sock_private *)p->transport.private_data; sock->pending_reads++; @@ -164,7 +164,7 @@ static NTSTATUS sock_send_read(struct dcerpc_connection *p) /* send an initial pdu in a multi-pdu sequence */ -static NTSTATUS sock_send_request(struct dcerpc_connection *p, DATA_BLOB *data, +static NTSTATUS sock_send_request(struct dcecli_connection *p, DATA_BLOB *data, bool trigger_read) { struct sock_private *sock = (struct sock_private *)p->transport.private_data; @@ -195,7 +195,7 @@ static NTSTATUS sock_send_request(struct dcerpc_connection *p, DATA_BLOB *data, /* shutdown sock pipe connection */ -static NTSTATUS sock_shutdown_pipe(struct dcerpc_connection *p, NTSTATUS status) +static NTSTATUS sock_shutdown_pipe(struct dcecli_connection *p, NTSTATUS status) { struct sock_private *sock = (struct sock_private *)p->transport.private_data; @@ -209,7 +209,7 @@ static NTSTATUS sock_shutdown_pipe(struct dcerpc_connection *p, NTSTATUS status) /* return sock server name */ -static const char *sock_peer_name(struct dcerpc_connection *p) +static const char *sock_peer_name(struct dcecli_connection *p) { struct sock_private *sock = talloc_get_type(p->transport.private_data, struct sock_private); return sock->server_name; @@ -218,7 +218,7 @@ static const char *sock_peer_name(struct dcerpc_connection *p) /* return remote name we make the actual connection (good for kerberos) */ -static const char *sock_target_hostname(struct dcerpc_connection *p) +static const char *sock_target_hostname(struct dcecli_connection *p) { struct sock_private *sock = talloc_get_type(p->transport.private_data, struct sock_private); return sock->server_name; @@ -226,7 +226,7 @@ static const char *sock_target_hostname(struct dcerpc_connection *p) struct pipe_open_socket_state { - struct dcerpc_connection *conn; + struct dcecli_connection *conn; struct socket_context *socket_ctx; struct sock_private *sock; struct socket_address *localaddr; @@ -238,7 +238,7 @@ struct pipe_open_socket_state { static void continue_socket_connect(struct composite_context *ctx) { - struct dcerpc_connection *conn; + struct dcecli_connection *conn; struct sock_private *sock; struct composite_context *c = talloc_get_type(ctx->async.private_data, struct composite_context); @@ -306,7 +306,7 @@ static void continue_socket_connect(struct composite_context *ctx) static struct composite_context *dcerpc_pipe_open_socket_send(TALLOC_CTX *mem_ctx, - struct dcerpc_connection *cn, + struct dcecli_connection *cn, struct socket_address *localaddr, struct socket_address *server, const char *target_hostname, @@ -367,7 +367,7 @@ struct pipe_tcp_state { struct socket_address *localaddr; struct socket_address *srvaddr; struct resolve_context *resolve_ctx; - struct dcerpc_connection *conn; + struct dcecli_connection *conn; }; @@ -464,7 +464,7 @@ static void continue_ipv4_open_socket(struct composite_context *ctx) Send rpc pipe open request to given host:port using tcp/ip transport */ -struct composite_context* dcerpc_pipe_open_tcp_send(struct dcerpc_connection *conn, +struct composite_context* dcerpc_pipe_open_tcp_send(struct dcecli_connection *conn, const char *localaddr, const char *server, const char *target_hostname, @@ -523,7 +523,7 @@ NTSTATUS dcerpc_pipe_open_tcp_recv(struct composite_context *c) struct pipe_unix_state { const char *path; struct socket_address *srvaddr; - struct dcerpc_connection *conn; + struct dcecli_connection *conn; }; @@ -549,7 +549,7 @@ static void continue_unix_open_socket(struct composite_context *ctx) /* Send pipe open request on unix socket */ -struct composite_context *dcerpc_pipe_open_unix_stream_send(struct dcerpc_connection *conn, +struct composite_context *dcerpc_pipe_open_unix_stream_send(struct dcecli_connection *conn, const char *path) { struct composite_context *c; @@ -613,7 +613,7 @@ static void continue_np_open_socket(struct composite_context *ctx) /* Send pipe open request on ncalrpc */ -struct composite_context* dcerpc_pipe_open_pipe_send(struct dcerpc_connection *conn, +struct composite_context* dcerpc_pipe_open_pipe_send(struct dcecli_connection *conn, const char *ncalrpc_dir, const char *identifier) { @@ -666,19 +666,19 @@ NTSTATUS dcerpc_pipe_open_pipe_recv(struct composite_context *c) /* Open a rpc pipe on a named pipe - sync version */ -NTSTATUS dcerpc_pipe_open_pipe(struct dcerpc_connection *conn, const char *ncalrpc_dir, const char *identifier) +NTSTATUS dcerpc_pipe_open_pipe(struct dcecli_connection *conn, const char *ncalrpc_dir, const char *identifier) { struct composite_context *c = dcerpc_pipe_open_pipe_send(conn, ncalrpc_dir, identifier); return dcerpc_pipe_open_pipe_recv(c); } -const char *dcerpc_unix_socket_path(struct dcerpc_connection *p) +const char *dcerpc_unix_socket_path(struct dcecli_connection *p) { struct sock_private *sock = (struct sock_private *)p->transport.private_data; return sock->path; } -struct socket_address *dcerpc_socket_peer_addr(struct dcerpc_connection *p, TALLOC_CTX *mem_ctx) +struct socket_address *dcerpc_socket_peer_addr(struct dcecli_connection *p, TALLOC_CTX *mem_ctx) { struct sock_private *sock = (struct sock_private *)p->transport.private_data; return socket_get_peer_addr(sock->sock, mem_ctx); diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index a84e967020..2cd94999e3 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -533,7 +533,7 @@ struct composite_context *dcerpc_pipe_auth_send(struct dcerpc_pipe *p, struct composite_context *auth_schannel_req; struct composite_context *auth_req; struct composite_context *auth_none_req; - struct dcerpc_connection *conn; + struct dcecli_connection *conn; uint8_t auth_type; /* composite context allocation and setup */ @@ -687,7 +687,7 @@ _PUBLIC_ NTSTATUS dcerpc_pipe_auth(TALLOC_CTX *mem_ctx, } -NTSTATUS dcerpc_generic_session_key(struct dcerpc_connection *c, +NTSTATUS dcerpc_generic_session_key(struct dcecli_connection *c, DATA_BLOB *session_key) { /* this took quite a few CPU cycles to find ... */ |