Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
iax2_analysis_dialog.h
Go to the documentation of this file.
1
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
23#include "ui/rtp_stream_id.h"
24
25#include <QAbstractButton>
26#include <QMenu>
27
28#include "wireshark_dialog.h"
29
30namespace Ui {
32}
33
34class QCPGraph;
35class QTemporaryFile;
36
46
47
52{
53 Q_OBJECT
54
55public:
61 explicit Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf);
62
67
68signals:
73 void goToPacket(int packet_num);
74
75protected slots:
79 virtual void updateWidgets();
80
81private 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
174private:
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);
333};
334
335#endif // IAX2_ANALYSIS_DIALOG_H
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
A dialog for analyzing IAX2 audio streams and displaying jitter/difference statistics.
Definition iax2_analysis_dialog.h:52
virtual void updateWidgets()
Updates the dialog's widgets based on the current data and selection state.
Definition iax2_analysis_dialog.cpp:407
void goToPacket(int packet_num)
Signal emitted to navigate to a specific packet in the main display.
~Iax2AnalysisDialog()
Destroys the Iax2AnalysisDialog.
Definition iax2_analysis_dialog.cpp:399
Base class for Wireshark specific dialogs that require interaction with a CaptureFile.
Definition wireshark_dialog.h:38
iax2_error_type_t
Enumerates the possible error types encountered during IAX2 stream analysis.
Definition iax2_analysis_dialog.h:40
@ TAP_IAX2_WRONG_LENGTH
Definition iax2_analysis_dialog.h:43
@ TAP_IAX2_NO_PACKET_SELECTED
Definition iax2_analysis_dialog.h:42
@ TAP_IAX2_FILE_IO_ERROR
Definition iax2_analysis_dialog.h:44
@ TAP_IAX2_NO_ERROR
Definition iax2_analysis_dialog.h:41
Definition proto.h:768
Definition packet-iax2.h:294
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
Definition proto.h:909
Definition rtp_stream_id.h:33
Definition tap-iax2-analysis.h:44
Holds all state for the dissection of a single byte array, including session, buffer,...
Definition epan_dissect.h:28
tap_packet_status
Definition tap.h:22