diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-11-18 20:53:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:58 -0500 |
commit | a0fa682faa309bda812008ea3a084cf54f65310b (patch) | |
tree | 5841de49e8c7c212a9ac97cd82c06e7b4d9591c3 /source4/librpc | |
parent | be01250d1a5ef9611164e5ca741e07255f770b4d (diff) | |
download | samba-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')
-rw-r--r-- | source4/librpc/config.mk | 45 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_basic.c | 2 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 21 |
3 files changed, 64 insertions, 4 deletions
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk index d527eabb2a..f720264046 100644 --- a/source4/librpc/config.mk +++ b/source4/librpc/config.mk @@ -60,6 +60,7 @@ INIT_FUNCTION = \ dcerpc_mgmt_init \ dcerpc_protected_storage_init \ dcerpc_dcom_init \ + dcom_dcom_init \ dcerpc_oxidresolver_init \ dcerpc_remact_init \ dcerpc_wzcsvc_init \ @@ -116,7 +117,49 @@ ADD_OBJ_FILES = \ librpc/gen_ndr/ndr_keysvc.o \ librpc/gen_ndr/ndr_krb5pac.o \ librpc/gen_ndr/ndr_xattr.o \ - librpc/gen_ndr/ndr_schannel.o + librpc/gen_ndr/ndr_schannel.o \ + librpc/gen_ndr/ndr_audiosrv_c.o \ + librpc/gen_ndr/ndr_dcerpc_c.o \ + librpc/gen_ndr/ndr_echo_c.o \ + librpc/gen_ndr/ndr_exchange_c.o \ + librpc/gen_ndr/ndr_dsbackup_c.o \ + librpc/gen_ndr/ndr_efs_c.o \ + librpc/gen_ndr/ndr_misc_c.o \ + librpc/gen_ndr/ndr_lsa_c.o \ + librpc/gen_ndr/ndr_lsads_c.o \ + librpc/gen_ndr/ndr_dfs_c.o \ + librpc/gen_ndr/ndr_drsuapi_c.o \ + librpc/gen_ndr/ndr_policyagent_c.o \ + librpc/gen_ndr/ndr_samr_c.o \ + librpc/gen_ndr/ndr_spoolss_c.o \ + librpc/gen_ndr/ndr_wkssvc_c.o \ + librpc/gen_ndr/ndr_srvsvc_c.o \ + librpc/gen_ndr/ndr_svcctl_c.o \ + librpc/gen_ndr/ndr_atsvc_c.o \ + librpc/gen_ndr/ndr_eventlog_c.o \ + librpc/gen_ndr/ndr_epmapper_c.o \ + librpc/gen_ndr/ndr_dbgidl_c.o \ + librpc/gen_ndr/ndr_dssetup_c.o \ + librpc/gen_ndr/ndr_msgsvc_c.o \ + librpc/gen_ndr/ndr_wins_c.o \ + librpc/gen_ndr/ndr_winreg_c.o \ + librpc/gen_ndr/ndr_mgmt_c.o \ + librpc/gen_ndr/ndr_protected_storage_c.o \ + librpc/gen_ndr/ndr_dcom_c.o \ + librpc/gen_ndr/ndr_oxidresolver_c.o \ + librpc/gen_ndr/ndr_remact_c.o \ + librpc/gen_ndr/ndr_wzcsvc_c.o \ + librpc/gen_ndr/ndr_browser_c.o \ + librpc/gen_ndr/ndr_w32time_c.o \ + librpc/gen_ndr/ndr_scerpc_c.o \ + librpc/gen_ndr/ndr_ntsvcs_c.o \ + librpc/gen_ndr/ndr_netlogon_c.o \ + librpc/gen_ndr/ndr_trkwks_c.o \ + librpc/gen_ndr/ndr_keysvc_c.o \ + librpc/gen_ndr/ndr_krb5pac_c.o \ + librpc/gen_ndr/ndr_xattr_c.o \ + librpc/gen_ndr/ndr_schannel_c.o + # End SUBSYSTEM LIBNDR_GEN ################################################ diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index 9507f4d33b..057b162ca9 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -1304,7 +1304,7 @@ uint32 ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags) return ret + data->length; } -uint32 ndr_size_string(int ret, const char **string, int flags) +uint32 ndr_size_string(int ret, const char * const* string, int flags) { /* FIXME: Is this correct for all strings ? */ if(!(*string)) return ret; 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 *), |