Commit graph

5520 commits

Author SHA1 Message Date
Michael Tüxen
48683778a0 Add support for multiple interface to the main welcome screen.
This patch is from Irene Ruengeler.

svn path=/trunk/; revision=37913
2011-07-06 09:17:06 +00:00
Guy Harris
ddc6baabbb Constify to squelch compiler warning.
svn path=/trunk/; revision=37911
2011-07-06 04:45:50 +00:00
Guy Harris
fc581f9865 Don't check for "(null)" as the result of a printf operation; don't pass
in a null pointer to %s in the first place!  Not all printf
implementations necessarily emit "(null)" in that case; perhaps GLib's
does, but we shouldn't even depend on that - we should, instead, at
least print something semi-useful in that case (the link-layer type's
numerical value).

Fix syntax errors in the "no libpcap" case.

svn path=/trunk/; revision=37910
2011-07-06 04:09:49 +00:00
Guy Harris
053c583fda Add some additional routine variants that handle string encodings, and
make FT_STRING and FT_UINT_STRING handle string encodings.

Get rid of FT_EBCDIC in favor of FT_STRING with ENC_EBCDIC.

Add some URLs for DRDA.

Clean up some stuff in TN3270 and TN5250, including using ENC_ values
for proto_tree_add_item().

svn path=/trunk/; revision=37909
2011-07-05 23:59:23 +00:00
Michael Tüxen
1c7349022d Don't use strcpy().
svn path=/trunk/; revision=37907
2011-07-05 21:29:06 +00:00
Michael Tüxen
8b5eee3639 (Try to) fix compilation when no libpcap is available.
svn path=/trunk/; revision=37905
2011-07-05 21:11:24 +00:00
Michael Tüxen
cb90aa7904 Add initial support for multiple interfaces. More to come after
the capture options dialog box supports also multiple interfaces.

This patch has been developed by Irene Ruengeler.

svn path=/trunk/; revision=37904
2011-07-05 20:34:03 +00:00
Michael Tüxen
4b8f5a1865 Support selecting multiple interfaces in the capture/interfaces
dialog.
Until the capture/options dialog supports multiple interfaces, the
options button is only selectable when 0 or 1 interfaces are selected.
This patch is based on work by Irene Ruengeler.

svn path=/trunk/; revision=37903
2011-07-05 20:29:33 +00:00
Anders Broman
2f05cf4dcf From Michael Mann:
Added ability to display UTC time or UTC time with date.  I liked having the
difference between UTC and local time, not just setting local=UTC.

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

svn path=/trunk/; revision=37898
2011-07-04 21:43:34 +00:00
Bill Meier
16fabcc02c Log:
Fix incorrect usage of gtk_radio_button_new_with_label()/gtk_radio_button_get_group();
 Use gtk_radio_button_new_with_label_from_widget().

 Essentially: gtk_radio_button_get_group() must be called after each gtk_radio_button_new...()
 before using the 'group' GSList pointer in another call to gtk_radio_button_new...().

 In these cases the incorrect usage appears to only have resulted in allowing multiple
 radio buttons to be activated simultaneously.

 (In at least one case elsewhere, the incorrect usage resulted in a Wireshark crash).


svn path=/trunk/; revision=37871
2011-07-02 21:36:25 +00:00
Bill Meier
9e3d46e08b Remove 3 lines of code no longer needed after SVN #37869
svn path=/trunk/; revision=37870
2011-07-02 21:06:51 +00:00
Bill Meier
a2e7e3e2e7 Fix incorrect usage of gtk_radio_button_new_with_label()/gtk_radio_button_get_group();
Use gtk_radio_button_new_with_label_from_widget().

Essentially: gtk_radio_button_get_group() must be called after each gtk_radio_button_new...()
before using the 'group' GSList pointer in another call to gtk_radio_button_new...().

In these cases the incorrect usage appears to only have resulted in allowing multiple
radio buttons to be activated simultaneously.

(In at least one case elsewhere, the incorrect usage resulted in a Wireshark crash).



svn path=/trunk/; revision=37869
2011-07-02 21:00:56 +00:00
Bill Meier
0f310b83fe Whitespace cleanup (trailing spaces).
svn path=/trunk/; revision=37868
2011-07-02 20:14:41 +00:00
Bill Meier
6f982ec7c2 Fix: Wireshark crashes after repeating "File -> Import -> Cancel"
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6080

Apparently gtk_radio_button_get_group() must be called after
each addition to the group before the 'group' GSList pointer can be used
again in, for example, a call to get_radio_button_new_with_label().

(Where does it say this in the GTK docs ? It does make sense, tho, given
the way GSLists work).

We'll use gtk_radio_button_new_with_label_from_widget() instead to let GTK
handle the grouping.


svn path=/trunk/; revision=37867
2011-07-02 19:50:41 +00:00
Jörg Mayer
7e0b65ff91 avoid warning about old style function definition
svn path=/trunk/; revision=37863
2011-07-02 11:33:32 +00:00
Stig Bjørlykke
6bdd7eed16 Renamed "___tmp_color_filter___" to "___conversation_color_filter___"
in the coloring rule name to better describe where it comes from.

svn path=/trunk/; revision=37859
2011-07-01 21:13:40 +00:00
Chris Maynard
2d11ac9051 From spamlookup via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6083:
Fix compile error introduced with r37830.


svn path=/trunk/; revision=37851
2011-07-01 15:44:42 +00:00
Michael Tüxen
2b439f46f3 Remove all interfaces when available.
Add a missing g_strdup.

svn path=/trunk/; revision=37843
2011-06-30 11:40:50 +00:00
Jakub Zawadzki
9fb3af3bf1 Fix memory leak.
svn path=/trunk/; revision=37841
2011-06-30 08:54:24 +00:00
Chris Maynard
0eb0b8f1f3 Undo r37833 in favor of Sake's changes to be committed at some future date.
svn path=/trunk/; revision=37839
2011-06-30 01:05:49 +00:00
Chris Maynard
531a787d9c Based on user feedback from Sharkfest '11, make the default choice when saving or printing packets apply to only displayed packets and not all packets.
svn path=/trunk/; revision=37833
2011-06-29 16:31:44 +00:00
Stig Bjørlykke
6747aef250 Added a preference to turn of capture filter syntax check.
This can be used to disable the effect in bug 5356.

svn path=/trunk/; revision=37830
2011-06-29 10:42:29 +00:00
Michael Tüxen
132c09f2d5 Cleanup whitespaces/indentation.
svn path=/trunk/; revision=37827
2011-06-29 06:33:54 +00:00
Stig Bjørlykke
92dde3023c Add $(GENERATED_H_FILES) to libui_a_SOURCES.
svn path=/trunk/; revision=37819
2011-06-28 16:57:10 +00:00
Stig Bjørlykke
dcbfc168b1 Add a missing dependency for text_import_scanner_lex.h
svn path=/trunk/; revision=37817
2011-06-28 15:30:28 +00:00
Stig Bjørlykke
624c40ae25 Use the generated header file from Guy's Flex front-end script from
revision 22446 for text_import_scanner.

svn path=/trunk/; revision=37815
2011-06-28 15:04:24 +00:00
Stig Bjørlykke
8443bbbf75 Replace all strerror() with g_strerror().
Remove our local strerror implementation.
Mark strerror as locale unsafe API.

This fixes bug 5715.

svn path=/trunk/; revision=37812
2011-06-28 09:00:11 +00:00
Michael Tüxen
043ea23beb Enable the cap_history again. It was temporary disabled a couple of hours ago.
svn path=/trunk/; revision=37803
2011-06-27 11:45:27 +00:00
Stig Bjørlykke
b979f2da27 From bug 6057:
Lua API: add support to temporary color filters (10 color slots)

svn path=/trunk/; revision=37801
2011-06-27 11:07:31 +00:00
Michael Tüxen
83eccec8fb Fix a bug when starting the capture without specifying an interface.
The capability history needs to be fixed.

svn path=/trunk/; revision=37795
2011-06-27 01:32:22 +00:00
Michael Tüxen
421dafd2de Get rid of old non-interface specific settings which are now interface
specifc. This finalizes the change of the infrastructure.
This patch is based on work by Irene Ruengeler.

svn path=/trunk/; revision=37794
2011-06-27 00:09:03 +00:00
Stig Bjørlykke
d374df09c0 Changed adding a new coloring rule to put the new rule at the top of the list.
This because the user most likely wants to use the new rule right away, and do
not want to think about which filters it should be above.

This was requested in bug 5669.

svn path=/trunk/; revision=37793
2011-06-26 18:25:03 +00:00
Chris Maynard
343c20e215 Make Wireshark portable to all locales by calling setlocale(). This, along with my previous commits in revisions 36160 and 36166 ought to fix the problem that Bartosz Kiziukiewicz first reported on the wireshark-users mailing list here:
http://www.wireshark.org/lists/wireshark-users/201103/msg00018.html

(I successfully generated Wireshark compare statistics after applying this change and also changing my locale to Polish.)

svn path=/trunk/; revision=37779
2011-06-24 02:35:46 +00:00
Bill Meier
2ad4b3ae3c Whitespace cleanup ...
svn path=/trunk/; revision=37772
2011-06-23 18:06:13 +00:00
Stig Bjørlykke
882e24e7f5 Code from Jakub:
Put the "Filter" back in statistics dialogs, which was removed in r37559.

svn path=/trunk/; revision=37770
2011-06-23 13:55:20 +00:00
Anders Broman
51a842184c Fix some of the GTK deprecated functions.
svn path=/trunk/; revision=37766
2011-06-23 13:36:25 +00:00
Anders Broman
7deaa0ce7a Make it possible to copy stuff from the welcome header.
svn path=/trunk/; revision=37749
2011-06-22 08:54:17 +00:00
Jörg Mayer
28c3e5c73f Oops, forgot to revert a variable after a test build
svn path=/trunk/; revision=37746
2011-06-22 07:04:34 +00:00
Anders Broman
019d39de87 Add the correct casts to make it compile on some old ERHL box.
(Will this finally be correct?)

svn path=/trunk/; revision=37742
2011-06-21 15:04:14 +00:00
Stig Bjørlykke
85b7c95cf6 One small step towards fixing outdated GtkTooltips.
svn path=/trunk/; revision=37732
2011-06-20 10:33:35 +00:00
Jörg Mayer
492ee9cafc Add some statistics
svn path=/trunk/; revision=37727
2011-06-20 07:13:17 +00:00
Jörg Mayer
7472c6cf52 Migration to gtk2 has been completed, delete the status file.
Migration to gtk3 has just begun: add a status file.

svn path=/trunk/; revision=37726
2011-06-20 06:32:55 +00:00
Jörg Mayer
3775da5680 Add some compiler flags that allow for gtk3 upward compatibility
checking while compiling on gtk2. Most are disabled.

svn path=/trunk/; revision=37725
2011-06-20 06:25:24 +00:00
Jörg Mayer
b8e727ac8d GTK3 fixes:
- Replace 2 cases where GtkObject was used (no longer exists in GTK3)
- Whenever gdkkeysyms.h is included also include gdkkeysyms-compat.h
  iff we are building against gtk3

svn path=/trunk/; revision=37722
2011-06-20 00:48:05 +00:00
Anders Broman
79e57b3666 Try to fix bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6029
Wireshark crashes when entering anything in capture filter textbox

svn path=/trunk/; revision=37709
2011-06-19 15:28:32 +00:00
Jörg Mayer
7a8cf813ae UI_MANAGER: #if 0 out add_menu_item as it is not used yet(?).
Move menu.c back to the list of clean files.

svn path=/trunk/; revision=37707
2011-06-19 13:53:42 +00:00
Anders Broman
35fd959d6d Mark parameters as unused when MAIN_MENU_USE_UIMANAGER.
svn path=/trunk/; revision=37704
2011-06-19 09:33:18 +00:00
Anders Broman
ce01789f95 Add missing part of menu.c checkin for UI manager code.
svn path=/trunk/; revision=37703
2011-06-19 09:26:13 +00:00
Anders Broman
a2106225ad Add the correct casts to make it compile on some old ERHL box.
svn path=/trunk/; revision=37693
2011-06-17 13:19:44 +00:00
Anders Broman
9f60fc7471 Handle deprecated GtkTooltips.
svn path=/trunk/; revision=37661
2011-06-13 15:13:39 +00:00
Anders Broman
2bc816dbc1 Handle deprecated GtkTooltips.
svn path=/trunk/; revision=37660
2011-06-13 14:54:33 +00:00
Michael Tüxen
2119fdb283 cfilter can be NULL. Handle this correctly.
This should fix
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6016

svn path=/trunk/; revision=37655
2011-06-12 10:35:55 +00:00
Guy Harris
6584ad9781 Add some more error checking.
svn path=/trunk/; revision=37648
2011-06-10 17:16:09 +00:00
Anders Broman
59dc5adbc4 Make capture dialog compile with GTK3+
svn path=/trunk/; revision=37647
2011-06-10 16:27:53 +00:00
Anders Broman
c0d4b8a152 Seemingly this is needed to...
svn path=/trunk/; revision=37646
2011-06-10 11:01:43 +00:00
Anders Broman
22ceac7035 Add casts to make it compile on some old ERHL box.
svn path=/trunk/; revision=37645
2011-06-10 08:31:14 +00:00
Bill Meier
d2629a5335 Add a hack to prevent a gcc warning "ignoring return value of 'strtoul'..."
for some gcc configurations (see _FORTIFY_SOURCE).
This hack is used instead of storing the result returned by strtoul() in a
dummy variable so as to prevent a gcc 4.6 with -Wextra warning:
 "set but not used ...".

TBD: will this hack pass muster with other validators
     such as Coverity, CLang, & etc ?

For much gory detail: see the message thread starting at:
http://www.wireshark.org/lists/wireshark-dev/201106/msg00088.html


svn path=/trunk/; revision=37642
2011-06-10 02:10:44 +00:00
Anders Broman
5659d18813 Add casts to make it compile on some old ERHL box.
svn path=/trunk/; revision=37629
2011-06-09 08:51:30 +00:00
Martin Mathieson
651e93c93a The passed-in filter string can no longer be NULL, so use strlen instead of testing pointer.
svn path=/trunk/; revision=37621
2011-06-08 17:08:27 +00:00
Michael Tüxen
e0b054f2e2 This fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6008
Clear the list of interfaces before adding new interfaces.
Also fix an endless loop which would occur in case of an error
when getting remote interfaces.

From Irene Ruengeler.

svn path=/trunk/; revision=37618
2011-06-08 14:12:47 +00:00
Anders Broman
2cc50fa41c Try to fix the Ubuntu buildbot.
svn path=/trunk/; revision=37617
2011-06-08 13:11:51 +00:00
Anders Broman
1a81c428d9 Assign to a dummy variable to squelch the warning.
svn path=/trunk/; revision=37616
2011-06-08 12:05:49 +00:00
Guy Harris
712d0fa20d Didn't need to introduce that variable.
svn path=/trunk/; revision=37607
2011-06-08 04:49:35 +00:00
Guy Harris
a3714500fd Try to squelch the warning about not using the return value of strtoul()
- we really *are* using it just for its side-effects if it fails; its
return value is not the best way to check for failure, as the failure
return values are also valid return values on success.

While we're at it, check for it setting errno, which is one of the
better ways to check for failure.

svn path=/trunk/; revision=37606
2011-06-08 04:07:15 +00:00
Bill Meier
54105fbc42 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;
Also: do some whitespace cleanup.

svn path=/trunk/; revision=37602
2011-06-07 22:59:19 +00:00
Bill Meier
d75988bacc Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;
Also: whitespace cleanup in some cases.

svn path=/trunk/; revision=37601
2011-06-07 22:50:49 +00:00
Stig Bjørlykke
6188db17c1 From Roland Knall via bug 5996:
Corrected old-style function definition.

svn path=/trunk/; revision=37564
2011-06-06 08:33:33 +00:00
Stig Bjørlykke
5cffc12201 From Roland Knall via bug 5995:
Fix CMake build.

svn path=/trunk/; revision=37563
2011-06-06 07:09:49 +00:00
Guy Harris
04269d4ac6 Add support for PARAM_ENUM tap parameters, and use the tap_param_dlg
stuff for the SCSI SRT tap.

Get rid of include of gtk/filter_dlg.h in stats taps that don't need it.

svn path=/trunk/; revision=37562
2011-06-06 01:04:56 +00:00
Guy Harris
7d1b946c0e Clean up indentation - use 4-space indentation uniformly. (No tabs -
tab stops aren't necessarily every 4 spaces.)

svn path=/trunk/; revision=37561
2011-06-05 23:16:14 +00:00
Guy Harris
dd05bb48b2 Rename the tap_dfilter_dlg.[ch] files to reflect that they can do more
than just filters.

svn path=/trunk/; revision=37560
2011-06-05 23:04:11 +00:00
Guy Harris
3a1097a0ae Some work on generalizing the "display filter" tap parameter dialog box
to more generally support fetching parameters for taps.

svn path=/trunk/; revision=37559
2011-06-05 22:39:23 +00:00
Jakub Zawadzki
11426cb47b Fix memleaks and sigsegv when coping to clipboard RTP Streams.
svn path=/trunk/; revision=37554
2011-06-05 19:35:36 +00:00
Anders Broman
aa369ddbae wrong sort of column “Packets” in “RTP Streams” window.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5988

svn path=/trunk/; revision=37550
2011-06-05 16:33:00 +00:00
Gerald Combs
0272ec5dd3 Show the plugin paths in Help→About→Plugins. Add a "-G plugins" option
to TShark which dumps a list of plugins.

svn path=/trunk/; revision=37512
2011-06-01 21:48:17 +00:00
Michael Tüxen
268c5f21b7 Improve handling of command line arg errors (for example "wireshark -f").
From Irene Ruengeler.

svn path=/trunk/; revision=37505
2011-06-01 09:26:33 +00:00
Anders Broman
4c93ff1b8a REmove the check for HAVE_AIRPDCAP
svn path=/trunk/; revision=37494
2011-05-31 21:34:23 +00:00
Bill Meier
bf4844eb99 Fix some gcc 'old-style function definition' warnings.
svn path=/trunk/; revision=37482
2011-05-31 15:49:59 +00:00
Michael Tüxen
8f8f0e9ad6 Get rid of has_cfilter to simplify the handling of multiple interfaces.
svn path=/trunk/; revision=37478
2011-05-31 14:49:21 +00:00
Michael Tüxen
4d11bebc1d Don't limit the snaplen if not reqested.
Found by Irene Ruengeler.

svn path=/trunk/; revision=37473
2011-05-31 07:30:38 +00:00
Stig Bjørlykke
92b6074f4d Include the profile name in the Edit item in the profiles popup.
svn path=/trunk/; revision=37471
2011-05-30 12:49:04 +00:00
Stig Bjørlykke
f8425c99a6 Changed "Rename" to "Edit" in profiles popup menu.
svn path=/trunk/; revision=37469
2011-05-30 12:42:46 +00:00
Jörg Mayer
fad5156f7f Rev 37446 added export_sslkeys.c
svn path=/trunk/; revision=37457
2011-05-29 08:51:04 +00:00
Guy Harris
f0f7323122 Make a routine not used outside this file static.
svn path=/trunk/; revision=37450
2011-05-29 00:08:27 +00:00
Guy Harris
691ada3816 More warning squelching. (Thank you, GLib developers, for using gulong
rather than gsize as the second argument to the GLib snprintf routines.)

svn path=/trunk/; revision=37448
2011-05-28 22:17:22 +00:00
Guy Harris
9e22269a58 Get rid of some warnings on Win64.
svn path=/trunk/; revision=37447
2011-05-28 20:55:21 +00:00
Sake Blok
ba086053c7 Add "File -> Export -> SSL Session Keys..." to be able to save the keyring info for each session in the trace file. This makes it possible to give someone the trace and the exported keys so that they can decrypt the traffic in the trace, but not new sessions to the same server.
(See also: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3444)


svn path=/trunk/; revision=37446
2011-05-28 18:17:50 +00:00
Anders Broman
1f1e8d29a3 Include text_import_scanner.l in the distribution.
svn path=/trunk/; revision=37431
2011-05-27 10:49:34 +00:00
Anders Broman
320dcc9fe0 Remove no longer used files.
svn path=/trunk/; revision=37430
2011-05-27 10:24:36 +00:00
Stig Bjørlykke
445bbfb6cd Added some row space to "Create New Profile".
svn path=/trunk/; revision=37428
2011-05-27 07:39:13 +00:00
Stig Bjørlykke
f1e5a5892d Added some row space to "Edit Column Details".
svn path=/trunk/; revision=37427
2011-05-27 07:38:08 +00:00
Jeff Morriss
f3f9f2697f Make TVBs opaque for most users.
Convert TVB_RAW_OFFSET() and TVB_GET_DS_TVB() into functions.

svn path=/trunk/; revision=37422
2011-05-27 03:06:50 +00:00
Martin Mathieson
780efd342c Allow longer field names in the advanced filter control.
svn path=/trunk/; revision=37390
2011-05-25 09:08:27 +00:00
Gerald Combs
a24687ce8e Move the Windows argument list conversion code to a common routine.
svn path=/trunk/; revision=37372
2011-05-24 00:07:56 +00:00
Michael Tüxen
985a98dd1b Fix the case where you start with interfaces on the command line
(so using ifaces) and then using the GUI (which only deals with
iface).

These kind of problems will completely disappear when the
old strucuture components like iface have completely be
retired. This is the next thing we will work on.

svn path=/trunk/; revision=37345
2011-05-22 11:11:00 +00:00
Michael Tüxen
c6c2577bbc Fix the capturing from the GUI. Honor the iface variable.
The next step is to retire the iface variable and use
the ifaces array only. This should simplify things and
fix the cases, where you start wireshark with command
line arguments and also use the GUI.

svn path=/trunk/; revision=37342
2011-05-21 13:22:38 +00:00
Stig Bjørlykke
0a3f9da616 gtk_menu_item_set_label() is from gtk 2.16.
svn path=/trunk/; revision=37325
2011-05-20 11:58:00 +00:00
Stig Bjørlykke
2c1ede3dce Include the profile name in the Delete item in the profiles popup.
Fixed creating a new profile from the popup without setting a create from.
Removed some unneeded ep_strdup_printf.

svn path=/trunk/; revision=37324
2011-05-20 11:30:51 +00:00
Michael Tüxen
8b701e108a In case we have no interface information in the array, use the global value.
This fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5935.

svn path=/trunk/; revision=37307
2011-05-19 20:20:35 +00:00
Bill Meier
00bf3cacb3 Remove unneeded variable and code; Rename a function arg; Fix usage of _U_: Fixes Coverity 1146 [UNUSED]
svn path=/trunk/; revision=37301
2011-05-19 19:22:49 +00:00
Michael Tüxen
79f53d1fdc When capturing from multiple interface, indicate this in the main status bar.
This patch is, as all other patches related to capturing from multiple interfaces,
based on work of Irene Ruengeler.

svn path=/trunk/; revision=37296
2011-05-19 16:11:02 +00:00
Michael Tüxen
60822702bb Fix compilation.
svn path=/trunk/; revision=37295
2011-05-19 15:38:44 +00:00
Bill Meier
e0f6ebef7f Don't assign a value to a variable which is then not used: Coverity 1145
svn path=/trunk/; revision=37293
2011-05-19 14:48:05 +00:00
Bill Meier
8499c857a7 Don't assign to an unused variable; remove variable definition: Coverity 1144.
svn path=/trunk/; revision=37291
2011-05-19 14:32:14 +00:00
Michael Tüxen
307d7e8c3c When capturing from multiple interfaces, indicate this in the window
title of the wireshark main window.

svn path=/trunk/; revision=37289
2011-05-19 12:19:03 +00:00
Jörg Mayer
7b6b4cfd12 Fix warnings about unused variables in UI_MANAGER code.
Move gsm_a_stat.c back to clean dissectors.

svn path=/trunk/; revision=37283
2011-05-19 05:46:07 +00:00
Jörg Mayer
6b93c33026 Fix two warning in case of UIMANAGER:
- Unused variable
- ‘graph_type’ may be used uninitialized

Is the second part of the patch (added inside the else clause)
correct?

svn path=/trunk/; revision=37282
2011-05-19 05:44:32 +00:00
Michael Tüxen
ef718b0209 When capturing from multiple interfaces, indicate this in the
capture info dialog.
This is based on wirk from Irene Ruengeler.

svn path=/trunk/; revision=37280
2011-05-19 05:00:28 +00:00
Michael Tüxen
8b01902a02 Add support for multiple interfaces for the -L option.
svn path=/trunk/; revision=37250
2011-05-18 18:04:50 +00:00
Balint Reczey
5921cd68a2 Refer to "Capture Help" as "Capture Help below" when there are no interfaces
to capture on.

svn path=/trunk/; revision=37238
2011-05-18 13:08:02 +00:00
Stig Bjørlykke
8aad87c84e Removed "Copy" from the profiles popup menu in favour of a "Create from"
dropdown in the "Create New Profile" window.

svn path=/trunk/; revision=37237
2011-05-18 08:10:37 +00:00
Guy Harris
8f53a5655c Make some routines static that aren't used outside the source file in
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
2011-05-17 23:33:23 +00:00
Guy Harris
1372515b02 More eradication of old-style function definitions.
svn path=/trunk/; revision=37216
2011-05-17 22:18:32 +00:00
Guy Harris
da1403c6dd This ain't C++; you have to put "void" in as the argument list of
functions that take no arguments, otherwise the function is treated as a
crufty old C function with undeclared arguments.

svn path=/trunk/; revision=37211
2011-05-17 21:26:25 +00:00
Chris Maynard
4530909323 A gboolean is a gint; technically, it doesn't fit in a bit field of length 1,
so eliminate the bit field.  Fixes Coverity CIDs 1195-1196.

svn path=/trunk/; revision=37189
2011-05-16 20:33:39 +00:00
Anders Broman
0cb247defc More GUIManager stuff.
svn path=/trunk/; revision=37175
2011-05-16 06:28:33 +00:00
Bill Meier
5a54b1d742 Mark a function arg as unused.
svn path=/trunk/; revision=37170
2011-05-15 21:28:21 +00:00
Bill Meier
c4a6e2f044 Replace a number if 'if(...){exit(10);}' by _g_asserts;
Fix an event callback function signature;
Change quit() signal calback function to return void;
#include <stdlib.h> not req'd;
Misc minor changes.

svn path=/trunk/; revision=37169
2011-05-15 21:12:55 +00:00
Bill Meier
e9326d7152 Don't assign to an unused variable;
#include <stdlib.h> not req'd

svn path=/trunk/; revision=37168
2011-05-15 21:09:04 +00:00
Bill Meier
6a5644b497 Replace some 'if(...){exit(10);}' by g_asserts;
Fix some event callback functon signatures;
Change the "destroy" callback function (quit()) to return void: It's not an event callback.
Do some whitespace cleanup.

svn path=/trunk/; revision=37166
2011-05-15 19:01:38 +00:00
Stig Bjørlykke
c479a32028 Mark an unused argument.
svn path=/trunk/; revision=37163
2011-05-15 17:54:33 +00:00
Bill Meier
da1fcc2347 Use correct signature for event callback functions;
Use event callback function user_data arg instead of using a property;
Replace an 'if(...) {... exit(10);}' by a g_assert;
Remove several unneeded 'if(...) {... exit(10);}' groups of code;
Do whitespace cleanuip.

svn path=/trunk/; revision=37159
2011-05-15 16:51:21 +00:00
Anders Broman
27f76e0f34 Remove debug code.
svn path=/trunk/; revision=37157
2011-05-15 15:09:44 +00:00
Anders Broman
1bfd32c506 Set menu sensitivity.
svn path=/trunk/; revision=37156
2011-05-15 15:08:47 +00:00
Anders Broman
f758c5a32b Add the TCPGraph for UIManager.
Note sensitivity remains to be fixed.

svn path=/trunk/; revision=37154
2011-05-15 14:18:22 +00:00
Jeff Morriss
7896033ed8 Whitespace cleanup.
svn path=/trunk/; revision=37152
2011-05-15 02:48:18 +00:00
Jeff Morriss
d0af7351c5 gtk_combo_box_get_active_text() may return NULL and g_ascii_strcasecmp() complains if its first argument is NULL, so check for the NULL pointer before using it.
svn path=/trunk/; revision=37151
2011-05-15 02:45:18 +00:00
Jeff Morriss
2daa006cd2 main_widgets_rearrange(): only pack the airpcap_tb once (to avoid GTK complaints about the child already having a parent).
svn path=/trunk/; revision=37150
2011-05-15 02:42:52 +00:00
Anders Broman
d4aac68393 Move MAIN_MENU_USE_UI_MANAGER outside of if win32.
svn path=/trunk/; revision=37140
2011-05-14 13:15:22 +00:00
Stig Bjørlykke
0220f5d8ee More packets_bar_update improvements.
svn path=/trunk/; revision=37134
2011-05-13 21:49:35 +00:00
Jeff Morriss
f96589758a Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5902 :
Increase the maximum number of silence frames insert from 1000 to 240,000.

svn path=/trunk/; revision=37130
2011-05-13 19:02:55 +00:00
Stig Bjørlykke
d631023f4f Simplified string handling in packets_bar_update to use GString.
This allows both Dropped and Ignored count, combined with Load time.

svn path=/trunk/; revision=37121
2011-05-13 11:50:33 +00:00
Michael Tüxen
cfe3d2d0da Get -L and -d working with multiple interface. Internally get some functions
using the array of interface data.
Improve output of -L by printing the interface name.

svn path=/trunk/; revision=37120
2011-05-13 11:28:51 +00:00
Jörg Mayer
811afde69e Play catch up with recent configure.in changes:
- Link dumpcap (and only dumpcap) against gthread
- gtk/gsm_a_stat.c and gtk/menus.c are dirty when configured with UI_MANAGER=1
- Add support run "cmake ... -DWANT_PACKET_EDITOR=1 ..."


svn path=/trunk/; revision=37103
2011-05-12 21:13:00 +00:00
Jakub Zawadzki
63981c8b35 Packet editor: support for saving changed frames.
svn path=/trunk/; revision=37099
2011-05-12 19:47:49 +00:00
Jakub Zawadzki
b680407847 Conditional support for packet-editor [default=no].
svn path=/trunk/; revision=37084
2011-05-12 17:14:59 +00:00
Anders Broman
4857270e0b Copy-paste error.
svn path=/trunk/; revision=37079
2011-05-12 15:40:32 +00:00
Anders Broman
bce6b09c8a Convetr more menus to GUIManager.
svn path=/trunk/; revision=37078
2011-05-12 15:17:28 +00:00
Stig Bjørlykke
0fc261ab54 Corrected endif.
svn path=/trunk/; revision=37075
2011-05-12 11:17:22 +00:00
Anders Broman
50e30e3c70 Make the use of UIManager a configure option.
NOTE Only for Windows.

Additional moves to UIManager.

svn path=/trunk/; revision=37072
2011-05-12 10:56:26 +00:00
Anders Broman
b179df9201 Fix a typo.
svn path=/trunk/; revision=37037
2011-05-10 07:23:00 +00:00
Anders Broman
94aaa689ea Forgot to comment out UI_MANAGER
svn path=/trunk/; revision=37036
2011-05-10 06:03:56 +00:00
Anders Broman
8aa3a7b0ac More GUIManager stuff.
svn path=/trunk/; revision=37035
2011-05-10 05:31:45 +00:00
Gerald Combs
40baaf4dbe We probably shouldn't call pcap-ng "experimental" any more.
svn path=/trunk/; revision=37033
2011-05-09 19:29:40 +00:00
Balint Reczey
72b5d04c1a If no interface is found for capturing show this information
and direct user to Capture Help instead of showing the empty list of
interfaces and capture options.

svn path=/trunk/; revision=37016
2011-05-08 10:56:23 +00:00
Anders Broman
bfb25c3dca More GUIManager stuff.
svn path=/trunk/; revision=36995
2011-05-05 05:23:05 +00:00
Bill Meier
b25b2cd862 Fix two unused variable assignments: Coverity 1140.
Also: fix some indentation.

svn path=/trunk/; revision=36991
2011-05-05 00:15:59 +00:00
Bill Meier
6351e61e1d Fix 3 memory leaks: unused g_malloc(): Coverity 1148-1150 [UNUSED];
svn path=/trunk/; revision=36990
2011-05-04 23:56:29 +00:00
Bill Meier
2f23cb2ff6 Fix Coverity 1191: DEADCODE;
Use consistent indentation.

svn path=/trunk/; revision=36989
2011-05-04 22:48:51 +00:00
Anders Broman
0f6d022e33 More GUIManager stuff.
Note Use GUI manager needs to be set in gui_stet_menu.h too,
to use it.

svn path=/trunk/; revision=36985
2011-05-04 19:02:42 +00:00
Anders Broman
aac86cad85 More GUIManager stuff.
svn path=/trunk/; revision=36982
2011-05-03 22:09:18 +00:00
Anders Broman
b569f052d9 More GUIManager stuff.
svn path=/trunk/; revision=36981
2011-05-03 20:23:57 +00:00
Jakub Zawadzki
8570de9708 Packet editor:
- support for FT_IPv4

svn path=/trunk/; revision=36980
2011-05-03 18:27:08 +00:00
Stephen Fisher
f97d6d0450 From Jose Pico via bug #5884: Corrected export_object smb segmentation
fault


svn path=/trunk/; revision=36979
2011-05-03 17:38:26 +00:00
Anders Broman
ec855fcd7e Do some prep work on GUIManager code, if you enable it it will break as the menus.c changes are not commited.
svn path=/trunk/; revision=36978
2011-05-03 16:51:08 +00:00
Anders Broman
c263f6461e Do some prep work on GUIManager code, if you enable it it will break as the menus.c changes are not commited.
svn path=/trunk/; revision=36977
2011-05-03 16:45:37 +00:00
Guy Harris
89b6793472 One bit suffices for the "columnized" and "colorized" flags in the
packet list store, and there's one PacketListRecord for every packet, so
that can save some space...

...especially if we move them after all the pointers, rather than before
the pointers, so they don't collectively take up 8 bytes on an LP64 or
LLP64 platform due to pointers having to be 8-byte aligned.

svn path=/trunk/; revision=36968
2011-05-03 02:03:25 +00:00
Guy Harris
b42fab3a61 TShark doesn't need column text attached to each frame; move col_text
and col_text_len from the frame_data structure to the PacketRecord
structure.

svn path=/trunk/; revision=36967
2011-05-03 01:19:55 +00:00
Guy Harris
11565cd070 Fix a comment.
svn path=/trunk/; revision=36966
2011-05-03 00:22:35 +00:00
Anders Broman
48abbd7f6c Use correct signature on callbacks.
svn path=/trunk/; revision=36957
2011-04-30 08:36:00 +00:00
Stig Bjørlykke
de18d83f61 Initialize if_device to NULL at start and when g_free.
This fixes a bug introduced in revision 36741.

svn path=/trunk/; revision=36929
2011-04-28 08:48:35 +00:00
Jakub Zawadzki
1b8aa36735 Packet editor: add support for FT_BOOLEAN, and integer bitmasks.
svn path=/trunk/; revision=36897
2011-04-27 12:53:57 +00:00
Guy Harris
c9b9dd690b Create a new frame_data_sequence data type; it represents a dense
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
2011-04-27 02:54:44 +00:00
Jakub Zawadzki
22b920d461 - Synchronize gtk/Makefile.am checkapi with gtk/Makefile.nmake
- fix: Found deprecated-gtk APIs in packet_win.c: gtk_entry_new_with_max_length

svn path=/trunk/; revision=36867
2011-04-26 10:10:22 +00:00
Jakub Zawadzki
c833b47b6c Add new function packet_hex_editor_print.
svn path=/trunk/; revision=36866
2011-04-26 08:51:25 +00:00
Jakub Zawadzki
b61c3870ef Packet editing for single field_info:
- Support FT_STRING and FT_STRINGZ types.
- hex editor (mainly for unsupported types)

svn path=/trunk/; revision=36865
2011-04-26 07:12:42 +00:00
Chris Maynard
4238db2e6d Plug a memory leak.
svn path=/trunk/; revision=36859
2011-04-26 00:41:08 +00:00
Stephen Fisher
be246f61f5 Take out extra pair of parenthesis
svn path=/trunk/; revision=36858
2011-04-25 22:55:31 +00:00
Jakub Zawadzki
c2c55a5db2 Make checkapi happy
svn path=/trunk/; revision=36857
2011-04-25 21:26:52 +00:00
Guy Harris
3de56a2a7b Get rid of some extra parentheses that cause clang to warn that you
might have meant to do an assignment rather than a comparison.

svn path=/trunk/; revision=36853
2011-04-25 21:07:01 +00:00
Jakub Zawadzki
8f51ae50df Fix compilation warning:
packet_win.c:230: warning: 'u_val' may be used uninitialized in this function

svn path=/trunk/; revision=36852
2011-04-25 19:57:45 +00:00
Jakub Zawadzki
1bab9ecf97 - Experimental support to edit single field_info.
Note: For now only integers (without bitmask), I'm afraid other fields require more work.

svn path=/trunk/; revision=36850
2011-04-25 19:28:00 +00:00
Guy Harris
71b31d92fc Store the frame_data structures in a tree, rather than a linked list.
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
2011-04-25 19:01:05 +00:00
Guy Harris
678be392f1 Make the packet count an unsigned value, as frame numbers are unsigned.
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
2011-04-25 05:33:07 +00:00
Jakub Zawadzki
96284b41b8 Packet editing:
- Show next editing bit (for hex it'd require patching packet_hex_apply_reverse_tag)
- Remove memset()s
- Try to fix compilation for win64.

svn path=/trunk/; revision=36843
2011-04-24 22:52:49 +00:00
Jakub Zawadzki
56b6777ba3 Allocate space for epan_dissect_t inside struct.
svn path=/trunk/; revision=36842
2011-04-24 21:57:12 +00:00
Jakub Zawadzki
06ad060901 Initial support for editing packets inside wireshark.
svn path=/trunk/; revision=36841
2011-04-24 21:19:41 +00:00
Guy Harris
a39c3fab30 new_packet_list_find_row_from_data() is always used to select a packet,
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
2011-04-24 21:02:55 +00:00
Guy Harris
b99f04d32c Make the interface combo box an entry, so you can type in it again.
svn path=/trunk/; revision=36838
2011-04-24 19:41:28 +00:00
Guy Harris
f2fe6e5dbf gtk_combo_box_new_text() returns a GtkComboBox, and you connect a
function directly to its "changed" signal; GtkComboBox is a subclass of
GtkBin, but you don't connect to its child.

svn path=/trunk/; revision=36837
2011-04-24 19:38:12 +00:00
Stig Bjørlykke
dbf6e826af Check if changing to another profile in change_configuration_profile()
svn path=/trunk/; revision=36830
2011-04-23 09:47:28 +00:00
Jakub Zawadzki
5969e0e1c1 Add return instructions for system without support for G_GNUC_NORETURN (e.g. some older gcc compilers).
Reported by Anders Broman on -dev list.

svn path=/trunk/; revision=36797
2011-04-22 07:15:45 +00:00
Stig Bjørlykke
ac43567a95 Removed some unneeded variables with initialization.
svn path=/trunk/; revision=36779
2011-04-21 20:56:01 +00:00
Stig Bjørlykke
b3a36e585e Removed some unneeded assignments.
svn path=/trunk/; revision=36778
2011-04-21 20:44:56 +00:00
Anders Broman
09dc5526dc Revert the previous commit, I was confused :-)
svn path=/trunk/; revision=36750
2011-04-21 12:04:02 +00:00
Anders Broman
0315e063e4 Add a cast as there seems to be a problem on some sytems
conversations_table.c: In function `ct_create_popup_menu':

conversations_table.c:1938: warning: passing arg 2 of `gtk_action_group_add_actions' discards qualifiers from pointer target type

make: *** [libui_a-conversations_table.o] Error 1

svn path=/trunk/; revision=36747
2011-04-21 08:12:55 +00:00
Anders Broman
c590fd1d73 Replace the capture interface deprecated gtk_combo_new() with gtk_combo_box_entry_new_text.
svn path=/trunk/; revision=36741
2011-04-20 20:17:20 +00:00
Stephen Fisher
d8a4b783da From Cecco via bug #5605: bug on gtk wireshark telephony->mtp3->msus
[doesn't show contents of window]


svn path=/trunk/; revision=36723
2011-04-19 19:52:50 +00:00
Anders Broman
f80dcc2109 Replace the capture filter deprecated gtk_combo_new() with gtk_combo_box_entry_new_text,
svn path=/trunk/; revision=36718
2011-04-19 16:02:07 +00:00
Anders Broman
61041c062d Coverity UNUSED_VALUE
CID 1141

svn path=/trunk/; revision=36684
2011-04-17 18:10:08 +00:00
Anders Broman
bd8c36d4a3 Coverity UNUSED_VALUE
CID 1142,1143,1147

svn path=/trunk/; revision=36683
2011-04-17 18:00:14 +00:00
Martin Mathieson
960376a8f3 Show max UEs/TTI in MAC stats window (UL/DL separately).
svn path=/trunk/; revision=36658
2011-04-16 10:56:18 +00:00
Stephen Fisher
9246c41703 Change ws_strdup_escape_underscore() function to be more general, by
accepting any character as the escaped character.  Change existing
uses to use '_' for the underscore escaping.


svn path=/trunk/; revision=36627
2011-04-13 16:56:24 +00:00
Guy Harris
4fdcc5c180 Rename ws_stat to ws_stat64, and make it take a pointer to a ws_statb64
as an argument, along the lines of ws_fstat64, and, on Windows, make it
use _wstati64, to handle 64-bit file sizes.

svn path=/trunk/; revision=36547
2011-04-10 20:59:10 +00:00
Stig Bjørlykke
41e10f6bf2 From Jakub Zawadzki via bug 5809:
Compare frame number when columns are equal.

svn path=/trunk/; revision=36532
2011-04-09 19:03:04 +00:00
Guy Harris
c8d2cd3cb5 In packet_list_dissect_and_cache_record(), set the columns to
*something* if we get an error reading the packet from the capture file,
rather than leaving them as null (which will cause a crash).

svn path=/trunk/; revision=36527
2011-04-09 04:33:26 +00:00
Jeff Morriss
e61fd0979b From Gisle Vanem: text_import_scanner_lex.h is no longer used.
svn path=/trunk/; revision=36507
2011-04-07 20:04:01 +00:00
Chris Maynard
43803a3457 More console tweaks. But how to prevent prompt from being displayed before
command finishes without requiring, "start /wait <command>"?

svn path=/trunk/; revision=36463
2011-04-04 19:15:31 +00:00
Gerald Combs
031164aa9f More console tweaks.
svn path=/trunk/; revision=36458
2011-04-04 18:03:24 +00:00
Gerald Combs
e7435f2d3f Only call destroy_console() when we create a console (pointed out by
Chris Maynard).

svn path=/trunk/; revision=36455
2011-04-04 17:48:07 +00:00