summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-18 20:53:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:58 -0500
commita0fa682faa309bda812008ea3a084cf54f65310b (patch)
tree5841de49e8c7c212a9ac97cd82c06e7b4d9591c3 /source4/librpc/rpc
parentbe01250d1a5ef9611164e5ca741e07255f770b4d (diff)
downloadsamba-a0fa682faa309bda812008ea3a084cf54f65310b.tar.gz
samba-a0fa682faa309bda812008ea3a084cf54f65310b.tar.bz2
samba-a0fa682faa309bda812008ea3a084cf54f65310b.zip
r3861: - Put ndr and rpc client code in seperate files
- Add some const (This used to be commit a00bda88e1b6abdc36e5aa8c2a35f64855f67c96)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 2427a22e59..3526c0adf9 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -4,6 +4,7 @@
Copyright (C) Tim Potter 2003
Copyright (C) Andrew Tridgell 2003
+ Copyright (C) Jelmer Vernooij 2004
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -856,7 +857,7 @@ static int dcerpc_req_destructor(void *ptr)
perform the send size of a async dcerpc request
*/
struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p,
- struct GUID *object,
+ const struct GUID *object,
uint16_t opnum,
TALLOC_CTX *mem_ctx,
DATA_BLOB *stub_data)
@@ -1153,12 +1154,28 @@ static NTSTATUS dcerpc_ndr_validate_out(struct dcerpc_pipe *p,
/*
+ send a rpc request given a dcerpc_call structure
+ */
+struct rpc_request *dcerpc_ndr_request_table_send(struct dcerpc_pipe *p,
+ const struct GUID *object,
+ const struct dcerpc_interface_table *table,
+ uint32_t opnum,
+ TALLOC_CTX *mem_ctx,
+ void *r)
+{
+ const struct dcerpc_interface_call *call = &table->calls[opnum];
+
+ return dcerpc_ndr_request_send(p, object, opnum, mem_ctx, call->ndr_push, call->ndr_pull, r, call->struct_size);
+}
+
+
+/*
send a rpc request with a given set of ndr helper functions
call dcerpc_ndr_request_recv() to receive the answer
*/
struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p,
- struct GUID *object,
+ const struct GUID *object,
uint32_t opnum,
TALLOC_CTX *mem_ctx,
NTSTATUS (*ndr_push)(struct ndr_push *, int, void *),