summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pidl/lib/Parse/Pidl/NDR.pm2
-rw-r--r--pidl/lib/Parse/Pidl/Wireshark/Conformance.pm12
-rw-r--r--pidl/lib/Parse/Pidl/Wireshark/NDR.pm4
-rwxr-xr-xpidl/pidl13
4 files changed, 28 insertions, 3 deletions
diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm
index 7c0f7bb7b4..48a4ccbc95 100644
--- a/pidl/lib/Parse/Pidl/NDR.pm
+++ b/pidl/lib/Parse/Pidl/NDR.pm
@@ -406,6 +406,8 @@ sub align_type($)
if ($dt->{TYPE} eq "TYPEDEF") {
return align_type($dt->{DATA});
+ } elsif ($dt->{TYPE} eq "CONFORMANCE") {
+ return $dt->{DATA}->{ALIGN};
} elsif ($dt->{TYPE} eq "ENUM") {
return align_type(Parse::Pidl::Typelist::enum_type_fn($dt));
} elsif ($dt->{TYPE} eq "BITMAP") {
diff --git a/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm b/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm
index 5c37b4a0c4..1dec647d87 100644
--- a/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm
+++ b/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm
@@ -110,6 +110,7 @@ use strict;
use Parse::Pidl qw(fatal warning error);
use Parse::Pidl::Util qw(has_property);
+use Parse::Pidl::Typelist qw(addType);
sub handle_type($$$$$$$$$$)
{
@@ -149,6 +150,17 @@ sub handle_type($$$$$$$$$$)
VALSSTRING => $valsstring,
ALIGNMENT => $alignment
};
+
+ addType({
+ NAME => $name,
+ TYPE => "CONFORMANCE",
+ BASEFILE => "conformance file",
+ DATA => {
+ NAME => $name,
+ TYPE => "CONFORMANCE",
+ ALIGN => $alignment
+ }
+ });
}
sub handle_tfs($$$$$)
diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index a9ad555cca..e13e14465c 100644
--- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -1,5 +1,5 @@
##################################################
-# Samba4 NDR parser generator for IDL structures
+# Wireshark NDR parser generator for IDL structures
# Copyright tridge@samba.org 2000-2003
# Copyright tpot@samba.org 2001,2005
# Copyright jelmer@samba.org 2004-2007
@@ -895,7 +895,7 @@ sub Initialize($$)
sub Parse($$$$$)
{
my($self,$ndr,$idl_file,$h_filename,$cnf_file) = @_;
-
+
$self->Initialize($cnf_file);
return (undef, undef) if defined($self->{conformance}->{noemit_dissector});
diff --git a/pidl/pidl b/pidl/pidl
index bc0bb3524b..d0623a0690 100755
--- a/pidl/pidl
+++ b/pidl/pidl
@@ -653,7 +653,18 @@ sub process_file($)
$pidl = Parse::Pidl::ODL::ODL2IDL($pidl, dirname($idl_file), \@opt_incdirs);
- if (defined($opt_ws_parser) or
+ if (defined($opt_ws_parser)) {
+ require Parse::Pidl::Wireshark::NDR;
+
+ my $cnffile = $idl_file;
+ $cnffile =~ s/\.idl$/\.cnf/;
+
+ my $generator = new Parse::Pidl::Wireshark::NDR();
+ $generator->Initialize($cnffile);
+ }
+
+
+ if (defined($opt_ws_parser) or
defined($opt_client) or
defined($opt_server) or
defined($opt_header) or