use Parse::Pidl::Ethereal::Conformance qw(ReadConformance);
my %types;
+my %hf;
+my @ett;
my $conformance = {imports=>{}};
foreach (split /\n/, $idl) {
pidl_code "/* IDL: $_ */";
}
+
+ pidl_code "";
}
#####################################################################
{
my ($e,$name,$ifname) = @_;
my $valsstring = "$ifname\_$name\_vals";
- my $dissectorname = "$ifname\_dissect\_".StripPrefixes($name);
+ my $dissectorname = "$ifname\_dissect\_".StripPrefixes($name)."_enum";
+
return if (defined($conformance->{noemit}->{$dissectorname}));
foreach (@{$e->{ELEMENTS}}) {
pidl_code "$dissectorname(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param _U_)";
pidl_code "{";
indent;
- pidl_code "offset=dissect_ndr_$e->{BASE_TYPE}(tvb, offset, pinfo, tree, drep, hf_index, NULL);";
+ pidl_code "offset = dissect_ndr_$e->{BASE_TYPE}(tvb, offset, pinfo, tree, drep, hf_index, NULL);";
pidl_code "return offset;";
deindent;
pidl_code "}\n";
my $enum_size = $e->{BASE_TYPE};
$enum_size =~ s/uint//g;
- register_type($name, "offset=$dissectorname(tvb,offset,pinfo,tree,drep,\@HF\@,\@PARAM\@);", type2ft($e->{BASE_TYPE}), "BASE_DEC", "0", "VALS($valsstring)", $enum_size / 8);
+ register_type($name, "offset = $dissectorname(tvb, offset, pinfo, tree, drep, \@HF\@, \@PARAM\@);", type2ft($e->{BASE_TYPE}), "BASE_DEC", "0", "VALS($valsstring)", $enum_size / 8);
}
sub Bitmap($$$)
{
my ($e,$name,$ifname) = @_;
- my $dissectorname = "$ifname\_dissect\_".StripPrefixes($name);
+ my $dissectorname = "$ifname\_dissect\_".StripPrefixes($name)."_bitmap";
register_ett("ett_$ifname\_$name");
-
pidl_hdr "int $dissectorname(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index, guint32 param);";
pidl_code "int";
pidl_code "$dissectorname(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, int hf_index, guint32 param _U_)";
pidl_code "{";
indent;
- pidl_code "proto_item *item=NULL;";
- pidl_code "proto_tree *tree=NULL;";
+ pidl_code "proto_item *item = NULL;";
+ pidl_code "proto_tree *tree = NULL;";
pidl_code "";
pidl_code "g$e->{BASE_TYPE} flags;";
pidl_code "if(parent_tree) {";
indent;
- pidl_code "item=proto_tree_add_item(parent_tree, hf_index, tvb, offset, $e->{ALIGN}, TRUE);";
- pidl_code "tree=proto_item_add_subtree(item,ett_$ifname\_$name);";
+ pidl_code "item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, $e->{ALIGN}, TRUE);";
+ pidl_code "tree = proto_item_add_subtree(item,ett_$ifname\_$name);";
deindent;
pidl_code "}\n";
- pidl_code "offset=dissect_ndr_$e->{BASE_TYPE}(tvb, offset, pinfo, NULL, drep, -1, &flags);";
+ pidl_code "offset = dissect_ndr_$e->{BASE_TYPE}(tvb, offset, pinfo, NULL, drep, -1, &flags);";
pidl_code "proto_item_append_text(item, \": \");\n";
pidl_code "if (!flags)";
pidl_code "proto_tree_add_boolean(tree, $hf_bitname, tvb, offset-$e->{ALIGN}, $e->{ALIGN}, flags);";
pidl_code "if (flags&$ev){";
- pidl_code "\tproto_item_append_text(item,\"$en\");";
+ pidl_code "\tproto_item_append_text(item, \"$en\");";
pidl_code "\tif (flags & (~$ev))";
pidl_code "\t\tproto_item_append_text(item, \", \");";
pidl_code "}";
my $size = $e->{BASE_TYPE};
$size =~ s/uint//g;
- register_type($name, "offset=$dissectorname(tvb,offset,pinfo,tree,drep,\@HF\@,\@PARAM\@);", type2ft($e->{BASE_TYPE}), "BASE_DEC", "0", "NULL", $size/8);
+ register_type($name, "offset = $dissectorname(tvb, offset, pinfo, tree, drep, \@HF\@, \@PARAM\@);", type2ft($e->{BASE_TYPE}), "BASE_DEC", "0", "NULL", $size/8);
}
sub ElementLevel($$$$$)
} elsif ($l->{LEVEL} eq "EMBEDDED") {
$type = "embedded";
}
- pidl_code "offset=dissect_ndr_$type\_pointer(tvb,offset,pinfo,tree,drep,$myname\_,$ptrtype_mappings{$l->{POINTER_TYPE}},\"Pointer to ".field2name(StripPrefixes($e->{NAME})) . " ($e->{TYPE})\",$hf);";
+ pidl_code "offset = dissect_ndr_$type\_pointer(tvb, offset, pinfo, tree, drep, $myname\_, $ptrtype_mappings{$l->{POINTER_TYPE}}, \"Pointer to ".field2name(StripPrefixes($e->{NAME})) . " ($e->{TYPE})\",$hf);";
} elsif ($l->{TYPE} eq "ARRAY") {
if ($l->{IS_INLINE}) {
} elsif ($l->{IS_FIXED}) {
pidl_code "int i;";
pidl_code "for (i = 0; i < $l->{SIZE_IS}; i++)";
- pidl_code "\toffset=$myname\_(tvb,offset,pinfo,tree,drep);";
+ pidl_code "\toffset = $myname\_(tvb, offset, pinfo, tree, drep);";
} else {
my $af = "";
($af = "ucarray") if ($l->{IS_CONFORMANT});
($af = "uvarray") if ($l->{IS_VARYING});
($af = "ucvarray") if ($l->{IS_CONFORMANT} and $l->{IS_VARYING});
- pidl_code "offset=dissect_ndr_$af(tvb,offset,pinfo,tree,drep,$myname\_);";
+ pidl_code "offset = dissect_ndr_$af(tvb, offset, pinfo, tree, drep, $myname\_);";
}
} elsif ($l->{TYPE} eq "DATA") {
if ($l->{DATA_TYPE} eq "string") {
if (property_matches($e, "flag", ".*LIBNDR_FLAG_STR_SIZE4.*") and property_matches($e, "flag", ".*LIBNDR_FLAG_STR_LEN4.*")) {
pidl_code "char *data;\n";
- pidl_code "offset=dissect_ndr_cvstring(tvb,offset,pinfo,tree,drep,$bs,$hf,FALSE,&data);";
+ pidl_code "offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, $bs, $hf, FALSE, &data);";
pidl_code "proto_item_append_text(tree, \": %s\", data);";
} elsif (property_matches($e, "flag", ".*LIBNDR_FLAG_STR_SIZE4.*")) {
- pidl_code "offset=dissect_ndr_vstring(tvb,offset,pinfo,tree,drep,$bs,$hf,FALSE,NULL);";
+ pidl_code "offset = dissect_ndr_vstring(tvb, offset, pinfo, tree, drep, $bs, $hf, FALSE, NULL);";
} else {
warn("Unable to handle string with flags $e->{PROPERTIES}->{flag}");
}
} elsif ($conformance->{imports}->{$l->{DATA_TYPE}}) {
$call = $conformance->{imports}->{$l->{DATA_TYPE}};
} else {
- warn("Unknown data type `$l->{DATA_TYPE}'");
- pidl_code "/* FIXME: Handle unknown data type $l->{DATA_TYPE} */";
if ($l->{DATA_TYPE} =~ /^([a-z]+)\_(.*)$/)
{
- pidl_code "offset=$1_dissect_$2(tvb,offset,pinfo,tree,drep,$hf,$param);";
+ pidl_code "offset = $1_dissect_$2(tvb,offset,pinfo,tree,drep,$hf,$param);";
}
return;
} elsif ($_->{TYPE} eq "SUBCONTEXT") {
my $num_bits = ($l->{HEADER_SIZE}*8);
pidl_code "guint$num_bits size;";
- pidl_code "int start_offset=offset;";
+ pidl_code "int start_offset = offset;";
pidl_code "tvbuff_t *subtvb;";
- pidl_code "offset=dissect_ndr_uint$num_bits(tvb,offset,pinfo,tree,drep,$hf,&size);";
- pidl_code "proto_tree_add_text(tree,tvb,start_offset,offset-start_offset+size,\"Subcontext size\");";
+ pidl_code "offset = dissect_ndr_uint$num_bits(tvb, offset, pinfo, tree, drep, $hf, &size);";
+ pidl_code "proto_tree_add_text(tree, tvb, start_offset, offset - start_offset + size, \"Subcontext size\");";
- pidl_code "subtvb = tvb_new_subset(tvb,offset,size,-1);";
- pidl_code "$myname\_(subtvb,0,pinfo,tree,drep);";
+ pidl_code "subtvb = tvb_new_subset(tvb, offset, size, -1);";
+ pidl_code "$myname\_(subtvb, 0, pinfo, tree, drep);";
} else {
die("Unknown type `$_->{TYPE}'");
}
my $dissectorname = "$ifname\_dissect\_".StripPrefixes($pn)."\_".StripPrefixes($e->{NAME});
- my $call_code = "offset=$dissectorname(tvb,offset,pinfo,tree,drep);";
+ my $call_code = "offset = $dissectorname(tvb, offset, pinfo, tree, drep);";
my $hf = register_hf_field("hf_$ifname\_$pn\_$e->{NAME}", field2name($e->{NAME}), "$ifname.$pn.$e->{NAME}", type2ft($e->{TYPE}), "BASE_HEX", "NULL", 0, "");
my $add = "";
foreach (@{$e->{LEVELS}}) {
- next if ($_->{TYPE} eq "SWITCH");
+ last if ($_->{TYPE} eq "SWITCH");
pidl_def "static int $dissectorname$add(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep);";
pidl_code "static int";
pidl_code "$dissectorname$add(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep)";
ElementLevel($e,$_,$hf,$dissectorname.$add,$pn);
+ pidl_code "";
pidl_code "return offset;";
deindent;
pidl_code "}\n";
my %dissectornames;
foreach (@{$fn->{ELEMENTS}}) {
- $dissectornames{$_->{NAME}} = Element($_, $fn->{NAME}, $ifname)
+ $dissectornames{$_->{NAME}} = Element($_, $fn->{NAME}, $ifname) if not defined($dissectornames{$_->{NAME}});
}
my $fn_name = $_->{NAME};
foreach (@{$fn->{ELEMENTS}}) {
if (grep(/out/,@{$_->{DIRECTION}})) {
pidl_code "$dissectornames{$_->{NAME}}";
- pidl_code "offset=dissect_deferred_pointers(pinfo,tvb,offset,drep);";
+ pidl_code "offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);";
pidl_code "";
}
}
if (not defined($fn->{RETURN_TYPE})) {
} elsif ($fn->{RETURN_TYPE} eq "NTSTATUS") {
- pidl_code "offset=dissect_ntstatus(tvb,offset,pinfo,tree,drep,hf\_$ifname\_status, NULL);";
+ pidl_code "offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf\_$ifname\_status, NULL);";
} elsif ($fn->{RETURN_TYPE} eq "WERROR") {
- pidl_code "offset=dissect_ndr_uint32(tvb,offset,pinfo,tree,drep,hf\_$ifname\_werror, NULL);";
+ pidl_code "offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf\_$ifname\_werror, NULL);";
}
pidl_code "return offset;";
foreach (@{$fn->{ELEMENTS}}) {
if (grep(/in/,@{$_->{DIRECTION}})) {
pidl_code "$dissectornames{$_->{NAME}}";
- pidl_code "offset=dissect_deferred_pointers(pinfo,tvb,offset,drep);";
+ pidl_code "offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);";
}
}
}
pidl_code "";
- pidl_code "old_offset=offset;";
+ pidl_code "old_offset = offset;";
pidl_code "";
pidl_code "if(parent_tree){";
indent;
- pidl_code "item=proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);";
- pidl_code "tree=proto_item_add_subtree(item, ett_$ifname\_$name);";
+ pidl_code "item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);";
+ pidl_code "tree = proto_item_add_subtree(item, ett_$ifname\_$name);";
deindent;
pidl_code "}";
pidl_code "\n$res";
- pidl_code "proto_item_set_len(item, offset-old_offset);";
+ pidl_code "proto_item_set_len(item, offset-old_offset);\n";
pidl_code "return offset;";
deindent;
pidl_code "}\n";
- register_type($name, "offset=$dissectorname(tvb,offset,pinfo,tree,drep,\@HF\@,\@PARAM\@);", "FT_NONE", "BASE_NONE", 0, "NULL", 0);
+ register_type($name, "offset = $dissectorname(tvb,offset,pinfo,tree,drep,\@HF\@,\@PARAM\@);", "FT_NONE", "BASE_NONE", 0, "NULL", 0);
}
sub Union($$$)
pidl_code "$dissectorname(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, int hf_index, guint32 param _U_)";
pidl_code "{";
indent;
- pidl_code "proto_item *item=NULL;";
- pidl_code "proto_tree *tree=NULL;";
+ pidl_code "proto_item *item = NULL;";
+ pidl_code "proto_tree *tree = NULL;";
pidl_code "int old_offset;";
pidl_code "g$e->{SWITCH_TYPE} level;";
pidl_code "";
pidl_code "";
- pidl_code "old_offset=offset;";
+ pidl_code "old_offset = offset;";
pidl_code "if(parent_tree){";
indent;
- pidl_code "item=proto_tree_add_text(parent_tree,tvb,offset,-1,\"$name\");";
- pidl_code "tree=proto_item_add_subtree(item,ett_$ifname\_$name);";
+ pidl_code "item = proto_tree_add_text(parent_tree, tvb, offset, -1, \"$name\");";
+ pidl_code "tree = proto_item_add_subtree(item, ett_$ifname\_$name);";
deindent;
pidl_code "}";
pidl_code "offset = dissect_ndr_$e->{SWITCH_TYPE}(tvb, offset, pinfo, tree, drep, hf_index, &level);";
pidl_code "switch(level) {$res\t}";
- pidl_code "proto_item_set_len(item, offset-old_offset);";
+ pidl_code "proto_item_set_len(item, offset-old_offset);\n";
pidl_code "return offset;";
deindent;
pidl_code "}";
- register_type($name, "offset=$dissectorname(tvb,offset,pinfo,tree,drep,\@HF\@,\@PARAM\@);", "FT_NONE", "BASE_NONE", 0, "NULL", 0);
+ register_type($name, "offset = $dissectorname(tvb, offset, pinfo, tree, drep, \@HF\@, \@PARAM\@);", "FT_NONE", "BASE_NONE", 0, "NULL", 0);
}
sub Const($$)
# in epan/dissctors are deleted.
my $name = "\"" . uc($x->{NAME}) . " (pidl)\"";
- my $short_name = $x->{NAME};
+ my $short_name = uc($x->{NAME});
my $filter_name = $x->{NAME};
if (has_property($x, "helpstring")) {
sub RegisterInterfaceHandoff($)
{
my $x = shift;
- pidl_code "void proto_reg_handoff_dcerpc_$x->{NAME}(void)";
- pidl_code "{";
- indent;
- pidl_code "dcerpc_init_uuid(proto_dcerpc_$x->{NAME}, ett_dcerpc_$x->{NAME},";
- pidl_code "\t&uuid_dcerpc_$x->{NAME}, ver_dcerpc_$x->{NAME},";
- pidl_code "\t$x->{NAME}_dissectors, hf_$x->{NAME}_opnum);";
- deindent;
- pidl_code "}";
+
+ if (defined($x->{UUID})) {
+ pidl_code "void proto_reg_handoff_dcerpc_$x->{NAME}(void)";
+ pidl_code "{";
+ indent;
+ pidl_code "dcerpc_init_uuid(proto_dcerpc_$x->{NAME}, ett_dcerpc_$x->{NAME},";
+ pidl_code "\t&uuid_dcerpc_$x->{NAME}, ver_dcerpc_$x->{NAME},";
+ pidl_code "\t$x->{NAME}_dissectors, hf_$x->{NAME}_opnum);";
+ deindent;
+ pidl_code "}";
+ }
}
sub ProcessInterface($)
$conformance = {};
- ReadConformance($cnf_file, $conformance) or print "Warning: Not using conformance file `$cnf_file'\n";
+ ReadConformance($cnf_file, $conformance) or print "Warning: No conformance file `$cnf_file'\n";
foreach my $bytes (qw(1 2 4 8)) {
my $bits = $bytes * 8;
- register_type("uint$bits", "offset=dissect_ndr_uint$bits(tvb,offset,pinfo,tree,drep,\@HF\@,NULL);", "FT_UINT$bits", "BASE_DEC", 0, "NULL", $bytes);
- register_type("int$bits", "offset=dissect_ndr_uint$bits(tvb,offset,pinfo,tree,drep,\@HF\@,NULL);", "FT_INT$bits", "BASE_DEC", 0, "NULL", $bytes);
+ register_type("uint$bits", "offset = dissect_ndr_uint$bits(tvb, offset, pinfo, tree, drep, \@HF\@,NULL);", "FT_UINT$bits", "BASE_DEC", 0, "NULL", $bytes);
+ register_type("int$bits", "offset = dissect_ndr_uint$bits(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);", "FT_INT$bits", "BASE_DEC", 0, "NULL", $bytes);
}
- register_type("udlong", "offset=dissect_ndr_duint32(tvb,offset,pinfo,tree,drep,\@HF\@,NULL);", "FT_UINT64", "BASE_DEC", 0, "NULL", 4);
- register_type("bool8", "offset=dissect_ndr_uint8(tvb,offset,pinfo,tree,drep,\@HF\@,NULL);","FT_INT8", "BASE_DEC", 0, "NULL", 1);
- register_type("char", "offset=dissect_ndr_uint8(tvb,offset,pinfo,tree,drep,\@HF\@,NULL);","FT_INT8", "BASE_DEC", 0, "NULL", 1);
- register_type("long", "offset=dissect_ndr_uint32(tvb,offset,pinfo,tree,drep,\@HF\@,NULL);","FT_INT32", "BASE_DEC", 0, "NULL", 4);
- register_type("dlong", "offset=dissect_ndr_duint32(tvb,offset,pinfo,tree,drep,\@HF\@,NULL);","FT_INT64", "BASE_DEC", 0, "NULL", 8);
- register_type("GUID", "offset=dissect_ndr_uuid_t(tvb,offset,pinfo,tree,drep,\@HF\@,NULL);","FT_GUID", "BASE_NONE", 0, "NULL", 4);
- register_type("policy_handle", "offset=dissect_nt_policy_hnd(tvb,offset,pinfo,tree,drep,\@HF\@,NULL,NULL,\@PARAM\@&0x01,\@PARAM\@&0x02);","FT_BYTES", "BASE_NONE", 0, "NULL", 4);
- register_type("NTTIME", "offset=dissect_ndr_nt_NTTIME(tvb,offset,pinfo,tree,drep,\@HF\@);","FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4);
- register_type("NTTIME_hyper", "offset=dissect_ndr_nt_NTTIME(tvb,offset,pinfo,tree,drep,\@HF\@);","FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4);
- register_type("time_t", "offset=dissect_ndr_time_t(tvb,offset,pinfo,tree,drep,\@HF\@,NULL);","FT_ABSOLUTE_TIME", "BASE_DEC", 0, "NULL", 4);
- register_type("NTTIME_1sec", "offset=dissect_ndr_nt_NTTIME(tvb,offset,pinfo,tree,drep,\@HF\@);", "FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4);
+ register_type("udlong", "offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);", "FT_UINT64", "BASE_DEC", 0, "NULL", 4);
+ register_type("bool8", "offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);","FT_INT8", "BASE_DEC", 0, "NULL", 1);
+ register_type("char", "offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);","FT_INT8", "BASE_DEC", 0, "NULL", 1);
+ register_type("long", "offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);","FT_INT32", "BASE_DEC", 0, "NULL", 4);
+ register_type("dlong", "offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);","FT_INT64", "BASE_DEC", 0, "NULL", 8);
+ register_type("GUID", "offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);","FT_GUID", "BASE_NONE", 0, "NULL", 4);
+ register_type("policy_handle", "offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep, \@HF\@, NULL, NULL, \@PARAM\@&0x01, \@PARAM\@&0x02);","FT_BYTES", "BASE_NONE", 0, "NULL", 4);
+ register_type("NTTIME", "offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, \@HF\@);","FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4);
+ register_type("NTTIME_hyper", "offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, \@HF\@);","FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4);
+ register_type("time_t", "offset = dissect_ndr_time_t(tvb, offset, pinfo,tree, drep, \@HF\@, NULL);","FT_ABSOLUTE_TIME", "BASE_DEC", 0, "NULL", 4);
+ register_type("NTTIME_1sec", "offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, \@HF\@);", "FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4);
register_type("SID", "
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
di->hf_index = \@HF\@;
- offset=dissect_ndr_nt_SID_with_options(tvb,offset,pinfo,tree,drep,param);
+ offset = dissect_ndr_nt_SID_with_options(tvb, offset, pinfo, tree, drep, param);
","FT_STRING", "BASE_DEC", 0, "NULL", 4);
register_type("WERROR",
- "offset=dissect_ndr_uint32(tvb,offset,pinfo,tree,drep,\@HF\@,NULL);","FT_UINT32", "BASE_DEC", 0, "VALS(NT_errors)", 4);
+ "offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, \@HF\@, NULL);","FT_UINT32", "BASE_DEC", 0, "VALS(NT_errors)", 4);
}
#####################################################################
# Generate ethereal parser and header code
-sub Parse($$)
+sub Parse($$$$)
{
- my($ndr,$h_filename,$cnf_file) = @_;
+ my($ndr,$idl_file,$h_filename,$cnf_file) = @_;
Initialize($cnf_file);
$tabs = "";
%res = (code=>"",def=>"",hdr=>"");
+ %hf = ();
+ @ett = ();
- pidl_hdr "/* header auto-generated by pidl */";
+ my $notice =
+"/* DO NOT EDIT
+ This filter was automatically generated
+ from $idl_file and $cnf_file.
+
+ Pidl is a perl based IDL compiler for DCE/RPC idl files.
+ It is maintained by the Samba team, not the Ethereal team.
+ Instructions on how to download and install Pidl can be
+ found at http://wiki.ethereal.com/Pidl
+*/
+
+";
+
+ pidl_hdr $notice;
$res{headers} = "\n";
$res{headers} .= "#ifdef HAVE_CONFIG_H\n";
$res{ett} = DumpEttDeclaration();
$res{hf} = DumpHfDeclaration();
- my $parser = "/* parser auto-generated by pidl */";
+ my $parser = $notice;
$parser.= $res{headers};
$parser.=$res{ett};
$parser.=$res{hf};
# ETT
###############################################################################
-my @ett = ();
-
sub register_ett($)
{
my $name = shift;
# HF
###############################################################################
-my %hf = ();
-
sub register_hf_field($$$$$$$$)
{
my ($index,$name,$filter_name,$ft_type,$base_type,$valsstring,$mask,$blurb) = @_;