Commit Graph

2232 Commits

Author SHA1 Message Date
Guy Harris 1fb476bf9f Have to include config.h before including headers that use #defines,
such as HAVE_LIBPCAP, from config.h.

svn path=/trunk/; revision=53583
2013-11-25 22:01:03 +00:00
Guy Harris e2735b15e0 No libpcap, no capturing, no capture interfaces. Ifdef the entire
capture interfaces dialog code, *and* the code that calls it, under
HAVE_LIBPCAP.

Still more stuff to remove from the no-pcap UI, such as the Capture
menu, the capture filter in the main window, and the list of interfaces
in the main window.

svn path=/trunk/; revision=53582
2013-11-25 21:50:58 +00:00
Guy Harris 2c9ea8a51f If we don't have any preference set for the link-layer header type for
an interface, don't destroy the default link-layer header type from the
list of types.

I.e., first get the type from the preference (which sets the type to -1
if there isn't a preference), and then loop through the list of types
and, if there was no value obtained from the preference (i.e., the type
is -1), set it to the first type in the list.

Also, don't bother with the link-layer header type from the global
default options, as a global (all-interface) link-layer header type
makes little sense, given that the list of link-layer header types for
an interface depends on the type of interface and hence may differ from
interface to interface.

Fixes bug 9473.

svn path=/trunk/; revision=53581
2013-11-25 21:21:25 +00:00
Guy Harris 747ab4e006 Blank after comma for all arguments in that call.
svn path=/trunk/; revision=53579
2013-11-25 20:54:19 +00:00
Alexis La Goutte 393c769597 From Thomas ERSFELD (GSoC13) and me : Try to fix OSX-10.5-x86 (without pcap...) Buildbot
svn path=/trunk/; revision=53572
2013-11-25 17:01:10 +00:00
Alexis La Goutte d4c4e24351 Try to fix OSX-10.6-x64 Buildbot
svn path=/trunk/; revision=53568
2013-11-25 15:56:22 +00:00
Alexis La Goutte 056a5edc21 Comment debug...
svn path=/trunk/; revision=53567
2013-11-25 15:43:16 +00:00
Alexis La Goutte 34d7df78cc From Thomas ERSFELD (GSoC13) : Try to fix Windows buildbot
svn path=/trunk/; revision=53566
2013-11-25 15:43:08 +00:00
Alexis La Goutte 43b1f47695 From Thomas ERSFELD (GSoC13) : Add Capture interface dialog window
* Reuse sparkline from welcome
* Split settings in tab (!= GTK)
* No all feature work (Work In Progress...)
* ...

Comments (and review) are welcome !

svn path=/trunk/; revision=53563
2013-11-25 14:15:49 +00:00
Jakub Zawadzki 6aec20c782 Rmove packet_info argument from packet_list_append(), never used.
Part of attachment 12060, from Didier Gautheron (bug #9419).

svn path=/trunk/; revision=53544
2013-11-24 12:49:50 +00:00
Guy Harris 84e23ce90f Set a field to squelch a Coverity warning.
svn path=/trunk/; revision=53524
2013-11-23 20:10:02 +00:00
Guy Harris a18cf1975f Always check cf->edt before dereferencing it, so that Coverity doesn't
say "you checked it here, but you dereferenced it later even if it was
null when you checked it".

This obviates the need for some checks of frame_selected, as cf->edt
will be non-null iff cf->current_frame is non-null.

Always check *cf, not cfile, in set_menus_for_selected_packet(). 
Currently, cf always == &cfile, but we aren't guaranteeing that will be
true forever.

svn path=/trunk/; revision=53523
2013-11-23 19:51:02 +00:00
Michael Mann 9b7fb8a811 Create the ability to have packet scoped "proto" data. Bug 9470 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470)
I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future.  And search/replace of a function name is easy enough to do.

The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As.

All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope().  All other dissectors were converted to using file_scope() which was the original scope for "proto" data.

svn path=/trunk/; revision=53520
2013-11-23 02:20:13 +00:00
Gerald Combs b3a24c5cc4 Replace similar code with a common routine.
svn path=/trunk/; revision=53519
2013-11-23 01:06:30 +00:00
Gerald Combs 213d47a82e Fix packet list selection signaling.
It looks like resetting the packet list model during freezing and
thawing disconnects the selection changed signal between the model and
the main window. Rename the packet list's setMenusFollowStream signal to
packetSelectionChanged and use it to trigger menu updates in the main
window.

svn path=/trunk/; revision=53516
2013-11-22 17:59:15 +00:00
Gerald Combs 779f95ab61 Make the "decode as" dialog modal (for now, at least).
svn path=/trunk/; revision=53515
2013-11-22 17:53:25 +00:00
Alexis La Goutte 6e2b1c91f4 Fix typo in top filename
svn path=/trunk/; revision=53505
2013-11-22 08:53:05 +00:00
Gerald Combs 635a5b196c Fix qmake builds on Unix.
tap_register.variable_out adds wireshark-tap-register.c to SOURCES. We
don't have to add it again ourselves.

svn path=/trunk/; revision=53502
2013-11-22 02:11:40 +00:00
Gerald Combs 629d5f1697 Mark a parameter unused.
svn path=/trunk/; revision=53501
2013-11-22 01:25:17 +00:00
Gerald Combs e5c9616fd2 Remove a commented-out duplicate dissector_table definition.
svn path=/trunk/; revision=53500
2013-11-22 01:11:49 +00:00
Gerald Combs 78266fe17e Add an initial "Decode As" dialog. Currently read-only.
Fixup some of the Statistics menu items.

svn path=/trunk/; revision=53499
2013-11-22 01:07:36 +00:00
Gerald Combs 70709e1b35 Move common "decode as" preference code to epan.
We presumably want "decode as" behavior to be consistent across UIs so
call load_decode_as_entries() from read_prefs().

svn path=/trunk/; revision=53498
2013-11-22 00:20:23 +00:00
Gerald Combs fd51955989 Tap listeners have to be registered before we read our prefs.
svn path=/trunk/; revision=53491
2013-11-21 20:24:01 +00:00
Guy Harris a1f2a76427 #if 0 out some currently-unused variables and the code that sets them,
to squelch compiler warnings.

svn path=/trunk/; revision=53485
2013-11-21 18:48:36 +00:00
Gerald Combs 22f8920d56 Remove an unused function.
svn path=/trunk/; revision=53479
2013-11-21 17:39:32 +00:00
Michael Mann 64c687346b Remove packet_info->ipproto and packet_info->ethertype uses in the GUI. Convert to walking packet protocol list looking for desired protocols.
I may eventually switch this to use proto_* values instead of strings, but just the addition of the loop is more jarring as compared to the simple comparing of ip or ethernet values.  But it should lead to a smaller (less protocol specific) packet_info structure.

svn path=/trunk/; revision=53476
2013-11-21 16:42:10 +00:00
Michael Mann 2e983ba89f Revert what I thought was a simple "compile" change for r53473, but causes Wireshark to crash at startup.
svn path=/trunk/; revision=53474
2013-11-21 12:46:31 +00:00
Michael Mann ad1d471b1b Walk list of protocol strings to determine which protocols are present in a packet rather than rely on protocol specific items in packet_info in an effort to (eventually) reduce packet_info members.
svn path=/trunk/; revision=53473
2013-11-21 12:16:49 +00:00
Guy Harris 0604779baa Add ui_stats_tree_dialog.h to the list of generated headers not to
install; that should fix the "make distclean" errors.

svn path=/trunk/; revision=53469
2013-11-21 05:55:30 +00:00
Gerald Combs daa8b5e046 Fix buildbing ui/qt/wireshark-tap-register.c with autotools.
svn path=/trunk/; revision=53467
2013-11-21 02:12:56 +00:00
Gerald Combs 26325020a2 Try to get qmake to create wireshark-tap-register.c.
svn path=/trunk/; revision=53466
2013-11-21 02:05:36 +00:00
Gerald Combs ea28298e96 Add a statistics tree dialog.
Add menu items for each corresponding item in gtk/main_menubar.c that
calls gtk_stats_tree_cb(). Hopefully that's everything. Note that we use
quite a bit less code than the GTK+ flavor and why we might not want to
do that. Change a few things in ui/qt/CMakeLists.txt to more closely
match the GTK+ version. Add plumbing for tap registrations in
CMakeLists.txt and Makefile.am. Add the ability to copy text as CSV or
YAML.

svn path=/trunk/; revision=53464
2013-11-21 01:28:17 +00:00
Guy Harris 1ee50439ca We don't need "ws_symbol_export.h" if we're not using anything from it;
see whether that's what's currently causing Windows build problems.

svn path=/trunk/; revision=53460
2013-11-21 00:34:38 +00:00
Jörg Mayer 254614fe73 GTK3 >= 3.10 will fail building if deprecation warnings are on.
Fix this for the cmake build by disabling these warnings.

svn path=/trunk/; revision=53459
2013-11-21 00:28:33 +00:00
Guy Harris bd625113ea status, in main, is now used only if we have libpcap.
svn path=/trunk/; revision=53455
2013-11-20 22:38:15 +00:00
Guy Harris 44b4d2aab0 libui is an static library, not a dynamic library, so the WS_DLL_PUBLIC
stuff isn't necessary and doesn't work on Windows.

svn path=/trunk/; revision=53454
2013-11-20 22:36:05 +00:00
Michael Mann 01c8945438 Provide "Decode As" functionality through dissectors themselves instead of the GUI. Bug 9450 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9450)
The basic idea behind this design is to have dissectors register with a "decode as list" with their name and dissector table.  When "Decode As" dialog is launched, any "registered" dissector found in the packet will cause a tab to be created in the dialog.  Any GUI (GTK+/Qt/tshark) can just hook into the "decode as list" to see what can be provided.

This patch includes the GUI portion of the functionality (including packet-dcerpc.[ch] because it had some GUI dependencies that are now removed).

Other notes:
1. Some "GUI text" (UTF8_LEFTWARDS_ARROW and similar) made their way into the dissector code.  Not sure how necessary it is and if reformatting the strings to avoid the macros is desired (TCP/UDP use it, SCTP doesn't).

2. I converted the SCTP functionality to have 2 tabs (instead of radio button), currently both are labeled "Transport" which could be confusing to users.  Naming suggestions welcome (as well as for naming of tabs from other dissectors).

3. BER and DCERPC have more opportunity to use Decode As now that they are selected based on dissector presense, not packet_info values.

4. Catapult DCT2000 populates pinfo->ipproto, yet under new design will not show up to do Decode As.  Should a "decode as item" be created for it?

5. BER dissector doesn't have Clear/Show Current functionality working (never did)

6. Bluetooth (in old design) could have been used "capture wide" instead of single packet (creating tabs of values not present in current packet), which goes against what I believe to be in the intent of Decode As, but I'm willing to hear counter-arguments.

svn path=/trunk/; revision=53446
2013-11-20 19:23:02 +00:00
Michael Mann 76ab93ea94 Provide "Decode As" functionality through dissectors themselves instead of the GUI. Bug 9450 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9450)
The basic idea behind this design is to have dissectors register with a "decode as list" with their name and dissector table.  When "Decode As" dialog is launched, any "registered" dissector found in the packet will cause a tab to be created in the dialog.

This patch includes just the dissector portion of the functionality (minus packet-dcerpc.[ch] because it has hooks to the current GUI)

svn path=/trunk/; revision=53445
2013-11-20 19:17:08 +00:00
Gerald Combs 80db2d0ade Print one YAML item per packet.
svn path=/trunk/; revision=53439
2013-11-19 20:29:58 +00:00
Guy Harris 06098fce7b Add routines to set the personal file directory paths (personal
configuration file directory and directory in which to save captures),
have the routine to parse -P options use them, and move that routine to
libui.

Have that routine just return a gboolean.

svn path=/trunk/; revision=53435
2013-11-19 19:45:38 +00:00
Martin Kaiser 3d0c92e017 fix compiler warning about write-only variable
svn path=/trunk/; revision=53426
2013-11-19 07:05:34 +00:00
Guy Harris d766ab6560 The GTK+ "follow stream" dialogs don't support "save as YAML"; put in a
stub case, complete with a "this can't happen" assert failure, to
squelch compiler warnings.

svn path=/trunk/; revision=53423
2013-11-19 00:32:02 +00:00
Guy Harris f089b4cd9d #if 0 out an error check that wasn't doing anything interesting for an
error, and put in a pseudo-code call to stand in for error reporting
code.

Fix a signed-vs-unsigned comparison issue.

svn path=/trunk/; revision=53422
2013-11-19 00:29:37 +00:00
Gerald Combs 45fc7b65e0 Follow dialog data display improvements.
Change the "Raw" character type to UTF-8. I'm not sure it's possible
to show true raw data in a QTextEdit widget and calling it UTF-8 more
accurately repesents what happens when you pass a char * to a QString.
Add a YAML display. Hopefully Scapy users will find it useful.

Sort the the character display items alphabetically. Make sure we go
back to the top of the buffer when we change the direction or character
set. Be less aggressive about setting focus on the "find text" entry.

svn path=/trunk/; revision=53421
2013-11-18 23:39:47 +00:00
Alexis La Goutte 0bae995e39 Remove duplicate (wireshark_application.h) and unused #include files
svn path=/trunk/; revision=53413
2013-11-18 20:26:27 +00:00
Alexis La Goutte 4f2808bb19 Fix indent (use 4 spaces) and add modelines
svn path=/trunk/; revision=53389
2013-11-17 14:03:45 +00:00
Guy Harris 74647a318b We just use g_get_tmp_dir() to get the temporary file directory when
creating temporary files, so use it to get the directory we show to the
user.

svn path=/trunk/; revision=53378
2013-11-17 04:31:26 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Gerald Combs 47c6288b0e From Dirk Jagdmann: Make sure err_str is initialized.
svn path=/trunk/; revision=53347
2013-11-15 23:15:08 +00:00
Gerald Combs de4c6a2d07 Reset data_out_file when we close it. Add comments and fixup whitespace.
svn path=/trunk/; revision=53343
2013-11-15 20:25:33 +00:00