which they're defined.
Include some header files that declare functions in the source files
that define the functions.
Declare packet_list_get_type() in gtk/packet_list_store.h, as it defines
a macro that uses that function.
svn path=/trunk/; revision=37223
functions that take no arguments, otherwise the function is treated as a
crufty old C function with undeclared arguments.
svn path=/trunk/; revision=37211
sequence of frame_data structures, indexed by the frame number. Extract
the relevant bits of the capture_file data structure and move them to
the frame_data_sequence, and move the relevant code from cfile.c and
tweak it to handle frame_data_sequence structures.
Have a possibly-null pointer to a frame_data_sequence structure in the
capture_file structure; if it's null, we aren't keeping a sequence of
frame_data structures (we don't keep that sequence when we're doing
one-pass processing in TShark).
Nothing in libwireshark should care about a capture_file structure; get
rid of some unnecessary includes of cfile.h.
svn path=/trunk/; revision=36881
This lets us get rid of the per-frame_data-structure prev and next
pointers, saving memory (at least according to Activity Monitor's report
of the virtual address space size on my Snow Leopard machine, it's a
noticeable saving), and lets us look up frame_data structures by frame
number in O(log2(number of frames)) time rather than O(number of frames)
time. It seems to take more CPU time when reading in the file, but
seems to go from "finished reading in all the packets" to "displaying
the packets" faster and seems to free up the frame_data structures
faster when closing the file.
It *is* doing more copying, currently, as we now don't allocate the
frame_data structure until after the packet has passed the read filter,
so that might account for the additional CPU time.
(Oh, and, for what it's worth, on an LP64 platform, a frame_data
structure is exactly 128 bytes long. However, there's more stuff to
remove, so the power-of-2 size is not guaranteed to remain, and it's not
a power-of-2 size on an ILP32 platform.)
It also means we don't need GLib 2.10 or later for the two-pass mode in
TShark.
It also means some code in the TCP dissector that was checking
pinfo->fd->next to see if it's NULL, in order to see if this is the last
packet in the file, no longer works, but that wasn't guaranteed to work
anyway:
we might be doing a one-pass read through the capture in TShark;
we might be dissecting the frame while we're reading in the
packets for the first time in Wireshark;
we might be doing a live capture in Wireshark;
in which case packets might be prematurely considered "the last packet".
#if 0 the no-longer-working tests, pending figuring out a better way of
doing it.
svn path=/trunk/; revision=36849
Make the loops that scan through all the packets do so by frame number,
to abstract away the "next" and "previous" pointers in the frame_data
structure. Add a routine to cfile.c to map frame numbers to frame_data
structures, and put in some special case handling so scanning forward or
backward through the packets is O(N) rather than O(N^2).
svn path=/trunk/; revision=36846
so get rid of the select_flag argument, and rename it
new_packet_list_select_row_from_data().
It's also always passed a frame_data *, so make its argument a
frame_data *.
Its return value is used only to detect whether the packet was found in
the display or not, so make it a gboolean. Check it in *all* cases
where it's called, and change the dialog message a bit (the most likely
cause is that the user cancelled a redissection of the packets, so not
all packets in the capture file are in the display.
Also, in the find case, pass it the new packet we found.
svn path=/trunk/; revision=36839
gtk_tree_selection_get_selected() calls with if(!..) return;
like the rest of them. These functions shouldn't be called
unless a packet was selected, so this call should always return
TRUE for success.
svn path=/trunk/; revision=36339
Essentially: Don't try to sort if the pre-requisite "columnization" step is stopped
via the progressbar dialog window before the step completes.
Also: Fix a (very) minor bug wherein the sort-indicator not always cleared on the
"previous column" when "No Sorting" was selected from a column context menu.
Also: Do minor code, comments & whitespace cleanup.
svn path=/trunk/; revision=36180
use GTK+ data types, so, at least in theory, it could be implemented
atop another toolkit.
Make statusbar_push_temporary_msg() take a format string and format
arguments. Use it instead of simple_status(), and change one call to
just take a format string and arguments rather than to take the result
of using that format string and arguments with g_strdup_printf() and
passing the result to statusbar_push_temporary_msg().
svn path=/trunk/; revision=35041
Note:
the original code:
static void new_packet_list_column_button_pressed_cb() {
...
packet_list_popup(...);
}
the revised code:
static gboolean new_packet_list_column_button_pressed_cb() {
...
return packet_list_popup(...);
}
My guess is that the original code happened to work
on some?/all? supported platforms depending upon the actual
details of the generated calling_sequence/return code.
---------------
Also:
- new_packet_list_column_button_pressed_cb(): 'path' arg is unused;
- new_packet_list_double_click_cb(): user_data arg is unused so
don't supply same in the g_signal_connect.
svn path=/trunk/; revision=33888
1. Restore the functionality of <Ctrl>A and <Ctrl>X to the filter textbox.
2. Assign intuitive shortcuts without consuming any new shortcut letters.
3. Add 'Un-Time Reference All Packets' to the menu.
4. Disallow the marking or ignoring of all packets in the capture.
5. Make the Mark/Ignore/Time Reference-related menu items context sensitive.
6. Add 'ref_time_count' to the capture_file structure
7. Utilize marked/ignored/ref_time_count vars to prevent needless looping thru
the entire packet list by exiting the loop when it becomes zero.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5115
svn path=/trunk/; revision=33817
This is a quick'n'dirty fix and not optimal, but it fixes the problems we
have with DND columns. We have to rewrite new_packet_list_recreate() to
handle both new, delete and reorder columns.
svn path=/trunk/; revision=33400
This does not recreate the internal structures, but we we fix the problem
with fetching wrong data. Printing still uses the configured column order.
svn path=/trunk/; revision=33399
if we show the value or the string representing the value.
This setting is not stored in the preferences file yet, and the option is
not available in the columns preferences window.
svn path=/trunk/; revision=33317