s3: Do not directly reference the ndr_table_* in rpcclient
[samba.git] / source3 / rpc_client / cli_pipe.c
index 9ff84f8b6d1e49f5e25b3339189f3d1ed385a939..bd7bf325c4c3c79b556041dda81388ce63a06267 100644 (file)
@@ -195,6 +195,20 @@ const char *get_pipe_name_from_syntax(TALLOC_CTX *mem_ctx,
        return result;
 }
 
+bool ndr_syntax_from_string(const char *s, uint32_t version,
+                           struct ndr_syntax_id *syntax)
+{
+       NTSTATUS status;
+       status = GUID_from_string(s, &syntax->uuid);
+       if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(10, ("GUID_from_string returned %s\n",
+                          nt_errstr(status)));
+               return false;
+       }
+       syntax->if_version = version;
+       return true;
+}
+
 /********************************************************************
  Map internal value to wire value.
  ********************************************************************/