summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_rpc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 268bee7e51..9eeae176c7 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -234,6 +234,21 @@ const char *cli_get_pipe_name(int pipe_idx)
return &pipe_names[pipe_idx].client_pipe[5];
}
+/****************************************************************************
+ Return the pipe idx from the syntax.
+ ****************************************************************************/
+int cli_get_pipe_idx(const RPC_IFACE *syntax)
+{
+ int i;
+ for (i = 0; pipe_names[i].client_pipe; i++) {
+ if (GUID_equal(&pipe_names[i].abstr_syntax.uuid, &syntax->uuid) &&
+ pipe_names[i].abstr_syntax.version == syntax->version)
+ return i;
+ }
+
+ return -1;
+}
+
/*******************************************************************
Inits an RPC_HDR structure.
********************************************************************/