aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/follow_stream_dialog.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-01-08 08:25:17 -0500
committerMichael Mann <mmann78@netscape.net>2016-01-12 15:08:18 +0000
commitc62547b9510eb1a0efe08972387bfa8559f444d5 (patch)
tree6a186a7b7111c71ae64e3da965b447ed9f48d699 /ui/qt/follow_stream_dialog.h
parentb65d30dbd5d86092e6e4739a4da6075cf08b115d (diff)
Refactor "Follow Stream" functionality on all GUI interfaces.
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>
Diffstat (limited to 'ui/qt/follow_stream_dialog.h')
-rw-r--r--ui/qt/follow_stream_dialog.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/ui/qt/follow_stream_dialog.h b/ui/qt/follow_stream_dialog.h
index da0457175c..8508034fe8 100644
--- a/ui/qt/follow_stream_dialog.h
+++ b/ui/qt/follow_stream_dialog.h
@@ -34,7 +34,7 @@
#include "file.h"
-#include "ui/follow.h"
+#include "epan/follow.h"
#include "wireshark_dialog.h"
@@ -42,21 +42,6 @@
#include <QMap>
#include <QPushButton>
-extern "C" {
-WS_DLL_PUBLIC FILE *data_out_file;
-}
-
-// Shouldn't these be member variables?
-typedef struct {
- show_stream_t show_stream;
- show_type_t show_type;
- gboolean is_ipv6;
- GList *payload;
- guint bytes_written[2]; /* Index with FROM_CLIENT or FROM_SERVER for readability. */
- guint client_port;
- address client_ip;
-} follow_info_t;
-
namespace Ui {
class FollowStreamDialog;
}
@@ -69,7 +54,7 @@ public:
explicit FollowStreamDialog(QWidget &parent, CaptureFile &cf, follow_type_t type = FOLLOW_TCP);
~FollowStreamDialog();
- bool follow(QString previous_filter = QString(), bool use_stream_index = false);
+ bool follow(QString previous_filter = QString(), bool use_stream_index = false, int stream_num = -1);
public slots:
void captureFileClosing();
@@ -125,6 +110,8 @@ private:
follow_type_t follow_type_;
follow_info_t follow_info_;
+ register_follow_t* follower_;
+ show_type_t show_type_;
QString data_out_filename_;
static const int max_document_length_;
bool truncated_;