aboutsummaryrefslogtreecommitdiffstats
path: root/wireshark-qt.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-03-25Have a #define for whether the capture buffer size can be set.Guy Harris1-3/+3
It can be set if either 1) this is Windows (where we're assumed to be using WinPcap, which includes calls to set the buffer size) or 2) we have pcap_create() (in which case we also have pcap_set_buffer_size(), at least in a normal libpcap release). Use that rather than testing "defined(_WIN32) || defined(HAVE_PCAP_CREATE)"; that makes it a bit more obvious what's being tested. Change-Id: Id9f8455019d19206b04dd6820a748cb97ae5ad12 Reviewed-on: https://code.wireshark.org/review/7816 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-10Change a lot of http:// URLs to https://.Gerald Combs1-1/+1
Most of our sites are now HTTPS-only. Update URLs accordingly. Update other URLs while we're at it. Remove or comment out dead links. Change-Id: I7c4f323e6585d22760bb90bf28fc0faa6b893a33 Reviewed-on: https://code.wireshark.org/review/7621 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-24Qt: Apply recent settings.Gerald Combs1-2/+2
Add PacketList::applyRecentColumnWidths which set the packet list column widths from our recent settings. Make sure it gets called at startup and when we change profiles. Save the packet list header state so that we can restore it when we reset the model (i.e. freezing and thawing) and load a new capture file. Save the state when the user resizes a column. As a side effect this works around a weird bug that adjusts the width of column 1 at an inopportune time. Add a profileChanging signal so that we can save the main window geometry in each profile. Get rid of MainWindow::configurationProfileChanged. It was unused. Apply saved pane widths and heights. Note that we might want to add a separate pair of recent settings for the Qt panes. Use the last opened directory in the capture file dialog. Git rid of some unneeded Q_UNUSEDs while we're here. Bug: 10953 Change-Id: I812aff59818cf0b4d1598b580627d32728d2e9d7 Reviewed-on: https://code.wireshark.org/review/7247 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-20Just have init_progfile_dir() take a void pointer.Guy Harris1-1/+1
dladdr() takes a void * as a code pointer; have init_progfile_dir() do so, and do the casting in the calls. We don't care about the signature of the function whose address we're passing, we just want to pass a pointer to *something* in the main program. Change-Id: I9372620a97b0eb53c2bb3c0c41a238b4408f3709 Reviewed-on: https://code.wireshark.org/review/7270 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-18Fix various warnings in wireshark-qt.cpp.Gerald Combs1-1/+5
Squelch warnings due to (char *) casts. Use "include_directories(SYSTEM..." in CMakeLists.txt so that we don't get pedantic warnings about things we can't easily fix such as QList loop optimizations. Not sure if there's an easy way to do this in Autotools. Pass get_gui_compiled_info to init_progfile_dir. C++ don't have to show you any stinkin' ::main. warning: ISO C++ forbids taking address of function ‘::main’ [-Wpedantic] Change-Id: If1c77284ab0d1b4786bce4e926a4109dd9b1ae34 Reviewed-on: https://code.wireshark.org/review/7207 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-12Qt: Add the "new packet" window^Wdialog^Wwindow.Gerald Combs1-0/+1
Allow persistence across files. Preserve the use of "window" even though we're really a dialog. Update ByteViewTab and ProtoTree to support multiple instances. Remove the need for a cast in frame_data. Add more forward declarations. Change-Id: I50d3d9d1455b8ecc158a37218f9e41fe696d5ae2 Reviewed-on: https://code.wireshark.org/review/7086 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-12WSDG: Start adding Qt material.Gerald Combs1-1/+1
Move some text from README.qt to the Developer's Guide. Add an overview. Change-Id: Ia20ed837939e34871b157566c38cd0c6e590bc38 Reviewed-on: https://code.wireshark.org/review/7087 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-31Get rid of a trailing blank.Guy Harris1-1/+1
Change-Id: I27e3ba1be4a9ee23d619d751ae1abdef963b7597 Reviewed-on: https://code.wireshark.org/review/6871 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-31Fix a comment to reflect reality.Guy Harris1-2/+2
Change-Id: I90fce5376ca17648840c473afac7f9e962c14667 Reviewed-on: https://code.wireshark.org/review/6870 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-31We need to get the pathname of the executable *before* running dumpcap.Guy Harris1-6/+6
In order to find dumpcap, we need to get the pathname of the executable image, and we support -D in the first argument parsing loop, and that runs dumpcap to get the interface list, so we need to get the pathname of the executable image before that. Change-Id: If789cf1ff4f5cf5d5c3b171a3d4eb90a6e2faf1d Reviewed-on: https://code.wireshark.org/review/6869 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-31No main window *to* update in the early argument list parsing.Guy Harris1-1/+1
We haven't yet popped the main window up, so, when we call capture_interface_list(), we shouldn't pass a pointer to the "update the main window" routine. Change-Id: Id3e02199479e66bb9e9aff99b435bd03af45a1af Reviewed-on: https://code.wireshark.org/review/6868 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-31This being C++, maybe we don't have to initialize ws_app until later.Guy Harris1-4/+3
Try going back to haveing ws_app be an automatic variable, but don't declare it until after we've done the first-pass argument parsing. Change-Id: Ia1f2a4819570bfadcba75d498e01dbe64991843c Reviewed-on: https://code.wireshark.org/review/6867 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-31Do the first-pass argument parsing before creating the WiresharkApplication.Guy Harris1-133/+120
That way, *all* the don't-need-a-GUI options can be processed without trying to pop up a GUI, just as is the case with the GTK+ version. Change-Id: Icbe47642eec45e887087f46c366322b8f23206cc Reviewed-on: https://code.wireshark.org/review/6866 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-30Qt: Fix library path reset.Gerald Combs1-4/+38
g9a3676a reset the Qt library path *after* wsApp was instantiated, which is too late. Do so before QCoreApplication has a chance to do anything we might regret. Change-Id: Ibbdb69d1b7c0ea4bf1042e98a5bb5deba13e954e Reviewed-on: https://code.wireshark.org/review/6864 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-30When issued with -v wireshark-qt prints version and exits.Dario Lombardo1-13/+24
Change-Id: I3993c502156d534f17baa409729e2dc763910ac8 Bug: 10789 Reviewed-on: https://code.wireshark.org/review/6840 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-04Fix out-of-tree build includes of config.hGraham Bloice1-3/+3
If a file in the same directory as config.h, e.g. wireshark-qt.cpp has a #include "config.h", or another header it includes also has a #include "config.h", then an out-of-tree build, e.g. CMake will pick up any in-tree config.h and odd things may happen. The correct form is #include <config.h> which will pick up the out-of-tree version. To find this, introduce a deliberate error and then make an out-of-tree build, noting where it fails and fix that file. If that file includes other files that still cause the build to fail, set the compiler to emit the pre-processed version so you can locate the include with the next errant "config.h". Repeat ad nauseum. Possibly all includes of "config.h" should be changed to <config.h> Revert "CMake: Clobber the top-level config.h before we build." This reverts commit 1f3849ce614aeae5fda742beffe5558e7c2a8b71. Ping-Bug: 10301 Change-Id: Ie567e7cc696fd48f3e730fc27032c5d2a7d8f341 Reviewed-on: https://code.wireshark.org/review/6285 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-03Remove the testing stuff.Guy Harris1-11/+0
The problem was probably that we had two competing config.h files, with some source files including one of them and othe source files including the other, with the nmake config.h defining HAVE_KERBEROS and HAVE_MIT_KERBEROS and the CMake config.h defining neither, and with wireshark-qt.cpp including the nmake config.h, so that it expected there to be a read_keytab_file() routine, and epan/dissectors/packet-kerberos.c including the CMake config.h, so that it didn't define a read_keytab_file() routine. (If the CMake build is done out-of-tree, with its config.h file outside the source tree, and the nmake build done in-tree, with its config.h in the top-level source directory, wireshark-qt.cpp, in the top-level source directory, might pick up the config.h in the same directory, but epan/dissectors/packet-kerberos.c doesn't have a config.h in its source directory and might pick up the config.h from the CMake build directory.) Change-Id: I040126026c4101aca1264affc04e585fee89b87b Reviewed-on: https://code.wireshark.org/review/6272 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-03Stick some #define probes in on Windows.Guy Harris1-2/+12
Let's try to figure out why, on the 64-bit Windows build, wireshark-qt.cpp is being compiled to call read_keytab_file() but packet-kerberos.c is not being compiled to define it. Change-Id: I782406e2189819d9400b84b6632fe0fb62c5996d Reviewed-on: https://code.wireshark.org/review/6261 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-03Temporarily #if 0 out the call to read_keytab_file().Guy Harris1-1/+2
If this fixes the Win64 build, somehow HAVE_KERBEROS is getting defined when this is built but we're not actually building read_keytab_file in packet-kerberos.c. If that *doesn't* fix the Win64 build's failure to find read_keytab_file(), something Really Weird is going on, because nobody should be looking for it. Change-Id: If607e0eeeff854693cf9ce2ea1009d34a20a9992 Reviewed-on: https://code.wireshark.org/review/6259 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-03Support -K iff HAVE_KERBEROS is defined.Guy Harris1-3/+3
This *shouldn't* make a difference, but it's a bit clearer, and, if it *does* make a difference with some build, there's a bug in the configuration process for that build. Clean up indentation while we're at it. Change-Id: I94aa6d565c3d5545620a7aeeaabce03153ec5e1c Reviewed-on: https://code.wireshark.org/review/6257 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01Declare read_keytab_file() in epan/dissectors/packet-kerberos.h.Guy Harris1-0/+6
Don't throw its declaration in file.h, as it's not defined in file.c. Instead, include it in epan/dissectors/packet-kerberos.h and include that wherever read_keytab_file() is called. Yes, that means you also have to include <epan/asn1.h> and, therefore, you have to include <epan/packet.h>. Yes, that should be cleaned up, perhaps by splitting the Kerberos support code into "stuff that handles encryption keys without any reference to dissection" and "stuff that does dissection-related work". Change-Id: Ide5c31e6d85e6011d57202f728dbc656e36138ef Reviewed-on: https://code.wireshark.org/review/6210 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01Include "file.h" to get read_keytab_file() declared.Guy Harris1-0/+1
Change-Id: I7e9ea47019f259a56a8652d0e003e23a3e1d1366 Reviewed-on: https://code.wireshark.org/review/6202 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01Move ui/qt/main.cpp to wireshark-qt.cpp, and get rid of the dummy.cpp hack.Guy Harris1-0/+1357
Change-Id: Ib4684264363593372b3bf078cf17cae1a1cb10d6 Reviewed-on: https://code.wireshark.org/review/6199 Reviewed-by: Guy Harris <guy@alum.mit.edu>