| 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
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
37 typedef 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
45 class Iax2AnalysisDialog : public WiresharkDialog
46{
47 Q_OBJECT
48
49 public:
50 explicit Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf);
51 ~Iax2AnalysisDialog();
52
53signals:
54 void goToPacket(int packet_num);
55
56 protected slots:
57 virtual void updateWidgets();
58
59 private 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
78 private:
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
address.h
CaptureFile
Definition capture_file.h:21
Iax2AnalysisDialog
Definition iax2_analysis_dialog.h:46
WiresharkDialog
Definition wireshark_dialog.h:35
rtp_stream_id.h
_header_field_info
Definition proto.h:767
_iax2_info_t
Definition packet-iax2.h:294
_packet_info
Definition packet_info.h:43
_proto_node
Definition proto.h:907
_rtpstream_id
Definition rtp_stream_id.h:33
_tap_iax2_stat_t
Definition tap-iax2-analysis.h:44
epan_dissect
Definition epan_dissect.h:28
tap-iax2-analysis.h
tap_packet_status
tap_packet_status
Definition tap.h:25
wireshark_dialog.h