summaryrefslogtreecommitdiff
path: root/source4/build/pidl/Parse/Pidl/Ethereal/Conformance.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-05 23:49:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:23 -0500
commit4d4691a16b1ef9e1116b212bafdbcfb22d049f41 (patch)
treef4d7d8b80017cdb07867acbeaa422751e1f571bc /source4/build/pidl/Parse/Pidl/Ethereal/Conformance.pm
parent90a61d99b45345820cf2950bfcbbf71d09bf4be4 (diff)
downloadsamba-4d4691a16b1ef9e1116b212bafdbcfb22d049f41.tar.gz
samba-4d4691a16b1ef9e1116b212bafdbcfb22d049f41.tar.bz2
samba-4d4691a16b1ef9e1116b212bafdbcfb22d049f41.zip
r9150: The ethereal parser generators work now. Thanks to Ronnie Sahlberg for
help with the debugging and comments on the generated code (-: (This used to be commit 4c165f8ff65b4500d8366b655d6df2a065f35bf5)
Diffstat (limited to 'source4/build/pidl/Parse/Pidl/Ethereal/Conformance.pm')
-rw-r--r--source4/build/pidl/Parse/Pidl/Ethereal/Conformance.pm27
1 files changed, 24 insertions, 3 deletions
diff --git a/source4/build/pidl/Parse/Pidl/Ethereal/Conformance.pm b/source4/build/pidl/Parse/Pidl/Ethereal/Conformance.pm
index 54031f031a..910b604158 100644
--- a/source4/build/pidl/Parse/Pidl/Ethereal/Conformance.pm
+++ b/source4/build/pidl/Parse/Pidl/Ethereal/Conformance.pm
@@ -8,7 +8,7 @@ package Parse::Pidl::Ethereal::Conformance;
require Exporter;
@ISA = qw(Exporter);
-@EXPORT_OK = qw(EmitProhibited FindDissectorParam %hf_renames);
+@EXPORT_OK = qw(EmitProhibited FindDissectorParam %hf_renames %protocols);
use strict;
@@ -21,7 +21,7 @@ sub handle_union_tag_size($$)
#FIXME
}
-use vars qw(%hf_renames %types %header_fields);
+use vars qw(%hf_renames %types %header_fields %protocols);
sub handle_type($$$$$$$)
{
@@ -86,6 +86,25 @@ sub handle_noemit($)
push (@noemit, $type);
}
+
+sub handle_protocol($$$$)
+{
+ my ($name, $longname, $shortname, $filtername) = @_;
+
+ $protocols{$name} = {
+ LONGNAME => $longname,
+ SHORTNAME => $shortname,
+ FILTERNAME => $filtername
+ };
+}
+
+sub handle_fielddescription($$)
+{
+ my ($field,$desc) = @_;
+
+ #FIXME
+}
+
my %field_handlers = (
UNION_TAG_SIZE => \&handle_union_tag_size,
TYPE => \&handle_type,
@@ -93,7 +112,9 @@ my %field_handlers = (
PARAM_VALUE => \&handle_param_value,
HF_FIELD => \&handle_hf_field,
HF_RENAME => \&handle_hf_rename,
- STRIP_PREFIX => \&handle_strip_prefix
+ STRIP_PREFIX => \&handle_strip_prefix,
+ PROTOCOL => \&handle_protocol,
+ FIELD_DESCRIPTION => \&handle_fielddescription
);
sub Parse($)