2 Unix SMB/CIFS implementation.
4 dcerpc utility functions
6 Copyright (C) Andrew Tridgell 2003
7 Copyright (C) Jelmer Vernooij 2004
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 find the pipe name for a local IDL interface
29 const char *idl_pipe_name(const struct GUID *uuid, uint32_t if_version)
31 const struct dcerpc_interface_list *l;
32 for (l=librpc_dcerpc_pipes();l;l=l->next) {
33 if (GUID_equal(&l->table->uuid, uuid) &&
34 l->table->if_version == if_version) {
35 return l->table->name;
42 find the number of calls defined by local IDL
44 int idl_num_calls(const struct GUID *uuid, uint32_t if_version)
46 const struct dcerpc_interface_list *l;
47 for (l=librpc_dcerpc_pipes();l;l=l->next){
48 if (GUID_equal(&l->table->uuid, uuid) &&
49 l->table->if_version == if_version) {
50 return l->table->num_calls;
58 find a dcerpc interface by name
60 const struct dcerpc_interface_table *idl_iface_by_name(const char *name)
62 const struct dcerpc_interface_list *l;
63 for (l=librpc_dcerpc_pipes();l;l=l->next) {
64 if (strcasecmp(l->table->name, name) == 0) {
72 find a dcerpc interface by uuid
74 const struct dcerpc_interface_table *idl_iface_by_uuid(const struct GUID *uuid)
76 const struct dcerpc_interface_list *l;
77 for (l=librpc_dcerpc_pipes();l;l=l->next) {
78 if (GUID_equal(&l->table->uuid, uuid)) {
85 extern struct dcerpc_interface_list *dcerpc_pipes;
87 return the list of registered dcerpc_pipes
89 const struct dcerpc_interface_list *librpc_dcerpc_pipes(void)