summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-12 12:41:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:50 -0500
commitae0aa86039aaa4fd02f2646cb7edf54106354119 (patch)
tree5f6c611f97de0612b8a48940cf37b66fbf09e46e /source4/rpc_server
parentf2657b2cb16514d22f01c8909292e7c81c6847e5 (diff)
downloadsamba-ae0aa86039aaa4fd02f2646cb7edf54106354119.tar.gz
samba-ae0aa86039aaa4fd02f2646cb7edf54106354119.tar.bz2
samba-ae0aa86039aaa4fd02f2646cb7edf54106354119.zip
r2938: Use IDL to dissect the RHS of floors in protocol towers
(This used to be commit 273d0049b5339e3288b264e5a4393bfab1d4e239)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/epmapper/rpc_epmapper.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c
index 5f9271868c..5cf34efa7f 100644
--- a/source4/rpc_server/epmapper/rpc_epmapper.c
+++ b/source4/rpc_server/epmapper/rpc_epmapper.c
@@ -63,47 +63,44 @@ static BOOL fill_protocol_tower(TALLOC_CTX *mem_ctx, struct epm_towers *twr,
twr->floors[0].lhs.protocol = EPM_PROTOCOL_UUID;
GUID_from_string(e->uuid, &twr->floors[0].lhs.info.uuid.uuid);
twr->floors[0].lhs.info.uuid.version = e->if_version;
- twr->floors[0].rhs.rhs_data = data_blob_talloc_zero(mem_ctx, 2);
+ twr->floors[0].rhs.uuid.unknown = 0;
/* encoded with NDR ... */
twr->floors[1].lhs.protocol = EPM_PROTOCOL_UUID;
GUID_from_string(NDR_GUID, &twr->floors[1].lhs.info.uuid.uuid);
twr->floors[1].lhs.info.uuid.version = NDR_GUID_VERSION;
- twr->floors[1].rhs.rhs_data = data_blob_talloc_zero(mem_ctx, 2);
+ twr->floors[1].rhs.uuid.unknown = 0;
/* on an RPC connection ... */
twr->floors[2].lhs.protocol = EPM_PROTOCOL_NCACN;
twr->floors[2].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->floors[2].rhs.rhs_data = data_blob_talloc_zero(mem_ctx, 2);
+ twr->floors[2].rhs.ncacn.minor_version = 0;
switch (e->ep_description.type) {
case ENDPOINT_SMB:
/* on a SMB pipe ... */
twr->floors[3].lhs.protocol = EPM_PROTOCOL_SMB;
twr->floors[3].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->floors[3].rhs.rhs_data.data = talloc_asprintf(mem_ctx, "\\PIPE\\%s",
+ twr->floors[3].rhs.smb.unc = talloc_asprintf(mem_ctx, "\\PIPE\\%s",
e->ep_description.info.smb_pipe);
- twr->floors[3].rhs.rhs_data.length = strlen(twr->floors[3].rhs.rhs_data.data)+1;
/* on an NetBIOS link ... */
twr->floors[4].lhs.protocol = EPM_PROTOCOL_NETBIOS;
twr->floors[4].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->floors[4].rhs.rhs_data.data = talloc_asprintf(mem_ctx, "\\\\%s",
+ twr->floors[4].rhs.netbios.name = talloc_asprintf(mem_ctx, "\\\\%s",
lp_netbios_name());
- twr->floors[4].rhs.rhs_data.length = strlen(twr->floors[4].rhs.rhs_data.data)+1;
break;
case ENDPOINT_TCP:
/* on a TCP connection ... */
twr->floors[3].lhs.protocol = EPM_PROTOCOL_TCP;
twr->floors[3].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->floors[3].rhs.rhs_data = data_blob_talloc(mem_ctx, NULL, 2);
- RSSVAL(twr->floors[3].rhs.rhs_data.data, 0, e->ep_description.info.tcp_port);
+ twr->floors[3].rhs.tcp.port = e->ep_description.info.tcp_port;
/* on an IP link ... */
twr->floors[4].lhs.protocol = EPM_PROTOCOL_IP;
twr->floors[4].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->floors[4].rhs.rhs_data = data_blob_talloc_zero(mem_ctx, 4);
+ twr->floors[4].rhs.ip.address = 0;
/* TODO: we should fill in our IP address here as a hint to the
client */
break;