Wireshark mailing list archives
Re: [Wireshark-commits] rev 44316: /trunk/ui/gtk/ /trunk/ui/gtk/: tcp_graph.c
From: Anders Broman <anders.broman () ericsson com>
Date: Wed, 8 Aug 2012 09:32:06 +0200
-----Original Message----- From: wireshark-dev-bounces () wireshark org [mailto:wireshark-dev-bounces () wireshark org] On Behalf Of Joerg Mayer Sent: den 8 augusti 2012 09:20 To: Developer support list for Wireshark Subject: Re: [Wireshark-dev] [Wireshark-commits] rev 44316: /trunk/ui/gtk/ /trunk/ui/gtk/: tcp_graph.c
Hello Martin,
thanks for the detailed writeup.
On Tue, Aug 7, 2012 at 7:16 PM, Joerg Mayer <jmayer () loplof de> wrote:
Naive question: Why isn't that cross handling code shared between the two files?
I think it was Guy that asked before about factoring out code that is common between the 2 modules. I really dislike that there is identical code in both modules. I did start to make a list of types and functions that could be shared, but it quickly looked messy. I couldn't even decide what to call the new module (was it just to be shared between these 2 files, or would it likely be useful for someone creating a third module like these?).Maybe call it graph_common.[hc] and move the stuff in there that is of interest to more than one graphing module.
Or graph_utils.c
rlc_lte_graph.c began as a copy of tcp_graph.c. Initially there were some features that I didn't like (or in some cases didn't understand) so cut them out. Some of them I have since added back, with improvements copied back to the TCP graph. The biggest change is that I didn't want to have the control window, so there are various places where I cut out references to the controls in the control panel that affects behaviour of the graph, then tried to automatically do the sensible thing (e.g. customising the way the zoom factors work, or the way the divisions on the axis work). Even where some functions are textually the same, they often refer to types (chiefly the graph struct) that are different between the 2 graphs. This could have worked well in C++...
Io_graph.c rtp_analysis.c and iax_analysis.c is very similar and there's the same problem of sharing code.
If they are similar, then how about having a common graph structure with (a) task specific pointer(s) at then end?
Something alog those lines might work e.g a shared graph structure.
I will stop messing around with the RLC graph soon - it may be easier to see how to share what they have in common when it has settled down.OK, looks like this may become a much larger task than is worth doing - depending on time and interest.
Yes I sort of gave up on the io_graph. Ciao Jörg -- Joerg Mayer <jmayer () loplof de> We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Re: [Wireshark-commits] rev 44316: /trunk/ui/gtk/ /trunk/ui/gtk/: tcp_graph.c Joerg Mayer (Aug 07)
- Re: [Wireshark-commits] rev 44316: /trunk/ui/gtk/ /trunk/ui/gtk/: tcp_graph.c Martin Mathieson (Aug 07)
- Re: [Wireshark-commits] rev 44316: /trunk/ui/gtk/ /trunk/ui/gtk/: tcp_graph.c Joerg Mayer (Aug 08)
- Re: [Wireshark-commits] rev 44316: /trunk/ui/gtk/ /trunk/ui/gtk/: tcp_graph.c Anders Broman (Aug 08)
- Re: [Wireshark-commits] rev 44316: /trunk/ui/gtk/ /trunk/ui/gtk/: tcp_graph.c Joerg Mayer (Aug 08)
- Re: [Wireshark-commits] rev 44316: /trunk/ui/gtk/ /trunk/ui/gtk/: tcp_graph.c Anders Broman (Aug 08)
- Unifying graphics Joerg Mayer (Aug 08)
- Re: Unifying graphics Guy Harris (Aug 08)
- Re: Unifying graphics Jakub Zawadzki (Aug 12)
- Re: [Wireshark-commits] rev 44316: /trunk/ui/gtk/ /trunk/ui/gtk/: tcp_graph.c Joerg Mayer (Aug 08)
- Re: [Wireshark-commits] rev 44316: /trunk/ui/gtk/ /trunk/ui/gtk/: tcp_graph.c Martin Mathieson (Aug 07)