2013-10-24 22:52:30 +00:00
|
|
|
/* sequence_dialog.h
|
|
|
|
*
|
|
|
|
* 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();
|
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:
|
|
|
|
void selectRtpStream(rtpstream_id_t *id);
|
|
|
|
void deselectRtpStream(rtpstream_id_t *id);
|
|
|
|
void openRtpStreamDialog();
|
|
|
|
|
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();
|
2015-11-17 01:13:23 +00:00
|
|
|
|
2013-11-12 01:08:08 +00:00
|
|
|
void on_buttonBox_accepted();
|
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();
|
2020-12-30 08:51:00 +00:00
|
|
|
void on_actionSelectRtpStream_triggered();
|
|
|
|
void on_actionDeselectRtpStream_triggered();
|
2013-11-11 22:00:48 +00:00
|
|
|
|
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_;
|
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_;
|
2020-12-30 08:51:00 +00:00
|
|
|
seq_analysis_item_t *current_rtp_sai_; // Used for passing current sai to rtp processing
|
|
|
|
QPointer<RtpStreamDialog> rtp_stream_dialog_; // Singleton pattern used
|
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);
|
2013-10-24 22:52:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SEQUENCE_DIALOG_H
|
2013-11-14 17:37:40 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Editor modelines
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* ex: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|