summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2013-09-29 00:42:36 -0700
committerStefan Metzmacher <metze@samba.org>2014-10-09 22:06:47 +0200
commit5d0d45c9a71f137dc29ca79d49bd558f34bf1ff5 (patch)
tree12353ef62dc5c93a0d543952d406efcfe080c46a /pidl
parent87fb54b77f4b9caaf2b25635b7813e29a448aaa6 (diff)
downloadsamba-5d0d45c9a71f137dc29ca79d49bd558f34bf1ff5.tar.gz
pidl-wireshark: generate an error for the new Pipe type in typedef
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Matthieu Patou <mat@matws.net> Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Wireshark/NDR.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index 1d64e7f3d47..aa434d8ad1a 100644
--- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -188,6 +188,13 @@ sub Enum($$$$)
$self->register_type($name, "offset = $dissectorname(tvb, offset, pinfo, tree, drep, \@HF\@, \@PARAM\@);", "FT_UINT$enum_size", "BASE_DEC", "0", "VALS($valsstring)", $enum_size / 8);
}
+sub Pipe($$$$)
+{
+ my ($self,$e,$name,$ifname) = @_;
+ error($e->{ORIGINAL}, "Pipe not yet supported");
+ return;
+}
+
sub Bitmap($$$$)
{
my ($self,$e,$name,$ifname) = @_;
@@ -400,6 +407,8 @@ sub ElementLevel($$$$$$$$)
$self->pidl_code("di->call_data->flags = saved_flags;");
$self->deindent;
$self->pidl_code("}");
+ } elsif ($_->{TYPE} eq "PIPE") {
+ error($e->{ORIGINAL}, "Type PIPE not yet supported");
} else {
die("Unknown type `$_->{TYPE}'");
}
@@ -788,13 +797,13 @@ sub Type($$$$)
my ($self, $e, $name, $ifname) = @_;
$self->PrintIdl(DumpType($e->{ORIGINAL}));
-
{
ENUM => \&Enum,
STRUCT => \&Struct,
UNION => \&Union,
BITMAP => \&Bitmap,
- TYPEDEF => \&Typedef
+ TYPEDEF => \&Typedef,
+ PIPE => \&Pipe
}->{$e->{TYPE}}->($self, $e, $name, $ifname);
}