#ifndef SAMBA_DCERPC_SERVER_H
#define SAMBA_DCERPC_SERVER_H
-#include "librpc/gen_ndr/misc.h"
+#include "librpc/gen_ndr/server_id.h"
#include "librpc/rpc/dcerpc.h"
#include "librpc/ndr/libndr.h"
NTSTATUS (*ndr_push)(struct dcesrv_call_state *, TALLOC_CTX *, struct ndr_push *, const void *);
/* for any private use by the interface code */
- const void *private;
+ const void *private_data;
};
enum dcesrv_call_list {
*/
#define DCESRV_CALL_STATE_FLAG_ASYNC (1<<0)
#define DCESRV_CALL_STATE_FLAG_MAY_ASYNC (1<<1)
+#define DCESRV_CALL_STATE_FLAG_HEADER_SIGNING (1<<2)
uint32_t state_flags;
/* the time the request arrived in the server */
struct timeval time;
/* the backend can use this event context for async replies */
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
/* the message_context that will be used for async replies */
struct messaging_context *msg_ctx;
/* a dcerpc handle in internal format */
struct dcesrv_handle {
struct dcesrv_handle *next, *prev;
- struct dcesrv_connection_context *context;
+ struct dcesrv_assoc_group *assoc_group;
struct policy_handle wire_handle;
+ struct dom_sid *sid;
+ const struct dcesrv_interface *iface;
void *data;
};
struct dcesrv_connection_context *next, *prev;
uint32_t context_id;
+ struct dcesrv_assoc_group *assoc_group;
+
/* the connection this is on */
struct dcesrv_connection *conn;
const struct dcesrv_interface *iface;
/* private data for the interface implementation */
- void *private;
-
- /* current rpc handles - this is really the wrong scope for
- them, but it will do for now */
- struct dcesrv_handle *handles;
+ void *private_data;
};
struct dcesrv_auth auth_state;
/* the event_context that will be used for this connection */
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
/* the message_context that will be used for this connection */
struct messaging_context *msg_ctx;
bool processing;
+ const char *packet_log_dir;
+
/* this is the default state_flags for dcesrv_call_state structs */
uint32_t state_flags;
struct socket_address *(*get_my_addr)(struct dcesrv_connection *, TALLOC_CTX *mem_ctx);
struct socket_address *(*get_peer_addr)(struct dcesrv_connection *, TALLOC_CTX *mem_ctx);
} transport;
+
+ struct tstream_context *stream;
+ struct tevent_queue *send_queue;
};
};
+/* one association groups */
+struct dcesrv_assoc_group {
+ /* the wire id */
+ uint32_t id;
+
+ /* list of handles in this association group */
+ struct dcesrv_handle *handles;
+
+ /* parent context */
+ struct dcesrv_context *dce_ctx;
+
+ /* Remote association group ID (if proxied) */
+ uint32_t proxied_id;
+};
+
/* server-wide context information for the dcerpc server */
struct dcesrv_context {
/* the list of endpoints that have registered
/* loadparm context to use for this connection */
struct loadparm_context *lp_ctx;
+
+ struct idr_context *assoc_groups_idr;
};
/* this structure is used by modules to determine the size of some critical types */
NTSTATUS dcesrv_init_context(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
const char **endpoint_servers, struct dcesrv_context **_dce_ctx);
-NTSTATUS dcesrv_init_ipc_context(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
- struct dcesrv_context **_dce_ctx);
-NTSTATUS dcesrv_endpoint_search_connect(struct dcesrv_context *dce_ctx,
- TALLOC_CTX *mem_ctx,
- const struct dcerpc_binding *ep_description,
- struct auth_session_info *session_info,
- struct event_context *event_ctx,
- struct messaging_context *msg_ctx,
- struct server_id server_id,
- uint32_t state_flags,
- struct dcesrv_connection **dce_conn_p);
-NTSTATUS dcesrv_output(struct dcesrv_connection *dce_conn,
- void *private_data,
- NTSTATUS (*write_fn)(void *private_data, DATA_BLOB *output, size_t *nwritten));
-NTSTATUS dcesrv_input(struct dcesrv_connection *dce_conn, const DATA_BLOB *data);
NTSTATUS dcesrv_endpoint_connect(struct dcesrv_context *dce_ctx,
TALLOC_CTX *mem_ctx,
const struct dcesrv_endpoint *ep,
struct auth_session_info *session_info,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct messaging_context *msg_ctx,
struct server_id server_id,
uint32_t state_flags,