Wireshark 4.5.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
37typedef enum {
38 TAP_IAX2_NO_ERROR,
39 TAP_IAX2_NO_PACKET_SELECTED,
40 TAP_IAX2_WRONG_LENGTH,
41 TAP_IAX2_FILE_IO_ERROR
42} iax2_error_type_t;
43
44
46{
47 Q_OBJECT
48
49public:
50 explicit Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf);
52
53signals:
54 void goToPacket(int packet_num);
55
56protected slots:
57 virtual void updateWidgets();
58
59private slots:
60 void on_actionGoToPacket_triggered();
61 void on_actionNextProblem_triggered();
62 void on_fJitterCheckBox_toggled(bool checked);
63 void on_fDiffCheckBox_toggled(bool checked);
64 void on_rJitterCheckBox_toggled(bool checked);
65 void on_rDiffCheckBox_toggled(bool checked);
66 void on_actionSaveAudio_triggered();
67 void on_actionSaveForwardAudio_triggered();
68 void on_actionSaveReverseAudio_triggered();
69 void on_actionSaveCsv_triggered();
70 void on_actionSaveForwardCsv_triggered();
71 void on_actionSaveReverseCsv_triggered();
72 void on_actionSaveGraph_triggered();
73 void on_buttonBox_helpRequested();
74 void showStreamMenu(QPoint pos);
75 void showGraphMenu(const QPoint &pos);
76 void graphClicked(QMouseEvent *event);
77
78private:
79 Ui::Iax2AnalysisDialog *ui;
80 enum StreamDirection { dir_both_, dir_forward_, dir_reverse_ };
81
82 rtpstream_id_t fwd_id_;
83 rtpstream_id_t rev_id_;
84
85 tap_iax2_stat_t fwd_statinfo_;
86 tap_iax2_stat_t rev_statinfo_;
87
88 QTemporaryFile *fwd_tempfile_;
89 QTemporaryFile *rev_tempfile_;
90
91 // Graph data for QCustomPlot
92 QList<QCPGraph *>graphs_;
93 QVector<double> fwd_time_vals_;
94 QVector<double> fwd_jitter_vals_;
95 QVector<double> fwd_diff_vals_;
96
97 QVector<double> rev_time_vals_;
98 QVector<double> rev_jitter_vals_;
99 QVector<double> rev_diff_vals_;
100
101 QString err_str_;
102 iax2_error_type_t save_payload_error_;
103
104 QMenu stream_ctx_menu_;
105 QMenu graph_ctx_menu_;
106
107 // Tap callbacks
108 static void tapReset(void *tapinfo_ptr);
109 static tap_packet_status tapPacket(void *tapinfo_ptr, packet_info *pinfo, struct epan_dissect *, const void *iax2info_ptr, tap_flags_t flags);
110 static void tapDraw(void *tapinfo_ptr);
111
112 void resetStatistics();
113 void addPacket(bool forward, packet_info *pinfo, const struct _iax2_info_t *iax2info);
114 void savePayload(QTemporaryFile *tmpfile, packet_info *pinfo, const struct _iax2_info_t *iax2info);
115 void updateStatistics();
116 void updateGraph();
117
118 void saveAudio(StreamDirection direction);
119 void saveCsv(StreamDirection direction);
120
121#if 0
122 uint32_t processNode(proto_node *ptree_node, header_field_info *hfinformation, const char* proto_field, bool *ok);
123 uint32_t getIntFromProtoTree(proto_tree *protocol_tree, const char *proto_name, const char *proto_field, bool *ok);
124#endif
125
126 bool eventFilter(QObject*, QEvent* event);
127};
128
129#endif // IAX2_ANALYSIS_DIALOG_H
Definition capture_file.h:21
Definition iax2_analysis_dialog.h:46
Definition wireshark_dialog.h:35
Definition proto.h:764
Definition packet-iax2.h:229
Definition packet_info.h:43
Definition proto.h:899
Definition rtp_stream_id.h:33
Definition tap-iax2-analysis.h:44
Definition epan_dissect.h:28
tap_packet_status
Definition tap.h:25