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
I tested your update ("wireshark -r foo.pcap" from a cmd window) and
found that it did not use the current folder for the next Open dialog
and didn't save the folder in recent. The attached patch prepends the
filename with the current folder.
From me: don't leak memory when doing it.
svn path=/trunk/; revision=33863
- Display current value in combo boxes (pixels_per_tick, etc) to always
match actual values being used to create graph;
- yscale combo box entries:
show values >= 1 sec as sec (not s000 ms);
- Determine max yscale label width properly as the largest of the
top or middle label lengths;
- Cleanup some indentation.
svn path=/trunk/; revision=33855
1. Incorrect specification of units: Should be ms & s not us and ms;
Bug introduced in SVN #33834.
2. Selecting 50ms as the yscale actually used 50us as the scale;
Bug introduced in SVN #30543.
svn path=/trunk/; revision=33854
EG: Non-event signal callback functions shouldn't
be directly used as event callback functions.
Replace use of deprecated "GtkSignalFunc";
Whitespace cleanup.
svn path=/trunk/; revision=33849
and ^A as Edit->Select All.
Add more details about implementing Undo/Redo/Cut/Copy/Paste/Select All
in the comment for the placeholder items.
svn path=/trunk/; revision=33845
- Non-event signal callback functions should return void;
- Event signal callback had missing 'user_data' arg;
- Rename various symbols for clarity;
- Rename local functions with names of form gtk_...;
- Use gboolean where appropriate;
- Remove all 'exit(10)' statements;
- Whitespace;
- ...
svn path=/trunk/; revision=33843
current file name.
This fixes a crash after failing to allocate some massive number of bytes if
the file name did not contain a path--which is the case when doing
"wireshark -r myfile.pcap".
svn path=/trunk/; revision=33841
- Display current value in combo boxes (pixels_per_tick, etc) to always
match actual values being used to create graph;
- yscale combo box entries:
show ms values as ms (not x000 usecs);
show us values with unit "us" (not "ms");
- Determine max yscale label width properly as the largest of the
top or middle label lengths;
- Cleanup some indentation.
svn path=/trunk/; revision=33834
- all: filter_te_syntax_check_cb should have an (unused) 'gpointer user_data' arg;
- filter_dlg.c: filter_sel_list_cb user_data arg is unused;
svn path=/trunk/; revision=33828
list and once with the old packet list.
Have Boolean variables for some of the predicates in
set_menus_for_selected_packet(), to clarify what they're testing.
Clean up indentation.
Add some comments for various issues.
(FYI, what "Restore the functionality of <Ctrl>A and <Ctrl>X to the
filter textbox." means, in the comment for the previous checkin, "don't
use <Ctrl>A or <Ctrl>X for our own purposes, so they work the same way
they do in other applications using GTK+"; the checkin changed some menu
items not to use <Ctrl>A and <Ctrl>X as accelerators.)
svn path=/trunk/; revision=33823
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
that you can tell from examination whether the search is forward or
backward.
Make the cf_find_packet routines take the direction as an explicit
argument, rather than, in the cases where you don't want to permanently
set the direction, saving the direction in the capture_file structure,
changing it, doing the search, and restoring the saved direction. Give
more information in the Doxygen comments for those routines.
Add a cf_find_packet_dfilter_string() routine, which takes a filter
string rather than a compiled filter as an argument. Replace
find_previous_next_frame_with_filter() with it.
Have cf_read_frame_r() and cf_read_frame() pop up the error dialog if
the read fails, rather than leaving that up to its caller. That lets us
eliminate cf_read_error_message(), by swallowing its code into
cf_read_frame_r(). Add Doxygen comments for cf_read_frame_r() and
cf_read_frame().
Don't have find_packet() read the packet before calling the callback
routine; leave that up to the callback routine.
Add cf_find_packet_marked(), to find the next or previous marked packet,
and cf_find_packet_time_reference(), to find the next or previous time
reference packet. Those routines do *not* need to read the packet data
to see if it matches; that lets them run much faster.
Clean up indentation.
svn path=/trunk/; revision=33791
1) the GTK+ documentation recommends against it;
2) the X11 implementation of gtk_window_set_title() sets the
icon name to the title, so gdk_window_set_icon_name() doesn't
do anything interesting, and the Win32 and Quartz
implementations of gdk_window_set_icon_name() don't do
anything;
3) gdk_window_set_icon_name() either crashes or complains if
it's handed a null pointer, which happens at startup.
Clean up indentation.
svn path=/trunk/; revision=33739
- Add missing 'user_data' arg as needed;
- Use gboolean rather than int as the type of the value returned.
Also: Cleanup whitespace & reformat long lines in a few cases.
svn path=/trunk/; revision=33679
- Define several event callback functions with the correct number of args;
- Remove several unnecessary 'if (!user_data) exit(10);' code sequences;
- Use 'user_data' arg of event callbacks instead of an object property
in several cases;
- Reformat some long lines.
svn path=/trunk/; revision=33677
1. Numeric values in the 'Integer Tables' now sort properly.
(For some reason just using a fixed width string for numeric values sorted
OK on Windows but not on *nix).
2. The sort may be even faster since it's reputed that the default sort used
by Gtk [g_utf8_collate()] is "expensive".
svn path=/trunk/; revision=33666
Use gtk_tree_store_insert_with_values if GTK >= 2.10;
Change numeric formatting slightly in integer tables so values will
sort numerically;
Misc whitespace changes.
svn path=/trunk/; revision=33657
Remove some redundant code;
Widen the VOIP calls window slightly so all columns are displayed initially;
Minor whitespace cleanup.
svn path=/trunk/; revision=33617
This allows the dispay of the ws_combo_box choices as a tree.
Also: Rename ws_combo_box_append_text_and_pointer_with_sensitivity() to
ws_combo_box_append_text_and_pointer_full().
svn path=/trunk/; revision=33538
libwireshark into libwireshark, and call it only in programs linked with
libwireshark. That way, programs that don't link with libwireshark
don't have to link with libgcrypt or libgnutls solely so that they can
say that they're linked with a particular version of libgcrypt or
libgnutls.
Don't link dumpcap with libgcrypt or libgnutls any more.
svn path=/trunk/; revision=33531
- rename rpcstat_t to dcerpcstat_t since a different definition of rpcstat_t in
another Wireshark source file apparently confuses the Windows debugger;
- GHFunc's return void not void *;
- Use gboolean where apropriate.
svn path=/trunk/; revision=33499
could be another item to add.
Add dissector tables treview. This cab be used to find which UDP ports are registered for example.
svn path=/trunk/; revision=33474
1.0.0. You're supposed to just use 0 in releases prior to 1.1.0 - in
1.1.0 and later, a netmask of PCAP_NETMASK_UNKNOWN will cause errors if
you try to use "ip broadcast" (as you need the netmask to check for
local broadcasts), but, prior to that, the netmask value is blindly used
even if the filter will always fail.
svn path=/trunk/; revision=33461
- Don't show "Load time" during live capture.
- Fix indentation and minor changes to comments.
Should ignored packets be shown also when drops is known?
svn path=/trunk/; revision=33440
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
g_try_malloc() or g_try_realloc(), check whether they fit in a gsize
and:
if not, just pretend the allocation failed;
if so, cast them to gsize to squelch compiler warnings.
svn path=/trunk/; revision=33239
In eo_save_entry(), don't assume you can write the entire object in a
single write call - if the object is big enough (which would require a
64-bit address space), and you're not lucky enough to be running on
UN*X (which means LP64, so size_t and ssize_t are big enough for the
entire object), you can't.
svn path=/trunk/; revision=33231
This functionality keeps track of all SMB objects contained in a capture,
and is able to export to a file a full or partial captured file that has
been transfered through the SMB protocol. In a partial capture, the holes
produced by the non-captured information are filled out with zeros.
It includes the needed modifications of the SMB dissector in the way it keeps
track of the opened SMB files and also to feed the eo_smb tap listener.
svn path=/trunk/; revision=33227
dfilter_entry_match(), as the old dfilter_entry_match() isn't defined or
used if NEW_FILTER_COMBO_BOX is defined.
Clean up indentation a bit.
svn path=/trunk/; revision=33154
Remove unneeded "gtk_tree_path_free(path);" from case
"GDK_Return:" in tree_view_key_pressed_cb() that was reverted in r32957 to restore X11 functionality lost in refactored code from r32323.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4847
svn path=/trunk/; revision=33112
After appending new record set packet_list->columnized to FALSE.
From me:
Use g_ptr_array_sort_with_data instead of g_qsort_with_data in case the
GPtrArray internals ever change.
svn path=/trunk/; revision=33011
This is an extension to the Wireshark context sensitive protocol help. Rows in
TreeView window are analyzed and suitable help file (as HTML) is opened in a
browser.
The help part (large file, 23 MB) of the Protocol Help can be downloaded under
www.inacon.com/dowload/stuff/protocol_help.tar.gz
This protocol help "light" provides descriptive content for the most frequently
used standard protocols, including IP, TCP or SMTP.
From me:
Changes:
Rename "ph_" in some function names to "proto_help_". Move the protocol
help code to its own module.
Make a bunch of functions static. Remove unused code.
Use browser_open_url() instead of a custom function.
Increase the logging levels. Don't clobber the normal log handler.
Update some Doxygen comments to match the format in the rest of the code
base.
Removed GTK version checks. We've been 2.x only for a while.
Move ph_replace_string to string_replace() in epan/strutil.[ch].
Fix a bunch of memory leaks.
Add a NULL pointer check.
Reformat the overview menu label.
Document the file format and locations.
Add Edgar to AUTHORS.
svn path=/trunk/; revision=32995
Call the various flavors of OS X integration just "OS X integration",
not anything with "IGE" in it - it appears that, in some places,
"ige-mac-integration" refers only to the older Carbon-based functions,
although the library still appears to be called -ligemacintegration.
Update the URLs for the information about the OS X integration
libraries.
Clean up help message for --with-pcap-remote.
Clean up white space a bit.
Speaking of white space, it's "Mac OS X", not "MacOS X".
svn path=/trunk/; revision=32941
they're no more guaranteed to be constant strings than the columns we're
*not* assuming are constant strings. Fixes bug 4771.
svn path=/trunk/; revision=32906
interface statistics, have its error messages come out as sync-pipe
errors, have it send a sync-pipe "success" message on success, and have
the callers get that message and display it.
svn path=/trunk/; revision=32843
Use prefs_is_capture_device_hidden() to find out whether a device should
be hidden - don't scan the list of hidden devices ourselves.
svn path=/trunk/; revision=32820
Speak of network adapters rather than network cards (most personal
computers these days have no network cards - the network adapters are on
the motherboard).
svn path=/trunk/; revision=32810
build without libpcap, to make sure that works, and then do a build with
libpcap, to put into a binary release. It's the former that's failing;
I'll back out the previous change and then work on that.
svn path=/trunk/; revision=32801
if_capabilities_t - it doesn't fail on Snow Leopard, even if I undefine
HAVE_PCAP_CREATE, and doesn't fail on the Leopard PPC buildbot, either.
svn path=/trunk/; revision=32799
monitor mode at the same time that we fetch its list of link-layer
types. Support fetching that list in monitor mode, as the list may be
different in regular and monitor mode. If the interface supports
monitor mode, when printing the list of link-layer types, indicate
whether they're fetched in monitor mode or not, as tcpdump 4.1.x does.
svn path=/trunk/; revision=32789
open the currently-selected file; that button is also used to select the
file or directory typed in the location bar. This should fix bug 1791.
svn path=/trunk/; revision=32774
libpcap/WinPcap and the capture mechanism atop which they run might
either silently limit the buffer size to a smaller value or raise it to
a higher value - that's the part that's platform-dependent.
svn path=/trunk/; revision=32718
the code to print the machine-readable format into dumpcap, and have the
code in capture_opts.c just print the human-readable format.
svn path=/trunk/; revision=32714
standard error and, in Wireshark on Windows, create a console if
necessary. Have the cmdarg_err routines use them.
Use *fprintf_stderr() to print the output of -L, rather than using
cmdarg_err_cont(), so that we don't get extra newlines in the output (it
should look similar to the output of tcpdump).
svn path=/trunk/; revision=32711
interface by running dumpcap, so that if you need privileges to open an
interface, and dumpcap has those privileges, neither TShark nor
Wireshark need them.
svn path=/trunk/; revision=32710
pcap_set_buffer_size() did as well, so there aren't any libpcap releases
with pcap_create() but not pcap_set_buffer_size().
Only do one check for pcap_create.
svn path=/trunk/; revision=32695
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=475
BUT not activating the check for
pcap_create()
pcap_set_buffer_size()
This should make it possible to build with support for setting the buffersize if not capturing 802.11 traffic.
The code for handling the 'B' option should be OK in any case.
svn path=/trunk/; revision=32688
Make a function that checks if the user is running as root or if npf.sys isn't
loaded (on Windows) and call it *after* showing the main window so that the
popup (if any) shows up above the main window.
svn path=/trunk/; revision=32603
If "Help -> About Wireshark" is selected from Wireshark's main menu an error
message pops up:
Could not open file "<DevelopmentPath>\Wireshark_Source\wireshark-gtk2\COPYING":
No such file or directory
The attached patch handles this situation by looking for COPYING.txt instead of
COPYING on windows systems.
svn path=/trunk/; revision=32596
This avoids this error:
(lt-wireshark:16779): Gdk-CRITICAL **: gdk_window_invalidate_rect: assertion `window != NULL' failed
before the main window has been drawn if you've got a personal hosts file.
svn path=/trunk/; revision=32593
Update the compare stats documentation.
From me: Add a screen shot and editorial updates. Change some lables to
better match the IP and TCP dissectors.
svn path=/trunk/; revision=32545
when changing the font and deleting a column at the same time while using
the old packet list):
Don't calculate the default column widths until after both the font and column
preferences have been applied.
This isn't a problem in the new packet list.
svn path=/trunk/; revision=32500
we can use it in the main window title during and after capture. Add a
"-X" option for providing a description for stdin.
svn path=/trunk/; revision=32357
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4119 :
Never insert more than 1000 silence frames (e.g., if the sequence number jumps
massively). There may be a better way, but at least now we won't crash.
Leave a comment in the code indicating this.
svn path=/trunk/; revision=32304