diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/async_req.h | 7 | ||||
-rw-r--r-- | source3/include/proto.h | 14 | ||||
-rw-r--r-- | source3/include/rpc_client.h | 3 | ||||
-rw-r--r-- | source3/include/util_tdb.h | 10 |
4 files changed, 21 insertions, 13 deletions
diff --git a/source3/include/async_req.h b/source3/include/async_req.h index 1b8dbf3346..3907a08f67 100644 --- a/source3/include/async_req.h +++ b/source3/include/async_req.h @@ -150,4 +150,11 @@ bool async_req_enqueue(struct async_req_queue *queue, struct async_req *req, void (*trigger)(struct async_req *req)); +bool _async_req_setup(TALLOC_CTX *mem_ctx, struct async_req **preq, + void *pstate, size_t state_size, const char *typename); + +#define async_req_setup(_mem_ctx, _preq, _pstate, type) \ + _async_req_setup((_mem_ctx), (_preq), (_pstate), sizeof(type), #type) + + #endif diff --git a/source3/include/proto.h b/source3/include/proto.h index d644b09a6a..71ad259085 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5197,10 +5197,22 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli, /* The following definitions come from rpc_client/cli_pipe.c */ -NTSTATUS rpc_api_pipe_req(struct rpc_pipe_client *cli, +struct async_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx, + struct event_context *ev, + struct rpc_pipe_client *cli, + uint8_t op_num, + prs_struct *req_data); +NTSTATUS rpc_api_pipe_req_recv(struct async_req *req, TALLOC_CTX *mem_ctx, + prs_struct *reply_pdu); +NTSTATUS rpc_api_pipe_req(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *cli, uint8 op_num, prs_struct *in_data, prs_struct *out_data); +struct async_req *rpc_pipe_bind_send(TALLOC_CTX *mem_ctx, + struct event_context *ev, + struct rpc_pipe_client *cli, + struct cli_pipe_auth_data *auth); +NTSTATUS rpc_pipe_bind_recv(struct async_req *req); NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli, struct cli_pipe_auth_data *auth); unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli, diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 684044b871..61b861c3b4 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -49,9 +49,8 @@ if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ return WERR_NOMEM;\ }\ - prs_init_empty( &r_ps, ctx, UNMARSHALL );\ if ( q_io_fn("", &q_in, &q_ps, 0) ) {\ - NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, &q_ps, &r_ps); \ + NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(ctx, pcli, opnum, &q_ps, &r_ps); \ if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\ prs_mem_free( &q_ps );\ prs_mem_free( &r_ps );\ diff --git a/source3/include/util_tdb.h b/source3/include/util_tdb.h index a5b45e6a1d..127176b887 100644 --- a/source3/include/util_tdb.h +++ b/source3/include/util_tdb.h @@ -25,13 +25,6 @@ #include "talloc.h" /* for tdb_wrap_open() */ #include "../libcli/util/ntstatus.h" /* for map_nt_error_from_tdb() */ -/* single node of a list returned by tdb_search_keys */ -typedef struct keys_node -{ - struct keys_node *prev, *next; - TDB_DATA node_key; -} TDB_LIST_NODE; - struct tdb_wrap { struct tdb_context *tdb; const char *name; @@ -52,9 +45,6 @@ TDB_DATA make_tdb_data(const uint8_t *dptr, size_t dsize); TDB_DATA string_tdb_data(const char *string); TDB_DATA string_term_tdb_data(const char *string); -TDB_LIST_NODE *tdb_search_keys(struct tdb_context*, const char*); -void tdb_search_list_free(TDB_LIST_NODE*); - int tdb_chainlock_with_timeout( struct tdb_context *tdb, TDB_DATA key, unsigned int timeout); int tdb_lock_bystring(struct tdb_context *tdb, const char *keyval); |