Commit Graph

584 Commits

Author SHA1 Message Date
Anders Broman 1108352f00 Use col_text in frame data.
- colum-utils needs more work, based on
 Didier Gautherons optimizations patch http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=29489
2009-08-21 10:12:47 +00:00
Kovarththanan Rajaratnam 82adb33a48 We shouldn't conditionalise on _filtering_ tap listerners to determine whether tapping should be performed or not. We also need to handle _normal_ tap listerners. This change backs out the regression introduced in r29435.
Thanks to Didier: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3916

svn path=/trunk/; revision=29475
2009-08-19 13:52:15 +00:00
Kovarththanan Rajaratnam d4ba2208ec Inline a few checks in the add_packet_to_packet_list() function since it's called in tight loop. This will help us to avoid calling functions that simply returns. This is especially the case when we're dealing with the new packet list due to its dissect-on-demand nature where colour/column construction is delayed until the row becomes visible.
svn path=/trunk/; revision=29435
2009-08-15 14:13:36 +00:00
Kovarththanan Rajaratnam 81c7e34905 Make display filtering work for NEW_PACKET_LIST. This didn't work previously because we would simply append the new filtered packets onto the existing ones.
svn path=/trunk/; revision=29409
2009-08-14 05:49:57 +00:00
Kovarththanan Rajaratnam 68e75a961b Always add packet to the new packet list regardless of whether the packet passed the display filter test or not. We do this because we do the filtering inside the new packet list.
svn path=/trunk/; revision=29408
2009-08-14 05:22:12 +00:00
Kovarththanan Rajaratnam 80a6d3fbcf Introduce epan_dissect_init()/epan_dissect_cleanup(). These are used to initialise/cleanup stack allocated 'edt' structures. This should speed up dissection since we avoid some malloc traffic.
svn path=/trunk/; revision=29404
2009-08-13 19:42:46 +00:00
Anders Broman ca335d25cb From Kovarththanan Rajaratnam:
- Compute and cache color/custom filters dynamically.
- Delay column construction.

svn path=/trunk/; revision=29370
2009-08-10 20:52:56 +00:00
Kovarththanan Rajaratnam 3512e485ca Add PNODE_FINFO. We've been using PITEM_FINFO on proto_node's. This works because proto_item is typedefed to proto_node. We shouldn't rely on this since this is an implementation detail.
svn path=/trunk/; revision=29354
2009-08-09 17:33:23 +00:00
Kovarththanan Rajaratnam d2b61c0297 Free frame data slice on file reset
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3813

svn path=/trunk/; revision=29322
2009-08-07 12:15:46 +00:00
Anders Broman 3ec8398f16 From Kovarththanan Rajaratnam:
This patch fixes the "Decode as" crash. We now freeze the packetlist before
attempting to clear it. This way we don't have to issue a row deleted signal
either.

svn path=/trunk/; revision=29238
2009-07-29 21:32:49 +00:00
Anders Broman 26d1dfcf4c Add pinfo to new_packet_list_append() this should give us the abillity
to store (most) of the underlying data rather than the strings in the store and render it when we need it, thuss saving storage space and loading time.

Idealy we should not store the complete fdata or pinfo structures
but rather just the data relevant to the currently selected/used columns. I'm not entierly sure how to accomplish that however.

Dynamically allocated array to hold pointers to the actual data?

svn path=/trunk/; revision=29237
2009-07-29 20:58:47 +00:00
Anders Broman d4caa4ec50 Pacify the build bot.
svn path=/trunk/; revision=29222
2009-07-28 18:29:15 +00:00
Anders Broman 09c6b577f9 Set reftime without recreating the packet list.
svn path=/trunk/; revision=29220
2009-07-28 16:20:05 +00:00
Anders Broman cb771536df From Kovarththanan Rajaratnam:
Only fill in frame_data vals when needed.

svn path=/trunk/; revision=29203
2009-07-27 08:33:26 +00:00
Anders Broman 5fbc5d6f58 From Kovarththanan Rajaratnam:
Only clear packet list store if we need to redissect.

svn path=/trunk/; revision=29195
2009-07-26 10:34:07 +00:00
Stephen Fisher 53ded7dae6 Remove two unused variables and mark a function paramter as unused
svn path=/trunk/; revision=29193
2009-07-25 20:13:46 +00:00
Anders Broman be084ae799 From Kovarththanan Rajaratnam:
New packet list: enable goto first/last packet (Optimized)

svn path=/trunk/; revision=29190
2009-07-25 07:50:53 +00:00
Anders Broman 2e29868357 Use g_slice if glib >=2.10
svn path=/trunk/; revision=29187
2009-07-24 13:50:57 +00:00
Anders Broman 9bf46cd286 When using the new packet list select the first packet when the file read is complete. This should take care of the crash when closing WS.
svn path=/trunk/; revision=29186
2009-07-24 08:10:33 +00:00
Anders Broman 213a926bd9 From kovarththanan Rajaratnam:
Pass column_info as a pointer (new packet list).

svn path=/trunk/; revision=29169
2009-07-22 17:35:28 +00:00
Anders Broman 203fb3f25f Minor indentation fixes.
svn path=/trunk/; revision=29163
2009-07-22 06:00:53 +00:00
Stig Bjørlykke 8c4abdfb47 From didier gautheron via bug 3762:
This patch removes col_expr in frame_data structure,
it can be recomputed when needed.

svn path=/trunk/; revision=29159
2009-07-21 16:48:16 +00:00
Anders Broman 7c0fb707a5 Implement new_packet_list_find_row_from_data()
Goto frame should work now.

svn path=/trunk/; revision=29147
2009-07-20 16:09:50 +00:00
Stephen Fisher edc8ae64f1 Introduce packet list coloring for the NEW_PACKET_LIST. One caveat: when
enabling/disabling the coloring of the packet list from the menus, the user
has to drag the mouse cursor over each displayed row to take away/add the
coloring.  Dragging the scroll bar up or down will also take care of this as
only the displayed rows are colored.


svn path=/trunk/; revision=29142
2009-07-20 06:21:35 +00:00
Stig Bjørlykke 5afe405717 Removed an incorrect optimalization for invalidating packet in row 0.
svn path=/trunk/; revision=28950
2009-07-06 13:53:01 +00:00
Gerald Combs e0ebc32195 Updates to create_tempfile:
- Use g_get_tmp_dir, just like get_tempfile_path.
  - Don't make the caller worry about the path buffer length.

svn path=/trunk/; revision=28915
2009-07-01 23:36:51 +00:00
Anders Broman f0fbf120f2 Realy make the new packet list compile under Windows...
svn path=/trunk/; revision=28909
2009-07-01 17:39:19 +00:00
Anders Broman 3fe0c34110 Make the new packet list compile on Windows.
svn path=/trunk/; revision=28907
2009-07-01 14:37:02 +00:00
Stephen Fisher e6d0686f7b Introduce experimental new feature: GTK2 tree view based packet list
To use the GTK2 based packet list, define NEW_PACKET_LIST when compiling.
To do this with gcc, set the environment variable CPPFLAGS to
"-DNEW_PACKET_LIST" and re-run configure.

Many features do not yet work.  This work began with prototypes by Ulf
quite a while back.  I've put quite a bit of work into this so far and
as discussed with a few of the core team members at Sharkfest09 and it was
decided that it would be best to commit what I have so far to allow others to
help work on this.


svn path=/trunk/; revision=28892
2009-06-30 18:05:04 +00:00
Stig Bjørlykke 3f281d1280 Optimized criteria for invalidate packet in row 0.
svn path=/trunk/; revision=28698
2009-06-11 11:50:05 +00:00
Guy Harris 23a4f326b7 Clean up white space.
svn path=/trunk/; revision=28646
2009-06-06 00:12:43 +00:00
Guy Harris cf91fdf16b Have tap listeners specify whether the "packet" routine requires
a protocol tree;

	the column values.

This includes stats-tree listeners.

Have the routines to build the packet list, and to retap packets, honor
those requirements.  This means that cf_retap_packets() no longer needs
an argument to specify whether to construct the column values or not, so
get rid of that argument.

This also means that there's no need for a tap to have a fake filter
to ensure that the protocol tree will be built, so don't set up a fake
"frame" filter.

While we're at it, clean up some cases where "no filter" was represented
as a null string rather than a null pointer.

Have a routine to return an indication of the number of tap listeners
with filters; use that rather than the global num_tap_filters.

Clean up some indentation and some gboolean vs. gint items.

svn path=/trunk/; revision=28645
2009-06-05 22:42:47 +00:00
Stig Bjørlykke 09d8911d4a Popup a dialog in case we match a row outside the loaded frame area.
This adds some information for bug 3429.

svn path=/trunk/; revision=28556
2009-06-01 15:26:15 +00:00
Stig Bjørlykke 60dfa22754 From Kovarththanan Rajaratnam via bug 3429:
This patch downgrades the g_assert() to a proper if statement. This is needed
because we can end up with a match but _without_ any valid row attached to it.
This is the case when the user has aborted while dissecting.

svn path=/trunk/; revision=28555
2009-06-01 14:51:09 +00:00
Jaap Keuter 7f3d33513a Fix bug 3489:
Array overrun at copy of filter expression on GTK1 build.

svn path=/trunk/; revision=28538
2009-05-31 11:31:40 +00:00
Gerald Combs cde5843a5d Fix the build.
svn path=/trunk/; revision=28476
2009-05-26 00:30:08 +00:00
Gerald Combs ea115662fd From Didier Gautheron via bug 3391:
when loading files > 50 MB wireshark redraws the first pane on each
update_progress_dlg(). If auto_scroll_live is not set that's mean it redraws
the same rows again and again.

The patch attached only redraws it once or if cf->displayed_count < 1000, in
case you have a very big screen.

svn path=/trunk/; revision=28475
2009-05-25 23:48:29 +00:00
Guy Harris 54c159cb41 Turn on -Wshorten-64-to-32 by default, and fix some issues that turned
up (99 44/100% of which were assignments of double-precision
floating-point constants to floats).  Hopefully this will catch at least
some P64 issues on UN*X.

svn path=/trunk/; revision=28108
2009-04-21 16:57:52 +00:00
Gerald Combs e648060f0f Fix the last(?) of the Win64 compilation problems.
svn path=/trunk/; revision=28065
2009-04-16 04:05:39 +00:00
Bill Meier 63d7a7d712 Use wireshark (instead of ether) for temp file name prefix.
svn path=/trunk/; revision=27993
2009-04-08 12:43:51 +00:00
Bill Meier 1321c9981b sprintf --> g_snprintf
svn path=/trunk/; revision=27751
2009-03-17 01:47:20 +00:00
Stig Bjørlykke 0258be0b05 From Jakub Zawadzki:
More remove checking for NULL before g_free().

svn path=/trunk/; revision=27728
2009-03-15 18:08:46 +00:00
Guy Harris ace4af44fc Add a routine to report write errors to the list of failure-reporting
routines handled by epan/report_err.c.

Move copy_binary_file() in file.c to epan/filesystem.c, and rename it to
copy_file_binary_mode() (to clarify that it *can* copy text files;
arguably, *all* files are "binary" unless you're on, say, an IBM 1401
:-)).  Have it use the report_err.c routines, so it works in
console-mode programs.

Clean up some comments while we're at it.

svn path=/trunk/; revision=27456
2009-02-15 21:47:57 +00:00
Jaap Keuter acdf91e263 Make "Copy as Filter" on the packet list actually work.
Up till now every packet in the packet list got a copy of the pointer to the filter expressions for
the last packets' columns. Hence any 'Copy as Filter" on a column got the expression of the last
packet in the packet list. Instead every packet needs to get a pointer to the filter expressions 
for its own columns. This requires making a copy of the filter expressions themselves.

Since this is a bug in 1.0 as well the GLIB1 code is provided for backporting, which can later be dropped from the development tree.

svn path=/trunk/; revision=27396
2009-02-09 07:10:46 +00:00
Bill Meier ee908a7abd #include <epan/conversation.h> not req'd ...
svn path=/trunk/; revision=27392
2009-02-07 16:01:26 +00:00
Stig Bjørlykke 82fd44f303 Moved invalidation of cf->current_row when rescan packet to catch more cases
where packet list and packet details should be updated for row 0.

svn path=/trunk/; revision=26959
2008-12-10 11:05:45 +00:00
Stig Bjørlykke 076349374b Invalidate cf->current_row when rescan packet and the new selected row 0
has changed, to force update of packet list and packet details.

This fixes bug 3099.

svn path=/trunk/; revision=26937
2008-12-08 21:30:21 +00:00
Stig Bjørlykke 5498ec1dce Optimized finding current row from cfile.current_frame.
svn path=/trunk/; revision=26804
2008-11-18 14:50:51 +00:00
Stig Bjørlykke 58e2d7a0d6 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26649
2008-10-31 15:47:47 +00:00
Stig Bjørlykke ee2b7fd393 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26642
2008-10-31 10:30:17 +00:00