| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
iax2_analysis_dialog.h
Go to the documentation of this file.
1
9
10#ifndef IAX2_ANALYSIS_DIALOG_H
11#define IAX2_ANALYSIS_DIALOG_H
12
13// The GTK+ UI checks for multiple RTP streams, and if found opens the RTP
14// stream dialog. That seems to violate the principle of least surprise.
15// Migrate the code but disable it.
16// #define IAX2_RTP_STREAM_CHECK
17
18#include <config.h>
19
20#include <epan/address.h>
21
22#include "ui/tap-iax2-analysis.h"
23#include "ui/rtp_stream_id.h"
24
25#include <QAbstractButton>
26#include <QMenu>
27
28#include "wireshark_dialog.h"
29
30 namespace Ui {
31 class Iax2AnalysisDialog;
32}
33
34 class QCPGraph;
35 class QTemporaryFile;
36
40 typedef enum {
41 TAP_IAX2_NO_ERROR,
42 TAP_IAX2_NO_PACKET_SELECTED,
43 TAP_IAX2_WRONG_LENGTH,
44 TAP_IAX2_FILE_IO_ERROR
45} iax2_error_type_t;
46
47
51 class Iax2AnalysisDialog : public WiresharkDialog
52{
53 Q_OBJECT
54
55 public:
61 explicit Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf);
62
66 ~Iax2AnalysisDialog();
67
68signals:
73 void goToPacket(int packet_num);
74
75 protected slots:
79 virtual void updateWidgets() override;
80
81 private slots:
85 void on_actionGoToPacket_triggered();
86
90 void on_actionNextProblem_triggered();
91
96 void on_fJitterCheckBox_toggled(bool checked);
97
102 void on_fDiffCheckBox_toggled(bool checked);
103
108 void on_rJitterCheckBox_toggled(bool checked);
109
114 void on_rDiffCheckBox_toggled(bool checked);
115
119 void on_actionSaveAudio_triggered();
120
124 void on_actionSaveForwardAudio_triggered();
125
129 void on_actionSaveReverseAudio_triggered();
130
134 void on_actionSaveCsv_triggered();
135
139 void on_actionSaveForwardCsv_triggered();
140
144 void on_actionSaveReverseCsv_triggered();
145
149 void on_actionSaveGraph_triggered();
150
154 void on_buttonBox_helpRequested();
155
160 void showStreamMenu(QPoint pos);
161
166 void showGraphMenu(const QPoint &pos);
167
172 void graphClicked(QMouseEvent *event);
173
174 private:
176 Ui::Iax2AnalysisDialog *ui;
177
181 enum StreamDirection {
182 dir_both_,
183 dir_forward_,
184 dir_reverse_
185 };
186
188 rtpstream_id_t fwd_id_;
189
191 rtpstream_id_t rev_id_;
192
194 tap_iax2_stat_t fwd_statinfo_;
195
197 tap_iax2_stat_t rev_statinfo_;
198
200 QTemporaryFile *fwd_tempfile_;
201
203 QTemporaryFile *rev_tempfile_;
204
206 QList<QCPGraph *>graphs_;
207
209 QVector<double> fwd_time_vals_;
210
212 QVector<double> fwd_jitter_vals_;
213
215 QVector<double> fwd_diff_vals_;
216
218 QVector<double> rev_time_vals_;
219
221 QVector<double> rev_jitter_vals_;
222
224 QVector<double> rev_diff_vals_;
225
227 QString err_str_;
228
230 iax2_error_type_t save_payload_error_;
231
233 QMenu stream_ctx_menu_;
234
236 QMenu graph_ctx_menu_;
237
238 // Tap callbacks
239
244 static void tapReset(void *tapinfo_ptr);
245
254 static tap_packet_status tapPacket(void *tapinfo_ptr, packet_info *pinfo, struct epan_dissect *, const void *iax2info_ptr, tap_flags_t flags);
255
260 static void tapDraw(void *tapinfo_ptr);
261
265 void resetStatistics();
266
273 void addPacket(bool forward, packet_info *pinfo, const struct _iax2_info_t *iax2info);
274
281 void savePayload(QTemporaryFile *tmpfile, packet_info *pinfo, const struct _iax2_info_t *iax2info);
282
286 void updateStatistics();
287
291 void updateGraph();
292
297 void saveAudio(StreamDirection direction);
298
303 void saveCsv(StreamDirection direction);
304
305#if 0
314 uint32_t processNode(proto_node *ptree_node, header_field_info *hfinformation, const char* proto_field, bool *ok);
315
324 uint32_t getIntFromProtoTree(proto_tree *protocol_tree, const char *proto_name, const char *proto_field, bool *ok);
325#endif
326
332 bool eventFilter(QObject*, QEvent* event) override;
333};
334
335#endif // IAX2_ANALYSIS_DIALOG_H
address.h
CaptureFile
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
Iax2AnalysisDialog::goToPacket
void goToPacket(int packet_num)
Signal emitted to navigate to a specific packet in the main display.
Iax2AnalysisDialog::~Iax2AnalysisDialog
~Iax2AnalysisDialog()
Destroys the Iax2AnalysisDialog.
Definition iax2_analysis_dialog.cpp:399
Iax2AnalysisDialog::Iax2AnalysisDialog
Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf)
Constructs a new Iax2AnalysisDialog.
Definition iax2_analysis_dialog.cpp:189
Iax2AnalysisDialog::updateWidgets
virtual void updateWidgets() override
Updates the dialog's widgets based on the current data and selection state.
Definition iax2_analysis_dialog.cpp:407
WiresharkDialog::WiresharkDialog
WiresharkDialog(QWidget &parent, CaptureFile &capture_file)
Constructs a new WiresharkDialog object.
Definition wireshark_dialog.cpp:30
packet_info
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
proto_node
struct _proto_node proto_node
header_field_info
struct _header_field_info header_field_info
Definition proto.h:770
iax2_error_type_t
iax2_error_type_t
Enumerates the possible error types encountered during IAX2 stream analysis.
Definition iax2_analysis_dialog.h:40
TAP_IAX2_WRONG_LENGTH
@ TAP_IAX2_WRONG_LENGTH
Definition iax2_analysis_dialog.h:43
TAP_IAX2_NO_PACKET_SELECTED
@ TAP_IAX2_NO_PACKET_SELECTED
Definition iax2_analysis_dialog.h:42
TAP_IAX2_FILE_IO_ERROR
@ TAP_IAX2_FILE_IO_ERROR
Definition iax2_analysis_dialog.h:44
TAP_IAX2_NO_ERROR
@ TAP_IAX2_NO_ERROR
Definition iax2_analysis_dialog.h:41
rtp_stream_id.h
rtpstream_id_t
struct _rtpstream_id rtpstream_id_t
_iax2_info_t
Definition packet-iax2.h:294
epan_dissect
Holds all state for the dissection of a single byte array, including session, buffer,...
Definition epan_dissect.h:28
tap-iax2-analysis.h
tap_iax2_stat_t
struct _tap_iax2_stat_t tap_iax2_stat_t
Accumulates per-packet statistics for an IAX2 stream delivered via the tap interface.
tap_packet_status
tap_packet_status
Definition tap.h:22
wireshark_dialog.h