From c455774d9330fc1903a701a2042e29f68b8227f8 Mon Sep 17 00:00:00 2001 From: Julien Kerihuel Date: Tue, 19 Feb 2008 01:55:01 +0100 Subject: Add INCLUDE command to pidl. (This used to be commit 8a8ed4fae849a2cc565a1ff77b2208a4cd6b1edb) --- .../pidl/lib/Parse/Pidl/Wireshark/Conformance.pm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'source4/pidl/lib/Parse') diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm index a240bbf9cd..43604cb51a 100644 --- a/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm +++ b/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm @@ -74,6 +74,10 @@ Change description for the specified header field. `field' is the hf name of the Code to insert when generating the specified dissector. @HF@ and @PARAM@ will be substituted. +=item I filename + +Include conformance data from the specified filename in the dissector. + =item I hf_name "true string" "false string" Override the text shown when a bitmap boolean value is enabled or disabled. @@ -331,6 +335,20 @@ sub handle_ett_field push (@{$data->{ett}}, $ett); } +sub handle_include +{ + my $pos = shift @_; + my $data = shift @_; + my $fn = shift @_; + + unless(defined($fn)) { + error($pos, "incomplete INCLUDE command"); + return; + }; + + ReadConformance($fn, $data); +} + my %field_handlers = ( TYPE => \&handle_type, NOEMIT => \&handle_noemit, @@ -343,7 +361,8 @@ my %field_handlers = ( STRIP_PREFIX => \&handle_strip_prefix, PROTOCOL => \&handle_protocol, FIELD_DESCRIPTION => \&handle_fielddescription, - IMPORT => \&handle_import + IMPORT => \&handle_import, + INCLUDE => \&handle_include ); sub ReadConformance($$) -- cgit From 35dd0b0f4ad6ab0d9365d2858b60bf82e4877bda Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 19 Feb 2008 02:02:48 +0100 Subject: Add test for INCLUDE command. (This used to be commit d1aa25249d64513f785430cab7437b5c7ca8db27) --- source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/pidl/lib/Parse') diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm index 43604cb51a..5c37b4a0c4 100644 --- a/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm +++ b/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm @@ -330,7 +330,7 @@ sub handle_ett_field unless(defined($ett)) { error($pos, "incomplete ETT_FIELD command"); return; - }; + } push (@{$data->{ett}}, $ett); } @@ -344,7 +344,7 @@ sub handle_include unless(defined($fn)) { error($pos, "incomplete INCLUDE command"); return; - }; + } ReadConformance($fn, $data); } -- cgit