summaryrefslogtreecommitdiffstats
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-08 12:29:52 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-12 15:25:41 +0100
commit6677a5431cc33d8fba565ee068d4c87050ddbd96 (patch)
tree40c9df45680008b9b923caa61ac6d75a5b96fe34 /source4/librpc/rpc
parent454bedcb806ce54dae2e6ecc6650d8972287c87c (diff)
downloadsamba-6677a5431cc33d8fba565ee068d4c87050ddbd96.tar.gz
samba-6677a5431cc33d8fba565ee068d4c87050ddbd96.tar.xz
samba-6677a5431cc33d8fba565ee068d4c87050ddbd96.zip
s4:librpc/rpc: add very basic dcerpc_binding_handle infrastructure
metze
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc.c8
-rw-r--r--source4/librpc/rpc/dcerpc.h11
2 files changed, 19 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 63ff36768b5..064159f3547 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -118,6 +118,13 @@ _PUBLIC_ struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct tevent
p->conn->flags |= DCERPC_DEBUG_PRINT_BOTH;
}
+ p->binding_handle = talloc(p, struct dcerpc_binding_handle);
+ if (p->binding_handle == NULL) {
+ talloc_free(p);
+ return NULL;
+ }
+ p->binding_handle->private_data = p;
+
return p;
}
@@ -1701,3 +1708,4 @@ _PUBLIC_ NTSTATUS dcerpc_alter_context(struct dcerpc_pipe *p,
creq = dcerpc_alter_context_send(p, mem_ctx, syntax, transfer_syntax);
return dcerpc_alter_context_recv(creq);
}
+
diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h
index b539fc2620e..08210e03c03 100644
--- a/source4/librpc/rpc/dcerpc.h
+++ b/source4/librpc/rpc/dcerpc.h
@@ -31,6 +31,10 @@
#include "librpc/gen_ndr/dcerpc.h"
#include "../librpc/ndr/libndr.h"
+struct tevent_context;
+struct tevent_req;
+struct dcerpc_binding_handle;
+
enum dcerpc_transport_t {
NCA_UNKNOWN, NCACN_NP, NCACN_IP_TCP, NCACN_IP_UDP, NCACN_VNS_IPC,
NCACN_VNS_SPP, NCACN_AT_DSP, NCADG_AT_DDP, NCALRPC, NCACN_UNIX_STREAM,
@@ -113,6 +117,8 @@ struct dcerpc_pipe {
struct dcerpc_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;
@@ -392,4 +398,9 @@ enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot);
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;
+};
+
#endif /* __DCERPC_H__ */