2021-11-30 13:01:36 +00:00
|
|
|
/** @file
|
2013-10-24 22:52:30 +00:00
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-04-30 07:47:58 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2013-10-24 22:52:30 +00:00
|
|
|
|
|
|
|
#ifndef SEQUENCE_DIALOG_H
|
|
|
|
#define SEQUENCE_DIALOG_H
|
|
|
|
|
2015-04-26 17:21:09 +00:00
|
|
|
#include <config.h>
|
2013-10-24 22:52:30 +00:00
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include "cfile.h"
|
|
|
|
|
|
|
|
#include "epan/packet.h"
|
2017-09-21 15:28:26 +00:00
|
|
|
#include "epan/sequence_analysis.h"
|
2014-11-19 00:21:42 +00:00
|
|
|
|
2017-07-25 14:15:18 +00:00
|
|
|
#include <ui/qt/widgets/qcustomplot.h>
|
2014-12-29 19:42:01 +00:00
|
|
|
#include "wireshark_dialog.h"
|
2020-12-30 08:51:00 +00:00
|
|
|
#include "rtp_stream_dialog.h"
|
2013-10-24 22:52:30 +00:00
|
|
|
|
2013-11-12 01:08:08 +00:00
|
|
|
#include <QMenu>
|
2013-10-24 22:52:30 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class SequenceDialog;
|
|
|
|
}
|
|
|
|
|
2014-11-19 00:21:42 +00:00
|
|
|
class SequenceDiagram;
|
|
|
|
|
2015-11-15 21:57:43 +00:00
|
|
|
class SequenceInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SequenceInfo(seq_analysis_info_t *sainfo = NULL);
|
|
|
|
seq_analysis_info_t * sainfo() { return sainfo_;}
|
|
|
|
void ref() { count_++; }
|
|
|
|
void unref() { if (--count_ == 0) delete this; }
|
|
|
|
private:
|
|
|
|
~SequenceInfo();
|
|
|
|
seq_analysis_info_t *sainfo_;
|
|
|
|
unsigned int count_;
|
|
|
|
};
|
|
|
|
|
2014-12-29 19:42:01 +00:00
|
|
|
class SequenceDialog : public WiresharkDialog
|
2013-10-24 22:52:30 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2014-02-25 20:42:35 +00:00
|
|
|
|
2013-10-24 22:52:30 +00:00
|
|
|
public:
|
2015-11-15 21:57:43 +00:00
|
|
|
explicit SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *info = NULL);
|
2013-10-24 22:52:30 +00:00
|
|
|
~SequenceDialog();
|
2021-03-27 20:01:43 +00:00
|
|
|
void enableVoIPFeatures();
|
2014-02-25 20:42:35 +00:00
|
|
|
|
2013-10-24 22:52:30 +00:00
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *event);
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
2013-11-12 01:08:08 +00:00
|
|
|
void keyPressEvent(QKeyEvent *event);
|
2013-10-24 22:52:30 +00:00
|
|
|
|
2020-12-30 08:51:00 +00:00
|
|
|
signals:
|
2021-04-19 13:54:58 +00:00
|
|
|
void rtpStreamsDialogSelectRtpStreams(QVector<rtpstream_id_t *> stream_infos);
|
|
|
|
void rtpStreamsDialogDeselectRtpStreams(QVector<rtpstream_id_t *> stream_infos);
|
2021-04-22 19:33:11 +00:00
|
|
|
void rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
|
|
|
|
void rtpPlayerDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
|
|
|
|
void rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
|
2020-12-30 08:51:00 +00:00
|
|
|
|
2013-10-24 22:52:30 +00:00
|
|
|
private slots:
|
2014-12-29 19:42:01 +00:00
|
|
|
void updateWidgets();
|
2013-10-25 23:16:56 +00:00
|
|
|
void hScrollBarChanged(int value);
|
|
|
|
void vScrollBarChanged(int value);
|
|
|
|
void xAxisChanged(QCPRange range);
|
|
|
|
void yAxisChanged(QCPRange range);
|
|
|
|
void diagramClicked(QMouseEvent *event);
|
|
|
|
void mouseMoved(QMouseEvent *event);
|
2016-05-25 19:02:40 +00:00
|
|
|
void mouseWheeled(QWheelEvent *event);
|
2013-10-25 23:16:56 +00:00
|
|
|
|
2015-11-17 01:13:23 +00:00
|
|
|
void fillDiagram();
|
2019-08-04 08:47:01 +00:00
|
|
|
void resetView();
|
2021-03-14 10:34:26 +00:00
|
|
|
void exportDiagram();
|
2015-11-17 01:13:23 +00:00
|
|
|
|
2021-03-14 10:34:26 +00:00
|
|
|
void on_buttonBox_clicked(QAbstractButton *button);
|
2013-10-25 23:16:56 +00:00
|
|
|
void on_actionGoToPacket_triggered();
|
2016-05-25 19:02:40 +00:00
|
|
|
void on_actionGoToNextPacket_triggered() { goToAdjacentPacket(true); }
|
|
|
|
void on_actionGoToPreviousPacket_triggered() { goToAdjacentPacket(false); }
|
2017-09-23 01:57:50 +00:00
|
|
|
void on_displayFilterCheckBox_toggled(bool checked);
|
2015-11-17 01:13:23 +00:00
|
|
|
void on_flowComboBox_activated(int index);
|
|
|
|
void on_addressComboBox_activated(int index);
|
2013-11-12 01:08:08 +00:00
|
|
|
void on_actionMoveRight10_triggered();
|
|
|
|
void on_actionMoveLeft10_triggered();
|
|
|
|
void on_actionMoveUp10_triggered();
|
|
|
|
void on_actionMoveDown10_triggered();
|
|
|
|
void on_actionMoveRight1_triggered();
|
|
|
|
void on_actionMoveLeft1_triggered();
|
|
|
|
void on_actionMoveUp1_triggered();
|
|
|
|
void on_actionMoveDown1_triggered();
|
2016-06-05 21:33:06 +00:00
|
|
|
void on_actionZoomIn_triggered();
|
|
|
|
void on_actionZoomOut_triggered();
|
2021-04-19 13:54:58 +00:00
|
|
|
void on_actionSelectRtpStreams_triggered();
|
|
|
|
void on_actionDeselectRtpStreams_triggered();
|
2021-04-09 23:26:17 +00:00
|
|
|
void on_buttonBox_helpRequested();
|
2013-11-11 22:00:48 +00:00
|
|
|
|
2021-03-27 20:01:43 +00:00
|
|
|
void rtpPlayerReplace();
|
|
|
|
void rtpPlayerAdd();
|
|
|
|
void rtpPlayerRemove();
|
|
|
|
|
2013-10-24 22:52:30 +00:00
|
|
|
private:
|
|
|
|
Ui::SequenceDialog *ui;
|
|
|
|
SequenceDiagram *seq_diagram_;
|
2015-11-15 21:57:43 +00:00
|
|
|
SequenceInfo *info_;
|
2013-10-25 23:16:56 +00:00
|
|
|
int num_items_;
|
|
|
|
guint32 packet_num_;
|
2013-10-24 22:52:30 +00:00
|
|
|
double one_em_;
|
2016-05-19 02:21:02 +00:00
|
|
|
int sequence_w_;
|
2021-03-23 10:37:59 +00:00
|
|
|
QPushButton *reset_button_;
|
2021-05-01 22:33:54 +00:00
|
|
|
QToolButton *player_button_;
|
2021-03-14 10:34:26 +00:00
|
|
|
QPushButton *export_button_;
|
2013-11-12 01:08:08 +00:00
|
|
|
QMenu ctx_menu_;
|
2016-05-19 02:21:02 +00:00
|
|
|
QCPItemText *key_text_;
|
|
|
|
QCPItemText *comment_text_;
|
2021-05-09 14:29:11 +00:00
|
|
|
seq_analysis_item_t *current_rtp_sai_selected_; // Used for passing current sai to rtp processing
|
|
|
|
seq_analysis_item_t *current_rtp_sai_hovered_; // Used for passing current sai to rtp processing
|
2020-12-30 08:51:00 +00:00
|
|
|
QPointer<RtpStreamDialog> rtp_stream_dialog_; // Singleton pattern used
|
2021-03-27 20:01:43 +00:00
|
|
|
bool voipFeaturesEnabled;
|
2013-10-24 22:52:30 +00:00
|
|
|
|
2016-06-05 21:33:06 +00:00
|
|
|
void zoomXAxis(bool in);
|
2013-11-12 01:08:08 +00:00
|
|
|
void panAxes(int x_pixels, int y_pixels);
|
2013-10-24 22:52:30 +00:00
|
|
|
void resetAxes(bool keep_lower = false);
|
2016-05-25 19:02:40 +00:00
|
|
|
void goToAdjacentPacket(bool next);
|
2017-09-16 14:52:23 +00:00
|
|
|
|
|
|
|
static gboolean addFlowSequenceItem(const void *key, void *value, void *userdata);
|
2021-03-27 20:01:43 +00:00
|
|
|
|
2021-05-09 14:29:11 +00:00
|
|
|
void processRtpStream(bool select);
|
2021-04-22 19:33:11 +00:00
|
|
|
QVector<rtpstream_id_t *>getSelectedRtpIds();
|
2013-10-24 22:52:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SEQUENCE_DIALOG_H
|