Wireshark  4.3.0
The Wireshark network protocol analyzer
sequence_dialog.h
Go to the documentation of this file.
1 
10 #ifndef SEQUENCE_DIALOG_H
11 #define SEQUENCE_DIALOG_H
12 
13 #include <config.h>
14 
15 #include "cfile.h"
16 
17 #include "epan/packet.h"
18 #include "epan/sequence_analysis.h"
19 
20 #include <ui/qt/widgets/qcustomplot.h>
21 #include "wireshark_dialog.h"
22 #include "rtp_stream_dialog.h"
23 
24 #include <QMenu>
25 
26 namespace Ui {
27 class SequenceDialog;
28 }
29 
30 class SequenceDiagram;
31 
33 {
34 public:
35  SequenceInfo(seq_analysis_info_t *sainfo = NULL);
36  seq_analysis_info_t * sainfo() { return sainfo_;}
37  void ref() { count_++; }
38  void unref() { if (--count_ == 0) delete this; }
39 private:
40  ~SequenceInfo();
41  seq_analysis_info_t *sainfo_;
42  unsigned int count_;
43 };
44 
46 {
47  Q_OBJECT
48 
49 public:
50  explicit SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *info = NULL, bool voipFeatures = false);
51  ~SequenceDialog();
52 
53 protected:
54  bool event(QEvent *event);
55  void showEvent(QShowEvent *event);
56  void resizeEvent(QResizeEvent *event);
57  void keyPressEvent(QKeyEvent *event);
58 
59 signals:
60  void rtpStreamsDialogSelectRtpStreams(QVector<rtpstream_id_t *> stream_infos);
61  void rtpStreamsDialogDeselectRtpStreams(QVector<rtpstream_id_t *> stream_infos);
62  void rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
63  void rtpPlayerDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
64  void rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
65 
66 private slots:
67  void updateWidgets();
68  void hScrollBarChanged(int value);
69  void vScrollBarChanged(int value);
70  void xAxisChanged(QCPRange range);
71  void yAxisChanged(QCPRange range);
72  void showContextMenu(const QPoint &pos);
73  void diagramClicked(QMouseEvent *event);
74  void mouseMoved(QMouseEvent *event);
75  void mouseWheeled(QWheelEvent *event);
76 
77  void fillDiagram();
78  void resetView();
79  void exportDiagram();
80  void layoutAxisLabels();
81 
82  void addressChanged(int index);
83  void displayFilterCheckBoxToggled(bool checked);
84 
85  void on_buttonBox_clicked(QAbstractButton *button);
86  void on_actionGoToPacket_triggered();
87  void on_actionGoToNextPacket_triggered() { goToAdjacentPacket(true); }
88  void on_actionGoToPreviousPacket_triggered() { goToAdjacentPacket(false); }
89  void on_flowComboBox_activated(int index);
90  void on_actionMoveRight10_triggered();
91  void on_actionMoveLeft10_triggered();
92  void on_actionMoveUp10_triggered();
93  void on_actionMoveDown10_triggered();
94  void on_actionMoveRight1_triggered();
95  void on_actionMoveLeft1_triggered();
96  void on_actionMoveUp1_triggered();
97  void on_actionMoveDown1_triggered();
98  void on_actionZoomIn_triggered();
99  void on_actionZoomOut_triggered();
100  void on_actionSelectRtpStreams_triggered();
101  void on_actionDeselectRtpStreams_triggered();
102  void on_buttonBox_helpRequested();
103 
104  void rtpPlayerReplace();
105  void rtpPlayerAdd();
106  void rtpPlayerRemove();
107 
108 private:
109  Ui::SequenceDialog *ui;
110  SequenceDiagram *seq_diagram_;
111  SequenceInfo *info_;
112  int num_items_;
113  uint32_t packet_num_;
114  double one_em_;
115  int sequence_w_;
116  QPushButton *reset_button_;
117  QToolButton *player_button_;
118  QPushButton *export_button_;
119  QMenu ctx_menu_;
120  QCPItemText *key_text_;
121  QCPItemText *comment_text_;
122  seq_analysis_item_t *current_rtp_sai_selected_; // Used for passing current sai to rtp processing
123  seq_analysis_item_t *current_rtp_sai_hovered_; // Used for passing current sai to rtp processing
124  QPointer<RtpStreamDialog> rtp_stream_dialog_; // Singleton pattern used
125  bool voipFeaturesEnabled;
126 
127  void enableVoIPFeatures();
128  void zoomXAxis(bool in);
129  void panAxes(int x_pixels, int y_pixels);
130  void resetAxes(bool keep_lower = false);
131  void goToAdjacentPacket(bool next);
132 
133  static bool addFlowSequenceItem(const void *key, void *value, void *userdata);
134 
135  void processRtpStream(bool select);
136  QVector<rtpstream_id_t *>getSelectedRtpIds();
137 };
138 
139 #endif // SEQUENCE_DIALOG_H
Definition: capture_file.h:21
Definition: sequence_diagram.h:37
Definition: sequence_dialog.h:46
Definition: sequence_dialog.h:33
Definition: wireshark_dialog.h:35
Definition: sequence_analysis.h:66
Definition: sequence_analysis.h:44
Definition: file-pcapng.h:57