1 ###################################################
2 # parse an ethereal conformance file
3 # Copyright jelmer@samba.org 2005
4 # released under the GNU GPL
6 package Parse::Pidl::Ethereal::Conformance;
11 @EXPORT_OK = qw(EmitProhibited);
15 use Parse::Pidl::Util qw(has_property);
17 sub handle_union_tag_size($$)
22 sub handle_type($$$$$$$)
24 my ($name,$dissectorname,$ft_type,$base_type,$mask,$valsstring,$alignment) = @_;
30 sub handle_hf_rename($$)
33 $hf_renames{$old} = $new;
36 sub handle_param_value($$)
38 my ($dissector_name,$value) = @_;
42 sub handle_hf_field($$$$$$$$)
44 my ($hf,$title,$filter,$ft_type,$base_type,$valsstring,$mask,$blub) = @_;
48 sub handle_strip_prefix($)
59 push (@noemit, $type);
62 my %field_handlers = (
63 UNION_TAG_SIZE => \&handle_union_tag_size,
64 TYPE => \&handle_type,
65 NOEMIT => \&handle_noemit,
66 PARAM_VALUE => \&handle_param_value,
67 HF_FIELD => \&handle_hf_field,
68 HF_RENAME => \&handle_hf_rename,
69 STRIP_PREFIX => \&handle_strip_prefix
76 open(IN,$f) or return undef;
82 my @fields = split(/ /);
84 $field_handlers{$fields[0]}(@fields);
94 return 1 if (grep(/$type/,@noemit));