Wireshark  4.3.0
The Wireshark network protocol analyzer
follow_stream_dialog.h
Go to the documentation of this file.
1 
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 #include <QTextCodec>
33 
34 namespace Ui {
35 class FollowStreamDialog;
36 }
37 
39 {
40  Q_OBJECT
41 
42 public:
43  explicit FollowStreamDialog(QWidget &parent, CaptureFile &cf, int proto_id);
45 
46  void addCodecs(const QMap<QString, QTextCodec *> &codecMap);
47  bool follow(QString previous_filter = QString(), bool use_stream_index = false, guint stream_num = 0, guint sub_stream_num = 0);
48 
49 protected:
50  bool eventFilter(QObject *obj, QEvent *event);
51  void keyPressEvent(QKeyEvent *event);
52  void captureFileClosed();
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  void on_subStreamNumberSpinBox_valueChanged(int sub_stream_num);
73 
74  void on_buttonBox_rejected();
75 
76 signals:
77  void updateFilter(QString filter, bool force);
78  void goToPacket(int packet_num);
79 
80 private:
81  void removeStreamControls();
82  void resetStream(void);
83  void updateWidgets(bool follow_in_progress);
84  void updateWidgets() { updateWidgets(false); } // Needed for WiresharkDialog?
85  frs_return_t
86  showBuffer(char *buffer, size_t nchars, gboolean is_from_server,
87  guint32 packet_num, nstime_t abs_ts, guint32 *global_pos);
88 
89  frs_return_t readStream();
90  frs_return_t readFollowStream();
91  frs_return_t readSslStream();
92 
93  void followStream();
94  void addText(QString text, gboolean is_from_server, guint32 packet_num, gboolean colorize = true);
95 
96  Ui::FollowStreamDialog *ui;
97 
98  QPushButton *b_filter_out_;
99  QPushButton *b_find_;
100  QPushButton *b_print_;
101  QPushButton *b_save_;
102  QPushButton *b_back_;
103 
104  follow_info_t follow_info_;
105  register_follow_t* follower_;
106  QString data_out_filename_;
107  static const int max_document_length_;
108  bool truncated_;
109  QString previous_filter_;
110  QString filter_out_filter_;
111  QString output_filter_;
112  int client_buffer_count_;
113  int server_buffer_count_;
114  int client_packet_count_;
115  int server_packet_count_;
116  guint32 last_packet_;
117  gboolean last_from_server_;
118  int turns_;
119  QMap<int,guint32> text_pos_to_packet_;
120 
121  bool use_regex_find_;
122 
123  bool terminating_;
124 
125  int previous_sub_stream_num_;
126 };
127 
128 #endif // FOLLOW_STREAM_DIALOG_H
Definition: capture_file.h:23
Definition: follow_stream_dialog.h:39
void captureFileClosed()
Called when the capture file was closed. This can be used to enable or disable widgets according to t...
Definition: follow_stream_dialog.cpp:1111
Definition: wireshark_dialog.h:35
Definition: follow.h:60
Definition: mcast_stream.h:30
Definition: nstime.h:26
Definition: follow.c:23