Commit Graph

142 Commits

Author SHA1 Message Date
Jakub Zawadzki ce81449ed9 packet dissection now takes pointer to tvb instead of guint8 data
implement frame_tvbuff, right now almost a copy of 'real' tvb.

svn path=/trunk/; revision=50497
2013-07-11 05:47:02 +00:00
Jeff Morriss 36d3734dcb From Jim Young via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8906 :
This patch augments Wireshark's and tshark's augument usage reports (-? and
-t?) and the Wireshark and tshark man pages to list all available timestamp
options available for the -t option.

svn path=/trunk/; revision=50445
2013-07-08 16:25:13 +00:00
Luis Ontanon 7f5d688bda Windows changes for main_window_update ....
svn path=/trunk/; revision=50192
2013-06-27 17:45:07 +00:00
Luis Ontanon 0bdc0efc46 get main_window_update out of the way... pass an update_cb to the capture_sync stuff
... as per the XXX comment removed from tshark.c this was a mess to keep the linker
happy... I couldn't!

I did this without even understanding whether calling main_window_update was realy
necessary in most cases. I guess nothing or more specific update cbs would be best.


svn path=/trunk/; revision=50188
2013-06-27 17:10:50 +00:00
Guy Harris 8c9edf1280 Have the seek-read routines take a Buffer rather than a guint8 pointer
as the "where to put the packet data" argument.

This lets more of the libwiretap code be common between the read and
seek-read code paths, and also allows for more flexibility in the "fill
in the data" path - we can expand the buffer as needed in both cases.

svn path=/trunk/; revision=49949
2013-06-16 00:20:00 +00:00
Guy Harris eb56f6fb96 Get rid of an unused routine.
svn path=/trunk/; revision=49521
2013-05-22 20:22:40 +00:00
Guy Harris 107fa2d599 Sigh, it was a "building without libpcap" issue.
svn path=/trunk/; revision=49507
2013-05-22 10:21:52 +00:00
Guy Harris 9277023cce OK, try hiding from *THIS*, GCC. Will break other buildbots, but the
code prior to this built on other buildbots *and* on my 10.6 VM, so I
don't know what the GCC on the buildbots is getting wrong....

svn path=/trunk/; revision=49505
2013-05-22 09:59:58 +00:00
Guy Harris f096a1e57a OK, try directly including capture_session.h.
svn path=/trunk/; revision=49502
2013-05-22 09:05:35 +00:00
Guy Harris 575dc6d110 OK, what's your beef, GCC?
svn path=/trunk/; revision=49500
2013-05-22 08:48:26 +00:00
Guy Harris 8596d17d7f Pull the capture-session state information out of capture_opts and put
it into a separate capture_session structure.  capture_opts should
contain only user-specified option information (and stuff directly
derived from it, such as the "capturing from a pipe" flag).

svn path=/trunk/; revision=49493
2013-05-22 07:44:28 +00:00
Guy Harris 1ca63098ac Rename capture_opts_trim_iface() to
capture_opts_default_iface_if_necessary(), to reflect what it actually
does.

svn path=/trunk/; revision=49491
2013-05-22 04:49:31 +00:00
Guy Harris 39779a7bee Send the output of the -D and -L options to the standard output rather
than the standard error.

In Wireshark on Windows, create a console before doing so and destroy it
before exiting.  Don't do that in TShark or dumpcap, as those are
console-mode programs on Windows.

This should fix bug 8609 and still allow "wireshark -D" and "wireshark
-L" to work when the standard output isn't redirected.

svn path=/trunk/; revision=49025
2013-04-25 05:47:11 +00:00
Irene Rüngeler bcf7a98be1 Select the interface, if only one exists.
svn path=/trunk/; revision=48813
2013-04-11 08:31:59 +00:00
Irene Rüngeler afb0e76c8b The default interface should now be selected also on Windows.
svn path=/trunk/; revision=48799
2013-04-09 08:41:01 +00:00
Jeff Morriss c2ced4a2ab Don't try to open <home>/.wireshark on Windows: Wireshark hasn't written to
that directory since 2001 and reading from that directory was only left in for
backwards compatibility with versions prior to r4702.  I think it's now safe
to remove that backwards compatibility.

This eliminates the last argument of get_persconffile_path().

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

svn path=/trunk/; revision=48797
2013-04-09 02:48:03 +00:00
Guy Harris d49404236c Get rid of main_capture_set_main_window_title(), as it just wraps
set_titlebar_for_capture_in_progress(); make the call directly, to make
it a bit clearer when it needs to be called (which helps us do the
equivalent in the Qt version).

svn path=/trunk/; revision=48687
2013-04-01 17:57:20 +00:00
Guy Harris a94307adcf Move the knowledge about what the window title should be to
ui/gtk/main_titlebar.c, with set_titlebar_for_capture_file() for either
no capture file or an opened capture file and
set_titlebar_for_capture_in_progress() for an in-progress capture.

svn path=/trunk/; revision=48683
2013-04-01 00:21:44 +00:00
Guy Harris 78ab71cc9d Rename set_display_filename() to set_titlebar_for_capture_file(), as
it affects more than just the file name, it also affects whatever "you
have unsaved changes" indicator the UI provides.

Put a comment in the Qt code as a reminder of how to set the "you have
unsaved changes" indicator.

svn path=/trunk/; revision=48680
2013-03-31 22:17:43 +00:00
Evan Huus 6fa584b0db Move wireshark's display filter flag to -Y for consistency with tshark.
Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8223

svn path=/trunk/; revision=48653
2013-03-30 12:15:42 +00:00
Evan Huus 20e049795f If wireshark is started with a file and a display filter, apply the display
filter *after* initially reading the file so that we get the expected multi-
pass behaviour and forward-looking filters (like response_in) work properly.

svn path=/trunk/; revision=48615
2013-03-28 14:54:33 +00:00
Pascal Quantin 5a877ea9fe From Jim Young via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8531 :
Fix compilation when building with HAVE_GTKOSXAPPLICATION

svn path=/trunk/; revision=48585
2013-03-27 12:29:44 +00:00
Gerald Combs d1b87423df More icon updates.
Use the PNG versions of the new application icons.

Remove the XPM versions of the Wireshark application and capture icons.
To paraphrase Zoidberg, XPMs are bad and we should feel bad. Remove
xpm_to_widget_from_parent (which we weren't using and likely won't use
in the future).

Replace wiki_24.xpm (which was a GNOME or GTK+ stock icon IIRC) with the
16x16 and 24x24 versions emblem-web.png from GNOME icon theme 2.30.3.
This version was used specifically because it's GPLv2 and later versions
are GPLv3.

Update image/README.

svn path=/trunk/; revision=48565
2013-03-26 19:51:33 +00:00
Anders Broman 684c9e5d5c From Jim Young:
Add casts to support c++ when HAVE_GTKOSXAPPLICATION is defined.

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

svn path=/trunk/; revision=48557
2013-03-26 05:02:05 +00:00
Bill Meier 8112ecc321 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404

Note: The following parts of the patch had been previously done:
 asn1/snmp/packet-snmp-template.c
 epan/dissectors/packet-snmp.c
 epan/dissectors/packet-x11.c

Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP'
 didn't compile and needed a few additional patches.


svn path=/trunk/; revision=48447
2013-03-21 02:29:09 +00:00
Anders Broman 2cc00294c7 Use explicit casts.
svn path=/trunk/; revision=48260
2013-03-12 06:41:00 +00:00
Anders Broman ac2515ee6f Use explicit casts.
svn path=/trunk/; revision=48239
2013-03-11 06:47:34 +00:00
Jeff Morriss 19214234ae Followup to r48081: use the DEFAULT_CAPTURE_BUFFER_SIZE macro from r47942.
svn path=/trunk/; revision=48085
2013-03-05 15:22:28 +00:00
Chris Maynard 2b93c3b31e Default capture buffer size is now 2MB. (See also r47920 and r47937)
svn path=/trunk/; revision=48081
2013-03-05 02:09:37 +00:00
Bill Meier 162817ad33 it's ==> its & its ==> it's as needed.
In a few cases:
 Fix spelling;
 Clean up whitespace and formatting style.

svn path=/trunk/; revision=47889
2013-02-25 23:35:13 +00:00
Gerald Combs b0d958c4ed Don't yell at the user quite so much. Remove exclamation points from
some error messages and rephrase some others.

svn path=/trunk/; revision=47787
2013-02-21 01:00:44 +00:00
Gerald Combs bd4cffae58 When any of our executables start on Windows create or open a "Wireshark
is running" mutex. Have the NSIS installer check for this mutex and ask
the user to close Wireshark if it's found. While not perfect this makes
the WinSparkle update process much less annoying.

svn path=/trunk/; revision=47758
2013-02-20 01:19:42 +00:00
Gerald Combs e48236a436 Add automatic software update checks for Win32 using WinSparkle. Add
preferences (currently hidden) to disable updates, set the update
frequency, and set the update "channel" (stable vs development). Add a
"Help" menu item to manually check for updates.

svn path=/trunk/; revision=47748
2013-02-19 22:21:17 +00:00
Chris Maynard 73b49715c9 Fix Coverity CID 973548: Dereference null return value.
#BACKPORT(1.8, 1.6)


svn path=/trunk/; revision=47568
2013-02-08 16:23:02 +00:00
Jeff Morriss 446926fa34 Move the get-runtime-version stuff back outside of #ifdef WIN32.
svn path=/trunk/; revision=47454
2013-02-03 18:31:23 +00:00
Anders Broman d7b98a02d1 call load_wpcap before collecting the run-time version information.
svn path=/trunk/; revision=47451
2013-02-03 15:11:53 +00:00
Gerald Combs 2dff8d7605 Add font and color preferences. Unfortunately Qt doesn't have a color
picker widget so we're back to popping up dialogs. Move the contents of
monospace_font.{cpp,h} to wireshark_application.{cpp,h}.

Pango and Qt use completely different string representations for fonts.
Add a separate gui.qt.font_name preference so that they don't clobber
each other.

svn path=/trunk/; revision=47240
2013-01-24 01:10:12 +00:00
Gerald Combs 6ef1fc5002 GTK+:
Get rid of user-hostile behavior. In the layout preferences pane 2 & 3
radio buttons overrode the user's selection if a duplicate item was
selected. Now we assume that the user knows what he or she is doing and
steal duplicate selections from the other panes.

Qt:

Match the new GTK+ behavior in the layout preferences. Add padding
around the layout images. Add toolbar style preferences to the
Appearance pane (instead of the layout pane).

All:

Remove the selection mode and scrollbar placement prefs and mark them
obsolete as recently discussed on -dev.

Adjust the layout images yet again after more Awful Monitor Testing.

svn path=/trunk/; revision=47214
2013-01-22 18:27:18 +00:00
Jaap Keuter 3c6ff474fa Fix for CID 715142.
Be aware that the short-circuit evaluation only applies to the 
first operand of a logical AND expression.

svn path=/trunk/; revision=47188
2013-01-20 21:45:43 +00:00
Gerald Combs ae7ee61e84 Rename the "saved_val" preference element to "stashed_val" in order to
more clearly indicate that it's a copy of a preference value rather than
something we've saved in the preferences file. Update
prefs_pref_to_str() to handle default, stashed, and current prefs.

Create ui/preference_utils.[ch] and move some common routines there. Use
prefs_pref_type_name() in the GTK+ preferences dialog.

Make the "OK" button in the Qt preferences dialog work. We simply write
the prefs and redissect on "OK" and do nothing on "Cancel". This is
intentionally different from the Apply/OK/Cancel behavior in the GTK+
version.

Add a general "emitAppSignal" method to wsApp and use it for packet
dissection and preference changes.

Suggest that we might want to create a WsString class to make conversion
between QStrings, gchar *s, and GStrings easier.

svn path=/trunk/; revision=47139
2013-01-18 00:50:14 +00:00
Guy Harris a694ccd013 Set the crash info as early as possible in main(), so that it shows up
in crashes that happen early in the process.

Clean up white space.

svn path=/trunk/; revision=47108
2013-01-16 00:12:27 +00:00
Evan Huus 4e642fde4c Tweak the order of the UI updates when finishing a live-update capture so that
certain menu items are enabled correctly.

Should fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8108

svn path=/trunk/; revision=46629
2012-12-20 04:06:44 +00:00
Gerald Combs 6df94431ac Remove an unused variable. Use ITEM_LABEL_LENGTH instead of a magic
number.

svn path=/trunk/; revision=46384
2012-12-05 01:02:40 +00:00
Guy Harris d415d3d87c On error, have capture_opts_trim_iface() return the exit status that
should be used (on success, have it return 0).  Exit with that exit
status; if the problem is that we couldn't get the interface list or if
there are no interfaces in that list, return 2, as that's not a
command-line syntax error.

svn path=/trunk/; revision=46108
2012-11-21 17:14:54 +00:00
Anders Broman d54b681f84 From Jim Young and updated by Max Romanov:
The modification to acinclude.m4 adds a new test in the
AC_WIRESHARK_OSX_INTEGRATION_CHECK section to first look for the library
gtkmacintegration.  "gtkmacintegration" is the new internal name for GTK+ MAC
OSX library after the project was moved to www.gtk.org.  Previously this
library was known as igemacintegration.

The patches to the three gtk/*.c files update the conditional #include
<gtkmacintegration/gtkosxapplication.h> to use the new folder name.   The
Option 1 patch will break any build environment that expects to find the
gtkosapplication.h file in the older igemacintegration folder.  
In addition the patch includes updates to
gtk/main.c and gtk/main_menubar.c for a more standard looking App menu.

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

svn path=/trunk/; revision=45869
2012-11-02 09:58:43 +00:00
Pascal Quantin b439ae0d6a Revert r45692 and try to fix link failure another way: console_win32.[ch] definitely belong to ui/win32
Add console_win32.[ch] to Makefile.am

svn path=/trunk/; revision=45693
2012-10-21 19:12:18 +00:00
Alexis La Goutte 5af3defc46 Try to fix LINK : fatal error LNK1181: cannot open input file 'win32/console_win32.obj'
move ui/win32/console_win32.[ch] to ui/console_win32.[ch]

svn path=/trunk/; revision=45692
2012-10-21 18:10:31 +00:00
Alexis La Goutte 62ce10ced8 Move MSWindows console "windows" to ui/win32/console_win32.[ch]
svn path=/trunk/; revision=45677
2012-10-21 14:45:23 +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
Guy Harris 73dd0321ea Get rid of the always-null and unused argument to
host_name_lookup_process().  If, in the future, we find that we need an
argument for changes we're making, we can add it then.

svn path=/trunk/; revision=45269
2012-10-02 21:13:59 +00:00