summaryrefslogtreecommitdiff
path: root/ui/gtk/follow_stream.c
AgeCommit message (Collapse)AuthorFilesLines
2016-11-10tcp: Fix Follow TCP tap data and when its tapped.Michael Mann1-16/+1
Use the model from the 2.0 branch and earlier that only "tapped" the follow data in a single location. This fixes duplicate data for reassembled data and handles out-of-order packets. Bug: 12855 Change-Id: I5268f13e3c08e9271acf026b859de693ad794c94 Reviewed-on: https://code.wireshark.org/review/18368 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-07-18Use follow_record_t in SSL follow stream.Jeff Morriss1-62/+1
... rather than a structure (SslDecryptedRecord) which looks (mostly) like a follow_record_t. (The biggest different is the former carries its data in a StringInfo while the latter uses a GByteArray.) With this change following SSL no longer needs its own special code. This also fixes a crash after saving a followed SSL stream (in the Qt UI). Bug: 12616 Change-Id: Ibdb2b85f8a6a30712743a5da420be1e6b78f5b92 Reviewed-on: https://code.wireshark.org/review/16516 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-06-19Revert "tap: change glib functions to wmem."Pascal Quantin1-3/+2
This reverts commit 2e9f3c5d366eaa7139fc877b5301392166b3f985. It breaks the registration of codec, dissector and libwiretap plugins. Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de Reviewed-on: https://code.wireshark.org/review/16012 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-17tap: change glib functions to wmem.Dario Lombardo1-2/+3
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf Reviewed-on: https://code.wireshark.org/review/15270 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-03Qt: Add UTF-16 output to Follow Stream.Gerald Combs1-0/+1
Add an option to display the "follow" data as UTF-16. Bug: 237 Change-Id: Id95ffc014b8ef718f3b6e9f3415806ada309c3a2 Reviewed-on: https://code.wireshark.org/review/15702 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-06-01Allow create_tempfile to support a suffix.Michael Mann1-1/+1
Ping-Bug: 10203 Change-Id: Ifa24870d711449b87e9839dd46af614e4aa28fde Reviewed-on: https://code.wireshark.org/review/15608 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2016-04-21Link version code statically againJoão Valverde1-1/+1
This allows keeping the code-sharing with the static linking. This "fixes" a hypothetical ABI mismatch with wsutil and avoids pulling more external dependencies to wsutil than strictly necessary. A nice side-effect is that libwsutil no longer depends on version.h. Follow up to f95976eefcbeb5d24df383c29d29ef888b503945. Change-Id: I8f0d6a557ab3f7ce6f0e2c269124c89f29d6ad23 Reviewed-on: https://code.wireshark.org/review/15002 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-04-06Qt: Follow stream performance improvements.Gerald Combs1-5/+8
Make FollowStreamText a subclass of QPlainTextEdit instead of QTextEdit. For large amounts of text, the former should be less unbearably slow than the latter. Increase the maximum stream size to 500MB. This isn't perfect but it's much more usable than 2MB and much easier than the next step, which is to write our own text display widget. Process UI events while we fill in the stream data. This gives us behavior similar to the GTK+ UI and is similar to what we do in other dialogs. Switch from g_memdup+g_free to a QByteArray in the Qt UI and GByteArray in the GTK+ UI. Don't call readStream twice. Make sure we free all of our stream data in the Qt UI. This fixes a serious memory leak. Ping-Bug: 11777 Change-Id: Ibad9bde86692ae07a80660566d1e661ab8b64601 Reviewed-on: https://code.wireshark.org/review/14271 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-26Add free_address_wmem(), fix warnings [-Wcast-qual]João Valverde1-1/+1
Try to improve address API and also fix some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Second try, now passing test suite. Change-Id: Idc101cd866b6d4f13500c9d59da5c7a38847fb7f Reviewed-on: https://code.wireshark.org/review/13946 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-08Revert "Add free_address_wmem() and other extensions to address API"João Valverde1-1/+1
This reverts commit 13ec77a9fc3af3b0b502820d0b55796c89997896. This commit introduces a segmentation fault for Lua code (uncovered by the test suite). Change-Id: Ibc273d1915cda9632697b9f138f0ae104d3fb65e Reviewed-on: https://code.wireshark.org/review/13813 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-07Add free_address_wmem() and other extensions to address APIJoão Valverde1-1/+1
Try to improve 'address' API (to be easier/safer) and also avoid some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Change-Id: I7456516b12c67620ceadac447907c12f5905bd49 Reviewed-on: https://code.wireshark.org/review/13463 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-01-12Refactor "Follow Stream" functionality on all GUI interfaces.Michael Mann1-113/+404
Create a "registration" system for Follow functionality so most of the work can be abstracted into a dissector and GUI can just be responsible for "display". This also removes the global variables in follow.c to open up multithreading possibilities. TCP, UDP and HTTP all have the same "tap interface" for Follow functionality (passing a tvb with byte data to "follow"). SSL still has it's own behavior, so Follow structures have to take that into account. TShark through the Follow registration now has support for HTTP. The only thing possibly missing is dynamic menu generation to further reduce explicit knowledge of Follow "type" (and rely on registration) Bug: 11988 Change-Id: I559d9ee1312406ad0986d4dce9fa67ea2103b339 Reviewed-on: https://code.wireshark.org/review/13161 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-03Cleanup follow stream codeMichael Mann1-22/+10
Adding Follow HTTP Stream justified some refactoring and code removal. Change-Id: I9b7ace83f8517e880e78193bb97ac32e3fc91114 Reviewed-on: https://code.wireshark.org/review/13015 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-03Add HTTP Follow streamMichael Mann1-0/+4
This automatically detects and decompresses HTTP along a TCP stream through the use of taps. Bug: 3528 Change-Id: I8ab832d509700d0da8eabf3c3e514d8511c598d3 Reviewed-on: https://code.wireshark.org/review/13009 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-07Clean up includes of unistd.h, fcntl.h, and sys/stat.h.Guy Harris1-3/+0
Have wsutil/file_util.h include them on UN*X, just as it includes io.h on Windows, so we can have a rule of "if you do file operations, include <wsutil/file_util.h> and use the routines in it". Remove includes of unistd.h, fcntl.h, and sys/stat.h that aren't necessary (whether because of the addition of them to wsutil/file_util.h or because they weren't needed in the first place). Change-Id: Ie241dd74deff284e39a5f690a297dbb6e1dc485f Reviewed-on: https://code.wireshark.org/review/11619 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-16Qt: add ability to save raw output to follow windowPascal Quantin1-0/+1
Bug: 11118 Change-Id: Idd383c16453c06d95bd9cec3f8e9be8daee49f5e Reviewed-on: https://code.wireshark.org/review/11047 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-17Remove unnecessary includes of <ctype.h>.Guy Harris1-1/+0
Change-Id: I8eacec5fa8d57b10d40a3627197461dae89c6cb2 Reviewed-on: https://code.wireshark.org/review/4768 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22Add a routine to return a version string including VCS information.Guy Harris1-3/+2
Add a routine get_ws_vcs_version_info() that, for builds from a tree checked out from Wireshark's version control system, returns a string that includes both the Wireshark version number and an indication of what particular VCS version was checked out, and just returns Wireshark's version number for other builds. Use that routine rather than manually gluing VERSION and the Git version number together. ("vcs", not "git", just in case we do something bizarre or mercurial some day. :-)) Change-Id: Ie5c6dc83b9d3f56655eaef30fec3ec9916b6320d Reviewed-on: https://code.wireshark.org/review/2529 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-11Fix display of unidirectional follow TCP/UDP streamsPascal Quantin1-2/+2
It was broken since 48285bb16b0a5655a47a8a59c34bc98e6bf4cb75 While we are at it, display the streams in the same order as Qt version Change-Id: I12df1c033dd51b7a162adca3fd36b31af5c074a1 Reviewed-on: https://code.wireshark.org/review/1587 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-11Migrate GTK icon handling to GTK 3.10 APIBalint Reczey1-3/+3
GtkStockItem usage is deprecated with all the GTK_STOCK_.* stock ids. We keep a stock id based approach but without relying on GTK's GtkStockItem system. We create our own internal stock ids for {icon, label} tuples and keep the original GTK stock id #define-s and values to preserve backward compatibility. Change-Id: Ia0b35a5903f079e92c8026e3df21bbf0be2d06b0 Reviewed-on: https://code.wireshark.org/review/302 Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-25Remove trailing whitespaceBill Meier1-2/+2
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0 Reviewed-on: https://code.wireshark.org/review/385 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-07Replace "svn" with "git" all over the place.Gerald Combs1-1/+1
Rename "SVNPATH" to "GITBRANCH" since that seems more appropriate. Rename "svnversion.h" to "version.h" as Evan suggested. Update some URLs. In make-version.pl, make sure we don't set an improper upstream branch name. Use the number of commits + short hash from `git describe` for package names by default. Change-Id: I922bba8d83eabdf49284a119f55b4076bc469b96 Reviewed-on: https://code.wireshark.org/review/139 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2013-12-21ui/gtk/follow_stream.c was using isprint.h hack, change all isprint()Jakub Zawadzki1-2/+2
svn path=/trunk/; revision=54329
2013-12-21Drop isprint.h use g_ascii_isprint() when this include hack was enabled.Jakub Zawadzki1-4/+3
svn path=/trunk/; revision=54327
2013-11-19The GTK+ "follow stream" dialogs don't support "save as YAML"; put in aGuy Harris1-0/+4
stub case, complete with a "this can't happen" assert failure, to squelch compiler warnings. svn path=/trunk/; revision=53423
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+1
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-07-12Move the print modules into epan.Jeff Morriss1-2/+4
svn path=/trunk/; revision=50526
2013-06-29Fix indent (Tabs => Spaces) and add modelines info for follow_* filesAlexis La Goutte1-826/+811
svn path=/trunk/; revision=50245
2013-06-26Move tempfile.{h,c} into wsutil.Jeff Morriss1-1/+1
svn path=/trunk/; revision=50163
2013-05-17From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8643Evan Huus1-17/+17
When a TCP segment contains the end of two or more SSL PDUs, the TCP reassembly code passes that segment up to the SSL dissector multiple times--one for each SSL PDU. The SSL dissector queues the packet for SSL tap listeners each time it is invoked. Therefore a single packet can be processed by SSL tap listeners multiple times. But the tap data that the SSL dissector sends to its tap listeners is a linked list of all PDUs in the packet. The SSL tap listener responsible for populating the Follow SSL Stream dialog did not account for the possibility of seeing a packet multiple times. As a result, it would process the entire linked list of PDUs each time it received a packet, and that would result in some SSL PDUs showing up two or more times in the dialog. This patch fixes the described bug. It also implements a few slight improvements in closely related code. See bugzilla for details. svn path=/trunk/; revision=49387
2013-05-15Use file_selection_run() for dialogs created with file_selection_new().Guy Harris1-87/+44
svn path=/trunk/; revision=49320
2013-05-14Give file_selection_new() an argument to specify the parent window ofGuy Harris1-10/+4
the file selection dialog. Call gtk_file_chooser_set_do_overwrite_confirmation() in file_selection_new() for FILE_SELECTION_SAVE file selection dialogs, rather than doing it in the individual callers of file_selection_new(). Use gtk_dialog_set_alternative_button_order() in file_selection_new() to set the alternative button order, rather than using #ifdefs. Use file_selection_new() and file_selection_run() in the graph analysis code. (We should clean up other code that uses file_selection_new() to use file_selection_run(), and clean up other code that uses gtk_file_chooser_dialog_new() to use file_selection_new() and file_selection_run().) svn path=/trunk/; revision=49308
2013-03-21From beroset:Bill Meier1-2/+2
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-10Use explicit casts.Anders Broman1-23/+23
svn path=/trunk/; revision=48232
2012-12-26Fix a bunch of warnings.Guy Harris1-2/+2
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-10-01Widen the "Find text" dialog a bit so the entire title is visible.Chris Maynard1-0/+1
svn path=/trunk/; revision=45241
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45016
2012-07-20For all recent changes (r43820...r43829) from gtk_container_add() to ↵Jakub Zawadzki1-1/+1
gtk_box_pack_start() set expand parameter to TRUE. svn path=/trunk/; revision=43860
2012-07-19gtk_container_add() -> gtk_box_pack_start().Anders Broman1-3/+3
svn path=/trunk/; revision=43829
2012-04-21Replace gtk_vbox_new() and gtk_hbox_new() with ws_gtk_box_new().Anders Broman1-6/+6
svn path=/trunk/; revision=42176
2012-01-18Restructure the recent file code so that recent.c is GUI-independent;Guy Harris1-1/+4
move it to the top-level source directory for now, and move ui/gtk/recent.h to the ui directory. svn path=/trunk/; revision=40561
2012-01-16Reflect the move of the top-level win32 directory into the ui directory.Guy Harris1-1/+1
svn path=/trunk/; revision=40532
2012-01-16Move some headers for UI stuff, and the alert_box.c UI-specific file, toGuy Harris1-2/+2
the ui directory. (Perhaps some other files that would be used by all flavors of Wireshark, for any GUI toolkit or for someting such as ncurses, and not for any command-line tool such as TShark, should be moved there as well.) Shuffle some #includes to put the "ui/XXX.h" includes together. svn path=/trunk/; revision=40529
2012-01-15Move gtk to ui/gtk.Jörg Mayer1-0/+1109
This looses the last checkin to gtk, will add this manually back. svn path=/trunk/; revision=40518