Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
follow_stream_dialog.h
1 /* follow_stream_dialog.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef FOLLOW_STREAM_DIALOG_H
11 #define FOLLOW_STREAM_DIALOG_H
12 
13 #include <config.h>
14 
15 #include <glib.h>
16 
17 #include <stdio.h>
18 
19 #ifdef HAVE_UNISTD_H
20 #include <unistd.h>
21 #endif
22 
23 #include "file.h"
24 
25 #include "epan/follow.h"
26 
27 #include "wireshark_dialog.h"
28 
29 #include <QFile>
30 #include <QMap>
31 #include <QPushButton>
32 
33 namespace Ui {
34 class FollowStreamDialog;
35 }
36 
38 {
39  Q_OBJECT
40 
41 public:
42  explicit FollowStreamDialog(QWidget &parent, CaptureFile &cf, follow_type_t type = FOLLOW_TCP);
44 
45  bool follow(QString previous_filter = QString(), bool use_stream_index = false, int stream_num = -1);
46 
47 public slots:
48  void captureEvent(CaptureEvent e);
49 
50 protected:
51  bool eventFilter(QObject *obj, QEvent *event);
52  void keyPressEvent(QKeyEvent *event);
53 
54 private slots:
55  void on_cbCharset_currentIndexChanged(int idx);
56  void on_cbDirections_currentIndexChanged(int idx);
57  void on_bFind_clicked();
58  void on_leFind_returnPressed();
59 
60  void helpButton();
61  void backButton();
62  void close();
63  void filterOut();
64  void useRegexFind(bool use_regex);
65  void findText(bool go_back = true);
66  void saveAs();
67  void printStream();
68  void fillHintLabel(int text_pos);
69  void goToPacketForTextPos(int text_pos);
70 
71  void on_streamNumberSpinBox_valueChanged(int stream_num);
72 
73  void on_buttonBox_rejected();
74 
75 signals:
76  void updateFilter(QString filter, bool force);
77  void goToPacket(int packet_num);
78 
79 private:
80  void removeStreamControls();
81  void resetStream(void);
82  void updateWidgets(bool follow_in_progress);
83  void updateWidgets() { updateWidgets(false); } // Needed for WiresharkDialog?
84  frs_return_t
85  showBuffer(char *buffer, size_t nchars, gboolean is_from_server,
86  guint32 packet_num, guint32 *global_pos);
87 
88  frs_return_t readStream();
89  frs_return_t readFollowStream();
90  frs_return_t readSslStream();
91 
92  void followStream();
93  void addText(QString text, gboolean is_from_server, guint32 packet_num);
94 
96 
97  QPushButton *b_filter_out_;
98  QPushButton *b_find_;
99  QPushButton *b_print_;
100  QPushButton *b_save_;
101  QPushButton *b_back_;
102 
103  follow_type_t follow_type_;
104  follow_info_t follow_info_;
105  register_follow_t* follower_;
106  show_type_t show_type_;
107  QString data_out_filename_;
108  static const int max_document_length_;
109  bool truncated_;
110  QString previous_filter_;
111  QString filter_out_filter_;
112  QString output_filter_;
113  int client_buffer_count_;
114  int server_buffer_count_;
115  int client_packet_count_;
116  int server_packet_count_;
117  guint32 last_packet_;
118  gboolean last_from_server_;
119  int turns_;
120  QMap<int,guint32> text_pos_to_packet_;
121 
122  bool save_as_;
123  bool use_regex_find_;
124  QFile file_;
125 
126  bool terminating_;
127 };
128 
129 #endif // FOLLOW_STREAM_DIALOG_H
130 
131 /*
132  * Editor modelines - http://www.wireshark.org/tools/modelines.html
133  *
134  * Local variables:
135  * c-basic-offset: 4
136  * tab-width: 8
137  * indent-tabs-mode: nil
138  * End:
139  *
140  * vi: set shiftwidth=4 tabstop=8 expandtab:
141  * :indentSize=4:tabSize=8:noTabs=true:
142  */
Definition: ui_about_dialog.h:291
Definition: follow_stream_dialog.h:37
Definition: follow.h:84
Definition: capture_event.h:19
Definition: ui_follow_stream_dialog.h:165
Definition: follow.c:23
Definition: mcast_stream.h:30
Definition: wireshark_dialog.h:32
Definition: capture_file.h:22