summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/config.mk4
-rw-r--r--source4/librpc/ndr/ndr_table.c (renamed from source4/librpc/rpc/table.c)50
-rw-r--r--source4/librpc/tables.pl10
-rw-r--r--source4/librpc/tools/ndrdump.c10
4 files changed, 37 insertions, 37 deletions
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index 5cec7e1f67..01f7b80490 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -287,8 +287,8 @@ librpc/gen_ndr/tables.c: $(IDL_NDR_PARSE_H_FILES)
mv librpc/gen_ndr/tables.x librpc/gen_ndr/tables.c
[SUBSYSTEM::NDR_TABLE]
-OBJ_FILES = rpc/table.o gen_ndr/tables.o
-PRIVATE_PROTO_HEADER = rpc/dcerpc_table.h
+OBJ_FILES = ndr/ndr_table.o gen_ndr/tables.o
+PRIVATE_PROTO_HEADER = ndr/ndr_table.h
PUBLIC_DEPENDENCIES = \
NDR_AUDIOSRV NDR_ECHO NDR_DCERPC \
NDR_DSBACKUP NDR_EFS NDR_MISC NDR_LSA NDR_DFS NDR_DRSUAPI \
diff --git a/source4/librpc/rpc/table.c b/source4/librpc/ndr/ndr_table.c
index eddc6c4a20..9b43f8836d 100644
--- a/source4/librpc/rpc/table.c
+++ b/source4/librpc/ndr/ndr_table.c
@@ -22,42 +22,42 @@
#include "includes.h"
#include "lib/util/dlinklist.h"
-#include "librpc/rpc/dcerpc.h"
-#include "librpc/rpc/dcerpc_table.h"
+#include "librpc/ndr/libndr.h"
+#include "librpc/ndr/ndr_table.h"
-struct ndr_interface_list *dcerpc_pipes = NULL;
+static struct ndr_interface_list *ndr_interfaces;
/*
- register a dcerpc client interface
+ register a ndr interface table
*/
-NTSTATUS librpc_register_interface(const struct ndr_interface_table *interface)
+NTSTATUS ndr_table_register(const struct ndr_interface_table *table)
{
struct ndr_interface_list *l;
- for (l = dcerpc_pipes; l; l = l->next) {
- if (GUID_equal(&interface->syntax_id.uuid, &l->table->syntax_id.uuid)) {
+ for (l = ndr_interfaces; l; l = l->next) {
+ if (GUID_equal(&table->syntax_id.uuid, &l->table->syntax_id.uuid)) {
DEBUG(0, ("Attempt to register interface %s which has the "
- "same UUID as already registered interface %s\n",
- interface->name, l->table->name));
+ "same UUID as already registered interface %s\n",
+ table->name, l->table->name));
return NT_STATUS_OBJECT_NAME_COLLISION;
}
}
-
+
l = talloc(talloc_autofree_context(), struct ndr_interface_list);
- l->table = interface;
+ l->table = table;
+
+ DLIST_ADD(ndr_interfaces, l);
- DLIST_ADD(dcerpc_pipes, l);
-
return NT_STATUS_OK;
}
/*
find the pipe name for a local IDL interface
*/
-const char *idl_pipe_name(const struct GUID *uuid, uint32_t if_version)
+const char *ndr_interface_name(const struct GUID *uuid, uint32_t if_version)
{
const struct ndr_interface_list *l;
- for (l=librpc_dcerpc_pipes();l;l=l->next) {
+ for (l=ndr_table_list();l;l=l->next) {
if (GUID_equal(&l->table->syntax_id.uuid, uuid) &&
l->table->syntax_id.if_version == if_version) {
return l->table->name;
@@ -69,10 +69,10 @@ const char *idl_pipe_name(const struct GUID *uuid, uint32_t if_version)
/*
find the number of calls defined by local IDL
*/
-int idl_num_calls(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_list *l;
- for (l=librpc_dcerpc_pipes();l;l=l->next){
+ for (l=ndr_interfaces;l;l=l->next){
if (GUID_equal(&l->table->syntax_id.uuid, uuid) &&
l->table->syntax_id.if_version == if_version) {
return l->table->num_calls;
@@ -85,10 +85,10 @@ int idl_num_calls(const struct GUID *uuid, uint32_t if_version)
/*
find a dcerpc interface by name
*/
-const struct ndr_interface_table *idl_iface_by_name(const char *name)
+const struct ndr_interface_table *ndr_table_by_name(const char *name)
{
const struct ndr_interface_list *l;
- for (l=librpc_dcerpc_pipes();l;l=l->next) {
+ for (l=ndr_interfaces;l;l=l->next) {
if (strcasecmp(l->table->name, name) == 0) {
return l->table;
}
@@ -99,10 +99,10 @@ const struct ndr_interface_table *idl_iface_by_name(const char *name)
/*
find a dcerpc interface by uuid
*/
-const struct ndr_interface_table *idl_iface_by_uuid(const struct GUID *uuid)
+const struct ndr_interface_table *ndr_table_by_uuid(const struct GUID *uuid)
{
const struct ndr_interface_list *l;
- for (l=librpc_dcerpc_pipes();l;l=l->next) {
+ for (l=ndr_interfaces;l;l=l->next) {
if (GUID_equal(&l->table->syntax_id.uuid, uuid)) {
return l->table;
}
@@ -113,13 +113,13 @@ const struct ndr_interface_table *idl_iface_by_uuid(const struct GUID *uuid)
/*
return the list of registered dcerpc_pipes
*/
-const struct ndr_interface_list *librpc_dcerpc_pipes(void)
+const struct ndr_interface_list *ndr_table_list(void)
{
- return dcerpc_pipes;
+ return ndr_interfaces;
}
-NTSTATUS dcerpc_register_builtin_interfaces(void);
+NTSTATUS ndr_table_register_builtin_tables(void);
NTSTATUS ndr_table_init(void)
{
@@ -128,7 +128,7 @@ NTSTATUS ndr_table_init(void)
if (initialized) return NT_STATUS_OK;
initialized = True;
- dcerpc_register_builtin_interfaces();
+ ndr_table_register_builtin_tables();
return NT_STATUS_OK;
}
diff --git a/source4/librpc/tables.pl b/source4/librpc/tables.pl
index 946159c6f0..04764f5fa0 100644
--- a/source4/librpc/tables.pl
+++ b/source4/librpc/tables.pl
@@ -20,7 +20,7 @@ my $opt_help = 0;
sub ShowHelp()
{
print "
- perl DCE/RPC interface table generator
+ perl NDR interface table generator
Copyright (C) tridge\@samba.org
Usage: tables.pl [options] <idlfile>
@@ -53,7 +53,7 @@ sub process_file($)
while (my $line = <FILE>) {
if ($line =~ /extern const struct ndr_interface_table (\w+);/) {
$found = 1;
- $init_fns.="\tstatus = librpc_register_interface(&$1);\n";
+ $init_fns.="\tstatus = ndr_table_register(&$1);\n";
$init_fns.="\tif (NT_STATUS_IS_ERR(status)) return status;\n\n";
}
}
@@ -70,15 +70,15 @@ print <<EOF;
/* Automatically generated by tables.pl. DO NOT EDIT */
#include "includes.h"
-#include "librpc/rpc/dcerpc.h"
-#include "librpc/rpc/dcerpc_table.h"
+#include "librpc/ndr/libndr.h"
+#include "librpc/ndr/ndr_table.h"
EOF
process_file($_) foreach (@ARGV);
print <<EOF;
-NTSTATUS dcerpc_register_builtin_interfaces(void)
+NTSTATUS ndr_table_register_builtin_tables(void)
{
NTSTATUS status;
diff --git a/source4/librpc/tools/ndrdump.c b/source4/librpc/tools/ndrdump.c
index 2e57e882d6..4b840fed5a 100644
--- a/source4/librpc/tools/ndrdump.c
+++ b/source4/librpc/tools/ndrdump.c
@@ -23,8 +23,8 @@
#include "lib/cmdline/popt_common.h"
#include "system/filesys.h"
#include "system/locale.h"
-#include "librpc/rpc/dcerpc.h"
-#include "librpc/rpc/dcerpc_table.h"
+#include "librpc/ndr/libndr.h"
+#include "librpc/ndr/ndr_table.h"
#endif
static const struct ndr_interface_call *find_function(
@@ -55,7 +55,7 @@ static void show_pipes(void)
const struct ndr_interface_list *l;
printf("\nYou must specify a pipe\n");
printf("known pipes are:\n");
- for (l=librpc_dcerpc_pipes();l;l=l->next) {
+ for (l=ndr_table_list();l;l=l->next) {
if(l->table->helpstring) {
printf("\t%s - %s\n", l->table->name, l->table->helpstring);
} else {
@@ -218,7 +218,7 @@ const struct ndr_interface_table *load_iface_from_plugin(const char *plugin, con
}
#else
if (!p) {
- p = idl_iface_by_name(pipe_name);
+ p = ndr_table_by_name(pipe_name);
}
if (!p) {
@@ -227,7 +227,7 @@ const struct ndr_interface_table *load_iface_from_plugin(const char *plugin, con
status = GUID_from_string(pipe_name, &uuid);
if (NT_STATUS_IS_OK(status)) {
- p = idl_iface_by_uuid(&uuid);
+ p = ndr_table_by_uuid(&uuid);
}
}
#endif