diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-02-18 16:46:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:33 -0500 |
commit | f9885687878560c21c569a850cb7023b062b4e33 (patch) | |
tree | 115af1011cdaed8b1f5b724b23effe78b2bf1571 /source4/pidl/lib/Parse/Pidl/Wireshark | |
parent | 8cf122c2d2a0913fd9a7c55032c549598844111c (diff) | |
download | samba-f9885687878560c21c569a850cb7023b062b4e33.tar.gz samba-f9885687878560c21c569a850cb7023b062b4e33.tar.bz2 samba-f9885687878560c21c569a850cb7023b062b4e33.zip |
r21431: More tests, work on support in wireshark for tagged types.
(This used to be commit a91e624af22aae5b460ccf94d2540b8780f90070)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Wireshark')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index 4a890fb630..9ba6f2f3e0 100644 --- a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -25,7 +25,7 @@ use Parse::Pidl qw(error warning); use Parse::Pidl::Typelist qw(getType); use Parse::Pidl::Util qw(has_property property_matches make_str); use Parse::Pidl::NDR qw(ContainsString GetNextLevel); -use Parse::Pidl::Dump qw(DumpTypedef DumpFunction); +use Parse::Pidl::Dump qw(DumpType DumpFunction); use Parse::Pidl::Wireshark::Conformance qw(ReadConformance); use File::Basename; @@ -127,7 +127,7 @@ sub Interface($) { my($interface) = @_; Const($_,$interface->{NAME}) foreach (@{$interface->{CONSTS}}); - Typedef($_,$interface->{NAME}) foreach (@{$interface->{TYPES}}); + Type($_, $_->{NAME}, $interface->{NAME}) foreach (@{$interface->{TYPES}}); Function($_,$interface->{NAME}) foreach (@{$interface->{FUNCTIONS}}); } @@ -637,18 +637,26 @@ sub Const($$) } } -sub Typedef($$) +sub Typedef($$$) { - my ($e,$ifname) = @_; + my ($e,$name,$ifname) = @_; + + Type($e->{DATA}, $name, $ifname); +} + +sub Type($$$) +{ + my ($e, $name, $ifname) = @_; - PrintIdl DumpTypedef($e->{ORIGINAL}); + PrintIdl DumpType($e->{ORIGINAL}); { ENUM => \&Enum, STRUCT => \&Struct, UNION => \&Union, - BITMAP => \&Bitmap - }->{$e->{DATA}->{TYPE}}->($e->{DATA}, $e->{NAME}, $ifname); + BITMAP => \&Bitmap, + TYPEDEF => \&Typedef + }->{$e->{TYPE}}->($e, $name, $ifname); } sub RegisterInterface($) |