Wireshark  4.3.0
The Wireshark network protocol analyzer
sctp_graph_dialog.h
Go to the documentation of this file.
1 
10 #ifndef SCTP_GRAPH_DIALOG_H
11 #define SCTP_GRAPH_DIALOG_H
12 
13 #include <config.h>
14 #include <glib.h>
15 
16 #include "cfile.h"
17 
18 #include <QDialog>
19 
20 namespace Ui {
21 class SCTPGraphDialog;
22 }
23 
24 class QCPAbstractPlottable;
25 class QCustomPlot;
26 
27 struct _sctp_assoc_info;
28 
29 struct chunk_header {
30  guint8 type;
31  guint8 flags;
32  guint16 length;
33 };
34 
36  guint8 type;
37  guint8 flags;
38  guint16 length;
39  guint32 tsn;
40  guint16 sid;
41  guint16 ssn;
42  guint32 ppi;
43 };
44 
45 struct gaps {
46  guint16 start;
47  guint16 end;
48 };
49 
51  guint8 type;
52  guint8 flags;
53  guint16 length;
54  guint32 cum_tsn_ack;
55  guint32 a_rwnd;
56  guint16 nr_of_gaps;
57  guint16 nr_of_dups;
58  struct gaps gaps[1];
59 };
60 
62  guint8 type;
63  guint8 flags;
64  guint16 length;
65  guint32 cum_tsn_ack;
66  guint32 a_rwnd;
67  guint16 nr_of_gaps;
68  guint16 nr_of_nr_gaps;
69  guint16 nr_of_dups;
70  guint16 reserved;
71  struct gaps gaps[1];
72 };
73 
74 
75 class SCTPGraphDialog : public QDialog
76 {
77  Q_OBJECT
78 
79 public:
80  explicit SCTPGraphDialog(QWidget *parent = 0, const _sctp_assoc_info *assoc = NULL,
81  capture_file *cf = NULL, int dir = 0);
82  ~SCTPGraphDialog();
83  static void save_graph(QDialog *dlg, QCustomPlot *plot);
84 
85 public slots:
86  void setCaptureFile(capture_file *cf) { cap_file_ = cf; }
87 
88 private slots:
89  void on_pushButton_clicked();
90 
91  void on_pushButton_2_clicked();
92 
93  void on_pushButton_3_clicked();
94 
95  void on_pushButton_4_clicked();
96 
97  void graphClicked(QCPAbstractPlottable* plottable, int, QMouseEvent* event);
98 
99  void on_saveButton_clicked();
100 
101  void on_relativeTsn_stateChanged(int arg1);
102 
103 private:
104  Ui::SCTPGraphDialog *ui;
105  guint16 selected_assoc_id;
106  capture_file *cap_file_;
107  int frame_num;
108  int direction;
109  QVector<double> xt, yt, xs, ys, xg, yg, xd, yd, xn, yn;
110  QVector<guint32> ft, fs, fg, fd, fn;
111  QVector<QString> typeStrings;
112  bool relative;
113  int type;
114 
115  void drawGraph(const _sctp_assoc_info* selected_assoc = NULL);
116  void drawTSNGraph(const _sctp_assoc_info* selected_assoc);
117  void drawSACKGraph(const _sctp_assoc_info* selected_assoc);
118  void drawNRSACKGraph(const _sctp_assoc_info* selected_assoc);
119 };
120 
121 #endif // SCTP_GRAPH_DIALOG_H
Definition: sctp_graph_dialog.h:76
Definition: cfile.h:67
Definition: tap-sctp-analysis.h:192
Definition: sctp_graph_dialog.h:29
Definition: sctp_graph_dialog.h:35
Definition: sctp_graph_dialog.h:45
Definition: sctp_graph_dialog.h:61
Definition: sctp_graph_dialog.h:50