summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Wireshark
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-02-27 20:35:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:57 -0500
commit6f3c968e64ef5677759dafcc88092d3db2b4c6e9 (patch)
tree7053ce183d7bf7434424e57a8880158bdae9c734 /source4/pidl/lib/Parse/Pidl/Wireshark
parent787065289880a727ab7c8a6bbc1293c5b945dab8 (diff)
downloadsamba-6f3c968e64ef5677759dafcc88092d3db2b4c6e9.tar.gz
samba-6f3c968e64ef5677759dafcc88092d3db2b4c6e9.tar.bz2
samba-6f3c968e64ef5677759dafcc88092d3db2b4c6e9.zip
r21567: Add some more wireshark tests.
(This used to be commit 40e2956058fe4aaebf3f7269bce90339d7faf24f)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Wireshark')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm18
1 files changed, 11 insertions, 7 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index db7d2cf241..0374b60132 100644
--- a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -18,7 +18,7 @@ package Parse::Pidl::Wireshark::NDR;
use Exporter;
@ISA = qw(Exporter);
-@EXPORT_OK = qw(field2name @ett %res PrintIdl StripPrefixes %hf_used RegisterInterfaceHandoff $conformance register_hf_field CheckUsed);
+@EXPORT_OK = qw(field2name @ett %res PrintIdl StripPrefixes %hf_used RegisterInterfaceHandoff $conformance register_hf_field CheckUsed ProcessImport ProcessInclude find_type DumpEttList DumpEttDeclaration DumpHfList DumpHfDeclaration DumpFunctionTable);
use strict;
use Parse::Pidl qw(error warning);
@@ -671,7 +671,7 @@ sub RegisterInterface($)
indent;
$res{code}.=DumpHfList()."\n";
- $res{code}.="\n".DumpEttList()."\n";
+ $res{code}.="\n".DumpEttList(@ett)."\n";
if (defined($x->{UUID})) {
# These can be changed to non-pidl_code names if the old dissectors
@@ -730,8 +730,9 @@ sub ProcessInclude
{
my @includes = @_;
foreach (@includes) {
- pidl_hdr "#include \"$_\"\n";
+ pidl_hdr "#include \"$_\"";
}
+ pidl_hdr "";
}
sub ProcessImport
@@ -741,8 +742,9 @@ sub ProcessImport
next if($_ eq "security");
s/\.idl\"$//;
s/^\"//;
- pidl_hdr "#include \"packet-dcerpc-$_\.h\"\n";
+ pidl_hdr "#include \"packet-dcerpc-$_\.h\"";
}
+ pidl_hdr "";
}
sub ProcessInterface($)
@@ -924,7 +926,7 @@ sub Parse($$$$)
ProcessInclude(@{$_->{PATHS}}) if ($_->{TYPE} eq "INCLUDE");
}
- $res{ett} = DumpEttDeclaration();
+ $res{ett} = DumpEttDeclaration(@ett);
$res{hf} = DumpHfDeclaration();
my $parser = $notice;
@@ -956,8 +958,9 @@ sub register_ett($)
push (@ett, $name);
}
-sub DumpEttList()
+sub DumpEttList
{
+ my @ett = @_;
my $res = "\tstatic gint *ett[] = {\n";
foreach (@ett) {
$res .= "\t\t&$_,\n";
@@ -966,8 +969,9 @@ sub DumpEttList()
return "$res\t};\n";
}
-sub DumpEttDeclaration()
+sub DumpEttDeclaration
{
+ my @ett = @_;
my $res = "\n/* Ett declarations */\n";
foreach (@ett) {
$res .= "static gint $_ = -1;\n";