1 /* follow_stream_dialog.h
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifndef FOLLOW_STREAM_DIALOG_H
11 #define FOLLOW_STREAM_DIALOG_H
25 #include "epan/follow.h"
27 #include "wireshark_dialog.h"
31 #include <QPushButton>
34 class FollowStreamDialog;
37 class FollowStreamDialog : public WiresharkDialog
42 explicit FollowStreamDialog(QWidget &parent, CaptureFile &cf, follow_type_t type = FOLLOW_TCP);
43 ~FollowStreamDialog();
45 bool follow(QString previous_filter = QString(), bool use_stream_index = false, guint stream_num = 0);
48 void captureEvent(CaptureEvent e);
51 bool eventFilter(QObject *obj, QEvent *event);
52 void keyPressEvent(QKeyEvent *event);
55 void on_cbCharset_currentIndexChanged(int idx);
56 void on_cbDirections_currentIndexChanged(int idx);
57 void on_bFind_clicked();
58 void on_leFind_returnPressed();
64 void useRegexFind(bool use_regex);
65 void findText(bool go_back = true);
68 void fillHintLabel(int text_pos);
69 void goToPacketForTextPos(int text_pos);
71 void on_streamNumberSpinBox_valueChanged(int stream_num);
73 void on_buttonBox_rejected();
76 void updateFilter(QString filter, bool force);
77 void goToPacket(int packet_num);
80 void removeStreamControls();
81 void resetStream(void);
82 void updateWidgets(bool follow_in_progress);
83 void updateWidgets() { updateWidgets(false); } // Needed for WiresharkDialog?
85 showBuffer(char *buffer, size_t nchars, gboolean is_from_server,
86 guint32 packet_num, guint32 *global_pos);
88 frs_return_t readStream();
89 frs_return_t readFollowStream();
90 frs_return_t readSslStream();
93 void addText(QString text, gboolean is_from_server, guint32 packet_num);
95 Ui::FollowStreamDialog *ui;
97 QPushButton *b_filter_out_;
99 QPushButton *b_print_;
100 QPushButton *b_save_;
101 QPushButton *b_back_;
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_;
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_;
120 QMap<int,guint32> text_pos_to_packet_;
122 bool use_regex_find_;
127 #endif // FOLLOW_STREAM_DIALOG_H
130 * Editor modelines - https://www.wireshark.org/tools/modelines.html
135 * indent-tabs-mode: nil
138 * vi: set shiftwidth=4 tabstop=8 expandtab:
139 * :indentSize=4:tabSize=8:noTabs=true: