Commit Graph

60 Commits

Author SHA1 Message Date
Bill Meier 7cd0417af5 Fix numerous instances of a variable/parameter name "shadowing" a library function name;
(At least some (gcc ?) compilers give a "shadow" warning for these).

svn path=/trunk/; revision=46402
2012-12-05 15:56:36 +00:00
Anders Broman 0f19bd385b From Jim Young:
Refactoring committed in Revision 460001 of tcp_graph.c introduced a copy&pasteo to wscale_make_elmtlist() such that compare_headers() would always return false.  Consequently no elements would get added to the list of elements to be plotted.

The attached patch corrects wscale_make_elmtlist() so that the Windows Scaling graph will plot elements.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8018

svn path=/trunk/; revision=46200
2012-11-26 08:50:25 +00:00
Bill Meier 6f606223aa Fix a [-Wshadow] warning;
svn path=/trunk/; revision=46188
2012-11-25 21:54:55 +00:00
Martin Mathieson 4fb9cfe714 Set line width 1 for the cairo context used to draw all lines (bug
8017).  Do it outside of the loop.

svn path=/trunk/; revision=46176
2012-11-25 14:15:02 +00:00
Martin Mathieson 8abda3c25a Needed to match up correct element lists for data + control for tcptrace
graphs.

Should really make clearer the way lists of elements are allocated and
the final next is assigned to NULL...

svn path=/trunk/; revision=46174
2012-11-25 02:04:00 +00:00
Martin Mathieson 6851b6dee2 Show ACK after data list, so grey/blue is visible when zoomed out.
svn path=/trunk/; revision=46173
2012-11-25 00:35:36 +00:00
Martin Mathieson 535a8887d7 From Jim Young:
- restore rendering TCP graph titles with black text (fixing bug 8016)

Plus a couple of updated comments.

svn path=/trunk/; revision=46164
2012-11-24 14:20:00 +00:00
Martin Mathieson f4c90e138d Was not allocating a large enough element array for tput graphs.
svn path=/trunk/; revision=46079
2012-11-18 19:52:48 +00:00
Martin Mathieson 1a1e7f38b7 - Make perform_zoom() quickly return if graph already fully zoomed out
- Restore zooming out with middle-button + shift
- Lose unused graph->next and register_tap_listener_tcp_graph()
- Fix up some whitespace

svn path=/trunk/; revision=46072
2012-11-18 15:56:29 +00:00
Martin Mathieson e9e2137c19 Try to cast away windows buildbot errors.
svn path=/trunk/; revision=46025
2012-11-13 20:13:32 +00:00
Martin Mathieson 14d585d743 Zoom in on a rectangle chosen by clicking and dragging the left mouse
button.

From Edwin Goothuis (bug 7931), with some small edits and
comments from me.

svn path=/trunk/; revision=46024
2012-11-13 19:37:58 +00:00
Martin Mathieson 777b1274df Initialise a variable and try to make the OSX-10.6-x64 buildbot happy.
svn path=/trunk/; revision=46007
2012-11-12 04:13:13 +00:00
Martin Mathieson 0aebd579e3 Show SACK information in TCP graphs. Also add a generated field for the
number of SACK ranges found in the SACK option.

This involved extending the IP options framework to include an extra
void* data field, which in the case of TCP is filled in with the tap
struct - other users currently pass NULL.

I first implemented the graph to sort the SACK ranges and show (in red)
the unacknowledged regions between them, but this became confusing where
the number of ranges is limited by TCP padding bytes. i.e. you can't
tell how many SACKs could have been encoded, so some of the gaps between
ranges may already have been received.

svn path=/trunk/; revision=46006
2012-11-12 03:55:46 +00:00
Martin Mathieson 0b3ffdd688 Allow TCP graphs to be launched from the conversation table window.
svn path=/trunk/; revision=46001
2012-11-11 18:32:47 +00:00
Jakub Zawadzki 77368c3668 Introduce epan_dissect_run_with_taps() which run dissection with taps.
unexport tap_queue_init, tap_push_tapped_queue

svn path=/trunk/; revision=45670
2012-10-20 19:27:24 +00:00
Jakub Zawadzki 78631020b8 Add wtap_pseudo_header union to wtap_pkthdr structure.
Use pkthdr instead of pseudo_header as argument for dissecting.

svn path=/trunk/; revision=45601
2012-10-16 21:50:57 +00:00
Martin Mathieson 6f112aa115 Copy of tap details needed to be a little bit deeper.
svn path=/trunk/; revision=45458
2012-10-10 23:09:52 +00:00
Martin Mathieson 81a50ff80b Take a deep copy of the tap struct in the tap function, as it is not
safe to access it after the packet has been fully dissected (the
struct will have been allocated with ep_alloc()).

svn path=/trunk/; revision=45449
2012-10-10 16:17:19 +00:00
Martin Mathieson 3884220435 Fix some indentation, add missing braces, and don't bother calling
cairo_set_width() inside the loops while doing the axes.

svn path=/trunk/; revision=45335
2012-10-06 00:23:23 +00:00
Martin Mathieson bf370afa44 When drawing an axis, only call cairo_stroke once all lines are drawn.
svn path=/trunk/; revision=45281
2012-10-03 09:15:16 +00:00
Martin Mathieson a273e4a913 Submit Jacub's fix for bug 7771 (hanging while drawing graph types that
involved ellipses). cairo_save/restore is nicer than
cairo_create/destroy, and quite a bit quicker too.

svn path=/trunk/; revision=45280
2012-10-03 08:58:12 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Martin Mathieson 1586d80a77 RLC: when zooming, use shift and control keys to lock vertical or
horizontal scaling respectively.

RLC+TCP: when already fully zoomed out, don't multiply zoom by 1.0 and redraw.
When holding down the key to zoom out, waiting to several redraws of the
whole graph to complete could take a while...

svn path=/trunk/; revision=44374
2012-08-09 04:02:35 +00:00
Martin Mathieson 3fc7c2348c Fix a couple of problems with the common zooming function.
svn path=/trunk/; revision=44341
2012-08-08 15:26:12 +00:00
Anders Broman 2e309b4d10 Remove cosshair cursor
svn path=/trunk/; revision=44340
2012-08-08 14:56:09 +00:00
Martin Mathieson aa65475748 Use a common function for doing zoom (shared by mouse and keyboard).
svn path=/trunk/; revision=44321
2012-08-08 02:51:22 +00:00
Martin Mathieson 9fd94df70f Do the cross like it is in rlc_lte_graph.c, i.e. by just drawing black
lines, then erasing by re-showing the current pixmap.

svn path=/trunk/; revision=44316
2012-08-07 23:04:48 +00:00
Anders Broman 52cb35b85a It should now compile with GDK_DISABLE_DEPRECATED
svn path=/trunk/; revision=44300
2012-08-07 13:58:23 +00:00
Martin Mathieson a0a35a9c49 Reset a flag when restore to original view, again to avoid leaving a
cross on the screen.

svn path=/trunk/; revision=44273
2012-08-05 01:04:41 +00:00
Martin Mathieson eab4e35254 When the graph has been redrawn (after resize or move), set the
redraw_needed flag to FALSE to avoid leaving crosses behind.

svn path=/trunk/; revision=44271
2012-08-05 00:27:48 +00:00
Martin Mathieson d89adc3f3b GTK3 still failing. Fix a typo.
svn path=/trunk/; revision=44270
2012-08-04 22:38:03 +00:00
Martin Mathieson ebc7cf7d41 GTK 3 is broken. This time, pass in GtkWidget* to get_mouse_position().
svn path=/trunk/; revision=44269
2012-08-04 22:07:54 +00:00
Martin Mathieson e6c095048d Try to enable the line crosshairs again.
This time, use a wrapper function get_mouse_position() that will call
the correct APIs whether GTK 3 or not.

svn path=/trunk/; revision=44268
2012-08-04 20:53:56 +00:00
Martin Mathieson 00c8b9f2ab Oops, seems that the cross-hair code uses the deprecated
gdk_window_get_pointer().  Turn it off again for now...

svn path=/trunk/; revision=44263
2012-08-04 18:37:34 +00:00
Martin Mathieson 8e4bd34d98 Add the cross-hairs back, can switch off again if doesn't work on all
supported platforms / library versions.

svn path=/trunk/; revision=44262
2012-08-04 17:51:34 +00:00
Anders Broman 9b2d2a2433 Make the #define USE_CROSSHAIR_CURSOR 0 codepath compile.
svn path=/trunk/; revision=44204
2012-08-02 11:37:06 +00:00
Martin Mathieson 1c3bee8ba4 Don't bother sorting the x & y order of the points in a line before
drawing.

svn path=/trunk/; revision=44199
2012-08-02 01:18:45 +00:00
Martin Mathieson e0d8893362 Don't try to clip the line to the outside of the visible area - let
cairo do it.  The clipping that was done worked properly for horizontal/verical
lines only, but would not for diagonal ones.

svn path=/trunk/; revision=44125
2012-07-29 23:03:50 +00:00
Evan Huus 98bbc5a3d9 Simply #ifdefs slightly in the graph code.
Makes cppcheck happier.

svn path=/trunk/; revision=44092
2012-07-28 15:16:41 +00:00
Martin Mathieson 51fdf55f23 Further speed up drawing of the element list by:
- only setting the colour when it has changed
- only calling cairo_stroke() when we need to rather than after every
  element

These improvements were previously made to rlc_lte_graph.c.  I did look
at trying to extract what these 2 graph modules  had in common, but gave up pretty quickly
when I saw how much they had diverged...

svn path=/trunk/; revision=44087
2012-07-28 02:46:46 +00:00
Martin Mathieson 2286e329b2 Don't increase refnum unless graph is created. Also, don't allocate
graph until know that we were able to choose a TCP session.
This could fail if e.g. a MAC LTE frame had > 1 bearers carrying TCP
segments.

svn path=/trunk/; revision=43977
2012-07-25 00:07:47 +00:00
Jakub Zawadzki 98c2390515 Fix some clang warnings: implicit conversion from enumeration type 'GtkStateType' to different enumeration type 'GtkStateFlags' [-Werror,-Wconversion]
GTK_STATE_NORMAL and GTK_STATE_FLAG_NORMAL are both 0.

svn path=/trunk/; revision=43854
2012-07-20 11:10:29 +00:00
Martin Mathieson 2d38d90b3e Don't create and destroy a cairo context for each line and ellipse when
redrawing the graph.

Don't mess around with a static pointer when allocating segments. This
seems unecessary and can result in the last one being leaked.

These changes were already made to rlc_lte_graph.c, which is based upon
the tcp graph code.

svn path=/trunk/; revision=43740
2012-07-16 03:05:35 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Pascal Quantin 5606383a72 C++ -> C-style comments
svn path=/trunk/; revision=43084
2012-06-04 21:31:18 +00:00
Anders Broman 7b43b3de0f Make it possible to build with GTK3 on Windows
svn path=/trunk/; revision=43083
2012-06-04 20:42:09 +00:00
Guy Harris dbfb305368 g_filename_display_basename() returns a g_mallocated string, so its
callers either need to free it or their callers need to free it or....

This means that cf_get_display_name() must always return a g_mallocated
string and its callers or... must free it.

For some of those callers, create a new set_window_title() routine to do
the work - they're all using the same pattern.

svn path=/trunk/; revision=43047
2012-06-03 22:03:05 +00:00
Anders Broman dbc4b09004 From Evan Huus Convert a bunch more GTK-2 calls to their cross-version ws_ equivalent
svn path=/trunk/; revision=43009
2012-06-02 23:53:04 +00:00
Anders Broman 01abbdf6d2 Add missing ";"
svn path=/trunk/; revision=42222
2012-04-24 14:48:46 +00:00
Michael Tüxen fd356ab4c8 Get it compiling...
svn path=/trunk/; revision=42214
2012-04-23 18:48:00 +00:00