Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
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 <stdio.h>
16
17#ifdef HAVE_UNISTD_H
18#include <unistd.h>
19#endif
20
21#include "file.h"
22
23#include "epan/follow.h"
24
25#include "wireshark_dialog.h"
26
27#include <QFile>
28#include <QMap>
29#include <QPushButton>
30#include <QTextCodec>
31
32namespace Ui {
34}
35
37{
38 Q_OBJECT
39
40public:
41 explicit FollowStreamDialog(QWidget &parent, CaptureFile &cf, int proto_id);
43
44 void addCodecs(const QMap<QString, QTextCodec *> &codecMap);
45 bool follow(QString previous_filter = QString(), bool use_stream_index = false, unsigned stream_num = 0, unsigned sub_stream_num = 0);
46
47protected:
48 bool eventFilter(QObject *obj, QEvent *event);
49 void keyPressEvent(QKeyEvent *event);
50 void captureFileClosed();
51 virtual QString labelHint(int pkt = 0);
52
53 int client_packet_count() const { return client_packet_count_; }
54 int server_packet_count() const { return server_packet_count_; }
55 int turns() const { return turns_; }
56 const follow_info_t& followInfo() const { return follow_info_; }
57
58 virtual QString serverToClientString() const;
59 virtual QString clientToServerString() const;
60 virtual QString bothDirectionsString() const;
61
62
63private slots:
64 void cbCharsetCurrentIndexChanged(int idx);
65 void deltaComboBoxCurrentIndexChanged(int idx);
66 void cbDirectionsCurrentIndexChanged(int idx);
67 void bFindClicked();
68 void leFindReturnPressed();
69
70 void helpButton();
71 void backButton();
72 void close();
73 void filterOut();
74 void useRegexFind(bool use_regex);
75 void findText(bool go_back = true);
76 void saveAs();
77 void printStream();
78 void fillHintLabel(int pkt = 0);
79 void goToPacketForTextPos(int pkt = 0);
80
81 void streamNumberSpinBoxValueChanged(int stream_num);
82 void subStreamNumberSpinBoxValueChanged(int sub_stream_num);
83
84 void buttonBoxRejected();
85
86signals:
87 void updateFilter(QString filter, bool force);
88 void goToPacket(int packet_num);
89
90private:
91 // Callback for register_tap_listener
92 static void resetStream(void *tapData);
93
94 void removeStreamControls();
95 void resetStream(void);
96 void updateWidgets(bool follow_in_progress);
97 void updateWidgets() { updateWidgets(false); } // Needed for WiresharkDialog?
98 void showBuffer(QByteArray &buffer, size_t nchars, bool is_from_server,
99 uint32_t packet_num, nstime_t abs_ts, uint32_t *global_pos);
100 void readStream();
101 void readFollowStream();
102
103 void followStream();
104 void addText(QString text, bool is_from_server, uint32_t packet_num, bool colorize = true);
105
106 Ui::FollowStreamDialog *ui;
107
108 QPushButton *b_filter_out_;
109 QPushButton *b_find_;
110 QPushButton *b_print_;
111 QPushButton *b_save_;
112 QPushButton *b_back_;
113
114 follow_info_t follow_info_;
115 register_follow_t* follower_;
116 QString previous_filter_;
117 QString filter_out_filter_;
118 QString output_filter_;
119 int client_buffer_count_;
120 int server_buffer_count_;
121 int client_packet_count_;
122 int server_packet_count_;
123 uint32_t last_packet_;
124 bool last_from_server_;
125 nstime_t last_ts_;
126 int turns_;
127
128 bool use_regex_find_;
129
130 bool terminating_;
131
132 int previous_sub_stream_num_;
133};
134
135#endif // FOLLOW_STREAM_DIALOG_H
Definition capture_file.h:21
Definition follow_stream_dialog.h:37
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:1170
Definition wireshark_dialog.h:35
Definition follow.h:62
Definition mcast_stream.h:30
Definition nstime.h:26
Definition follow.c:23