summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-27 05:34:28 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-27 05:34:28 +0000
commitab3d728b7e7b1f3aa878ed5601a45ba08a08eb1f (patch)
treefa5e981618d0128676d6954beb5f90fda0c923e6 /source4/build/pidl
parent61bb3c865c4d4324cd2c1ea7d8b337b15dd66493 (diff)
downloadsamba-ab3d728b7e7b1f3aa878ed5601a45ba08a08eb1f.tar.gz
samba-ab3d728b7e7b1f3aa878ed5601a45ba08a08eb1f.tar.bz2
samba-ab3d728b7e7b1f3aa878ed5601a45ba08a08eb1f.zip
added an rpc scanner. This prints messages like this:
uuid 82273fdc-e32a-18c3-3f78-827929dc23ea version 0x0000:0x0000 'eventlog' 24 calls available WARNING: local IDL defines 4 calls when all the WARNINGs are gone then we know we have all the calls :) (This used to be commit f5821b2468a0c46d0e5590de59562926d746c349)
Diffstat (limited to 'source4/build/pidl')
-rw-r--r--source4/build/pidl/header.pm3
-rw-r--r--source4/build/pidl/parser.pm8
2 files changed, 7 insertions, 4 deletions
diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm
index c71b8fbeb1..cdc4522517 100644
--- a/source4/build/pidl/header.pm
+++ b/source4/build/pidl/header.pm
@@ -241,10 +241,9 @@ sub HeaderInterface($)
$res .= "#define DCERPC_$name\_UUID \"$if_uuid\"\n";
$res .= "#define DCERPC_$name\_VERSION $if_version\n";
$res .= "#define DCERPC_$name\_NAME \"$interface->{NAME}\"\n\n";
+ $res .= "extern const struct dcerpc_interface_table dcerpc_table_$interface->{NAME};\n\n";
}
- $res .= "extern struct dcerpc_interface_table dcerpc_table_$interface->{NAME};\n\n";
-
foreach my $d (@{$data}) {
if ($d->{TYPE} eq "FUNCTION") {
my $u_name = uc $d->{NAME};
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm
index a7dad3707c..5c80812ec1 100644
--- a/source4/build/pidl/parser.pm
+++ b/source4/build/pidl/parser.pm
@@ -1246,13 +1246,17 @@ sub FunctionTable($)
my($interface) = shift;
my($data) = $interface->{DATA};
my $count = 0;
+ my $uname = uc $interface->{NAME};
foreach my $d (@{$data}) {
if ($d->{TYPE} eq "FUNCTION") { $count++; }
}
+ if ($count == 0) {
+ return;
+ }
- pidl "static const struct dcerpc_interface_call calls[] = {\n";
+ pidl "static const struct dcerpc_interface_call $interface->{NAME}\_calls[] = {\n";
foreach my $d (@{$data}) {
if ($d->{TYPE} eq "FUNCTION") {
pidl "\t{\n";
@@ -1266,7 +1270,7 @@ sub FunctionTable($)
}
pidl "\t{ NULL, 0, NULL, NULL }\n};\n\n";
- pidl "\nstruct dcerpc_interface_table dcerpc_table_$interface->{NAME} = {\"$interface->{NAME}\", $count,calls};\n\n";
+ pidl "\nconst struct dcerpc_interface_table dcerpc_table_$interface->{NAME} = {\"$interface->{NAME}\", DCERPC_$uname\_UUID, DCERPC_$uname\_VERSION, $count, $interface->{NAME}\_calls};\n\n";
}