diff options
-rw-r--r-- | librpc/ndr/ndr_table.c | 14 | ||||
-rw-r--r-- | librpc/ndr/ndr_table.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/librpc/ndr/ndr_table.c b/librpc/ndr/ndr_table.c index f73b9fcaf54..3dc158fa7ea 100644 --- a/librpc/ndr/ndr_table.c +++ b/librpc/ndr/ndr_table.c @@ -98,6 +98,20 @@ const struct ndr_interface_table *ndr_table_by_name(const char *name) } /* + find a dcerpc interface by syntax +*/ +const struct ndr_interface_table *ndr_table_by_syntax(const struct ndr_syntax_id *syntax) +{ + const struct ndr_interface_list *l; + for (l=ndr_table_list();l;l=l->next) { + if (ndr_syntax_id_equal(&l->table->syntax_id, syntax)) { + return l->table; + } + } + return NULL; +} + +/* find a dcerpc interface by uuid */ const struct ndr_interface_table *ndr_table_by_uuid(const struct GUID *uuid) diff --git a/librpc/ndr/ndr_table.h b/librpc/ndr/ndr_table.h index 207618f644e..1f6858a5f04 100644 --- a/librpc/ndr/ndr_table.h +++ b/librpc/ndr/ndr_table.h @@ -27,6 +27,7 @@ NTSTATUS ndr_table_register(const struct ndr_interface_table *table); const char *ndr_interface_name(const struct GUID *uuid, uint32_t if_version); int ndr_interface_num_calls(const struct GUID *uuid, uint32_t if_version); const struct ndr_interface_table *ndr_table_by_name(const char *name); +const struct ndr_interface_table *ndr_table_by_syntax(const struct ndr_syntax_id *syntax); const struct ndr_interface_table *ndr_table_by_uuid(const struct GUID *uuid); const struct ndr_interface_list *ndr_table_list(void); NTSTATUS ndr_table_init(void); |