s3-rpc_client: add enum dcerpc_transport_t to rpc_cli_transport struct.
authorGünther Deschner <gd@samba.org>
Thu, 10 Sep 2009 17:59:37 +0000 (19:59 +0200)
committerGünther Deschner <gd@samba.org>
Thu, 10 Sep 2009 22:26:24 +0000 (00:26 +0200)
Guenther

source3/include/client.h
source3/rpc_client/cli_pipe.c

index 203198fed831d26b29aca4996c6ecb02d5d29b11..5b64b9be3a75e5913c5d6919293be28d9e0f8768 100644 (file)
@@ -68,6 +68,8 @@ struct cli_pipe_auth_data {
 
 struct rpc_cli_transport {
 
 
 struct rpc_cli_transport {
 
+       enum dcerpc_transport_t transport;
+
        /**
         * Trigger an async read from the server. May return a short read.
         */
        /**
         * Trigger an async read from the server. May return a short read.
         */
index 82f6b105b7e3cd8910c42118345ae4686eaa299e..16fe9daca18983d97089b4dcb1fec05850a76dbd 100644 (file)
@@ -3207,6 +3207,8 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX *mem_ctx, const char *host,
                goto fail;
        }
 
                goto fail;
        }
 
+       result->transport->transport = NCACN_IP_TCP;
+
        *presult = result;
        return NT_STATUS_OK;
 
        *presult = result;
        return NT_STATUS_OK;
 
@@ -3427,6 +3429,8 @@ NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
                goto fail;
        }
 
                goto fail;
        }
 
+       result->transport->transport = NCALRPC;
+
        *presult = result;
        return NT_STATUS_OK;
 
        *presult = result;
        return NT_STATUS_OK;
 
@@ -3501,6 +3505,8 @@ static NTSTATUS rpc_pipe_open_np(struct cli_state *cli,
                return status;
        }
 
                return status;
        }
 
+       result->transport->transport = NCACN_NP;
+
        DLIST_ADD(cli->pipe_list, result);
        talloc_set_destructor(result, rpc_pipe_client_np_destructor);
 
        DLIST_ADD(cli->pipe_list, result);
        talloc_set_destructor(result, rpc_pipe_client_np_destructor);
 
@@ -3561,6 +3567,8 @@ NTSTATUS rpc_pipe_open_local(TALLOC_CTX *mem_ctx,
                return status;
        }
 
                return status;
        }
 
+       result->transport->transport = NCACN_INTERNAL;
+
        *presult = result;
        return NT_STATUS_OK;
 }
        *presult = result;
        return NT_STATUS_OK;
 }