svn commit: samba r9424 - in
branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal: .
tpot at samba.org
tpot at samba.org
Sat Aug 20 11:42:12 GMT 2005
Author: tpot
Date: 2005-08-20 11:42:11 +0000 (Sat, 20 Aug 2005)
New Revision: 9424
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9424
Log:
Remove duplicate interface name in DCERPC subdissector strings. Also
shorten some of the autogenerated function names.
Modified:
branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm
Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm 2005-08-20 09:54:56 UTC (rev 9423)
+++ branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm 2005-08-20 11:42:11 UTC (rev 9424)
@@ -344,9 +344,12 @@
$dissectornames{$_->{NAME}} = Element($_, $fn->{NAME}, $ifname)
}
+ my $fn_name = $_->{NAME};
+ $fn_name =~ s/^${ifname}_//;
+
PrintIdl DumpFunction($fn->{ORIGINAL});
pidl_code "static int";
- pidl_code "$ifname\_dissect\_$fn->{NAME}_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)";
+ pidl_code "$ifname\_dissect\_${fn_name}_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)";
pidl_code "{";
indent;
foreach (@{$fn->{ELEMENTS}}) {
@@ -369,7 +372,7 @@
pidl_code "}\n";
pidl_code "static int";
- pidl_code "$ifname\_dissect\_$fn->{NAME}_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)";
+ pidl_code "$ifname\_dissect\_${fn_name}_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)";
pidl_code "{";
indent;
foreach (@{$fn->{ELEMENTS}}) {
@@ -826,10 +829,11 @@
my $if = shift;
my $res = "static dcerpc_sub_dissector $if->{NAME}\_dissectors[] = {\n";
-
foreach (@{$if->{FUNCTIONS}}) {
- $res.= "\t{ $_->{OPNUM}, \"$_->{NAME}\",\n";
- $res.= "\t $if->{NAME}_dissect_$_->{NAME}_request, $if->{NAME}_dissect_$_->{NAME}_response},\n";
+ my $fn_name = $_->{NAME};
+ $fn_name =~ s/^$if->{NAME}_//;
+ $res.= "\t{ $_->{OPNUM}, \"$fn_name\",\n";
+ $res.= "\t $if->{NAME}_dissect_${fn_name}_request, $if->{NAME}_dissect_${fn_name}_response},\n";
}
$res .= "\t{ 0, NULL, NULL, NULL }\n";
More information about the samba-cvs
mailing list