Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
sctp_graph_dialog.h
1 /* sctp_graph_dialog.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
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 
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, struct _sctp_assoc_info *assoc = NULL, capture_file *cf = NULL, int dir = 0);
81  ~SCTPGraphDialog();
82  static void save_graph(QDialog *dlg, QCustomPlot *plot);
83 
84 public slots:
85  void setCaptureFile(capture_file *cf) { cap_file_ = cf; }
86 
87 private slots:
88  void on_pushButton_clicked();
89 
90  void on_pushButton_2_clicked();
91 
92  void on_pushButton_3_clicked();
93 
94  void on_pushButton_4_clicked();
95 
96  void graphClicked(QCPAbstractPlottable* plottable, QMouseEvent* event);
97 
98  void on_saveButton_clicked();
99 
100 private:
102  struct _sctp_assoc_info *selected_assoc;
103  capture_file *cap_file_;
104  int frame_num;
105  int direction;
106  QVector<double> xt, yt, xs, ys, xg, yg, xd, yd, xn, yn;
107  QVector<guint32> ft, fs, fg, fd, fn;
108  QVector<QString> typeStrings;
109  bool gIsSackChunkPresent;
110  bool gIsNRSackChunkPresent;
111 
112  void drawGraph(int which);
113  void drawTSNGraph();
114  void drawSACKGraph();
115  void drawNRSACKGraph();
116 };
117 
118 #endif // SCTP_GRAPH_DIALOG_H
119 
120 /*
121  * Editor modelines
122  *
123  * Local Variables:
124  * c-basic-offset: 4
125  * tab-width: 8
126  * indent-tabs-mode: nil
127  * End:
128  *
129  * ex: set shiftwidth=4 tabstop=8 expandtab:
130  * :indentSize=4:tabSize=8:noTabs=true:
131  */
Definition: ui_about_dialog.h:291
Definition: sctp_graph_dialog.h:35
Definition: sctp_graph_dialog.h:45
The abstract base class for all data representing objects in a plot.
Definition: qcustomplot.h:1390
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition: qcustomplot.h:1682
Definition: sctp_graph_dialog.h:29
Definition: ui_sctp_graph_dialog.h:146
Definition: sctp_graph_dialog.h:61
Definition: tap-sctp-analysis.h:190
Definition: cfile.h:58
Definition: sctp_graph_dialog.h:75
Definition: sctp_graph_dialog.h:50