struct tevent_context;
struct tevent_req;
struct dcerpc_binding_handle;
+struct tstream_context;
enum dcerpc_transport_t {
NCA_UNKNOWN, NCACN_NP, NCACN_IP_TCP, NCACN_IP_UDP, NCACN_VNS_IPC,
/*
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;
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 */
this encapsulates a full dcerpc client side pipe
*/
struct dcerpc_pipe {
+ struct dcerpc_binding_handle *binding_handle;
+
uint32_t context_id;
uint32_t assoc_group_id;
struct ndr_syntax_id syntax;
struct ndr_syntax_id transfer_syntax;
- struct dcerpc_connection *conn;
+ struct dcecli_connection *conn;
struct dcerpc_binding *binding;
- struct dcerpc_binding_handle *binding_handle;
-
/** the last fault code from a DCERPC fault */
uint32_t last_fault_code;
/* use NDR64 transport */
#define DCERPC_NDR64 (1<<21)
+/* specify binding interface */
+#define DCERPC_LOCALADDRESS (1<<22)
+
/* this describes a binding to a particular transport/pipe */
struct dcerpc_binding {
enum dcerpc_transport_t transport;
struct ndr_syntax_id object;
const char *host;
const char *target_hostname;
+ const char *target_principal;
const char *endpoint;
const char **options;
+ const char *localaddress;
uint32_t flags;
uint32_t assoc_group_id;
};
struct cli_credentials *credentials,
struct tevent_context *ev,
struct loadparm_context *lp_ctx);
-const char *dcerpc_errstr(TALLOC_CTX *mem_ctx, uint32_t fault_code);
-NTSTATUS dcerpc_fault_to_nt_status(uint32_t fault_code);
NTSTATUS dcerpc_pipe_auth(TALLOC_CTX *mem_ctx,
struct dcerpc_pipe **p,
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);
struct composite_context* dcerpc_secondary_connection_send(struct dcerpc_pipe *p,
struct dcerpc_binding *b);
void dcerpc_log_packet(const char *lockdir,
- const struct ndr_interface_table *ndr,
- uint32_t opnum, uint32_t flags,
- DATA_BLOB *pkt);
+ const struct ndr_interface_table *ndr,
+ uint32_t opnum, uint32_t flags,
+ const DATA_BLOB *pkt);
NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx,
const struct dcerpc_binding *binding,
struct epm_tower *tower);
const char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
-/* TODO: this needs to be completely private */
-struct dcerpc_binding_handle {
- void *private_data;
-};
+#include "../librpc/rpc/rpc_common.h"
#endif /* __DCERPC_H__ */