3 ###################################################
4 # package to produce a table of all idl parsers
5 # Copyright tridge@samba.org 2003
6 # Copyright jelmer@samba.org 2005
7 # released under the GNU GPL
14 my $opt_output = 'librpc/gen_ndr/tables.c';
18 #########################################
23 perl DCE/RPC interface table generator
24 Copyright (C) tridge\@samba.org
26 Usage: tables.pl [options] <idlfile>
34 'help|h|?' => \
$opt_help,
35 'output=s' => \
$opt_output,
45 ###################################
46 # extract table entries from 1 file
50 open(FILE
, $filename) || die "unable to open $filename\n";
53 while (my $line = <FILE
>) {
54 if ($line =~ /extern const struct ndr_interface_table (\w+);/) {
56 $init_fns.="\tstatus = librpc_register_interface(&$1);\n";
57 $init_fns.="\tif (NT_STATUS_IS_ERR(status)) return status;\n\n";
62 print "#include \"$filename\"\n";
70 /* Automatically generated by tables.pl. DO NOT EDIT */
73 #include "librpc/rpc/dcerpc.h"
74 #include "librpc/rpc/dcerpc_table.h"
77 process_file
($_) foreach (@ARGV);
81 NTSTATUS dcerpc_register_builtin_interfaces(void)