Wireshark-bugs: [Wireshark-bugs] [Bug 4234] New: stats_tree --> support floating point counts
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4234
Summary: stats_tree --> support floating point counts
Product: Wireshark
Version: 1.2.2
Platform: All
OS/Version: All
Status: NEW
Severity: Enhancement
Priority: Low
Component: Wireshark
AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
ReportedBy: s.sampanthan@xxxxxxxxx
Build Information:
Version 1.2.2 (SVN Rev 29932)
Copyright 1998-2009 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled with GTK+ 2.16.2, with GLib 2.20.3, with WinPcap (version unknown),
with libz 1.2.3, without POSIX capabilities, with libpcre 7.0, with SMI 0.4.8,
with c-ares 1.6.0, with Lua 5.1, with GnuTLS 2.8.1, with Gcrypt 1.4.4, with MIT
Kerberos, with GeoIP, with PortAudio V19-devel (built Oct 16 2009), with
AirPcap.
Running on Windows XP Service Pack 2, build 2600, with WinPcap version 4.1
beta5
(packet.dll version 4.1.0.1452), based on libpcap version 1.0.0, GnuTLS 2.8.1,
Gcrypt 1.4.4, without AirPcap.
Built using Microsoft Visual C++ 9.0 build 30729
Wireshark is Open Source Software released under the GNU General Public
License.
Check the man page and http://www.wireshark.org for more information.
--
Suppose we need to calculate some statistics from a "tapped" dissector, and now
we need to create the stats tree to display those results. I noticed that the
method
stats_tree_manip_node(manip_node_mode mode, stats_tree *st, const char *name,
int parent_id, gboolean with_hash, gint value)
only passes integer values (gint value), and that the “counter” field of
the “stat_node” struct is an integer as well. It would seem like an easy
change to make it floating point, and the displayed “rate” and
“percent” calculations would still make logical sense if the “count”
was floating point.
For example: suppose I want to do a total byte count for a particular protocol
payload. However I want this byte count to be in units of Mbytes as opposed to
bytes. In this case, it would be very useful to display this as a floating
point value in order to have precision.
Is there any reason that stat_node->counter is an integer? Is the WireShark
community open to making this a floating point type?
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.