Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

wireless_timeline.h
1 /* wireless_timeline.h
2 * GUI to show an 802.11 wireless timeline of packets
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * Copyright 2012 Parc Inc and Samsung Electronics
9 * Copyright 2015, 2016 & 2017 Cisco Inc
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 */
13
14 #include <QScrollArea>
15
16 #ifndef WIRELESSTIMELINE_H
17 #define WIRELESSTIMELINE_H
18
19 #include <stdio.h>
20
21 #include <config.h>
22
23 #include <glib.h>
24
25 #include "file.h"
26
27 #include "ui/ws_ui_util.h"
28
29 #include <epan/prefs.h>
30 #include <epan/plugin_if.h>
31 #include <epan/timestamp.h>
32
33 #include <epan/dissectors/packet-ieee80211-radio.h>
34
35 #include <QScrollArea>
36
37 #include "cfile.h"
38
39 /* pixels height for rendered timeline */
40 #define TIMELINE_HEIGHT 64
41
42 /* Maximum zoom levels for the timeline */
43 #define TIMELINE_MAX_ZOOM 25.0
44
45 class WirelessTimeline;
46 class PacketList;
47
48 class WirelessTimeline : public QWidget
49 {
50 Q_OBJECT
51
52 public:
53 explicit WirelessTimeline(QWidget *parent);
54 void setPacketList(PacketList *packet_list);
55 void captureFileReadStarted(capture_file *cf);
56 void captureFileReadFinished();
57
58 protected:
59 void resizeEvent(QResizeEvent *event);
60 void paintEvent(QPaintEvent *event);
61 void mousePressEvent (QMouseEvent *event);
62 void mouseMoveEvent (QMouseEvent *event);
63 void mouseReleaseEvent (QMouseEvent *event);
64 bool event(QEvent *event);
65 void wheelEvent(QWheelEvent *event);
66
67 public slots:
68 void bgColorizationProgress(int first, int last);
69 void selectedFrameChanged(int frameNum);
70 void appInitialized();
71
72 protected:
73 static void tap_timeline_reset(void* tapdata);
74 static gboolean tap_timeline_packet(void *tapdata, packet_info* pinfo, epan_dissect_t* edt, const void *data);
75
76 struct wlan_radio* get_wlan_radio(guint32 packet_num);
77
78 void clip_tsf();
79 int position(guint64 tsf, float ratio);
80 int find_packet_tsf(guint64 tsf);
81 void doToolTip(struct wlan_radio *wr, QPoint pos, int x);
82 void zoom(double x_fraction);
83 double zoom_level;
84 qreal start_x, last_x;
85 PacketList *packet_list;
86 guint find_packet(qreal x);
87 float rgb[TIMELINE_HEIGHT][3];
88
89 guint64 start_tsf;
90 guint64 end_tsf;
91 int first_packet; /* first packet displayed */
92 struct wlan_radio *first, *last;
93 capture_file *capfile;
94
95 GHashTable* radio_packet_list;
96 };
97
98 #endif // WIRELESS_TIMELINE_H
99
100 /*
101 * Editor modelines
102 *
103 * Local Variables:
104 * c-basic-offset: 4
105 * tab-width: 8
106 * indent-tabs-mode: nil
107 * End:
108 *
109 * ex: set shiftwidth=4 tabstop=8 expandtab:
110 * :indentSize=4:tabSize=8:noTabs=true:
111 */
PacketList
Definition: packet_list.h:30
_packet_info
Definition: packet_info.h:44
wlan_radio
Definition: packet-ieee80211-radio.h:28
WirelessTimeline
Definition: wireless_timeline.h:48
epan_dissect
Definition: epan_dissect.h:28
_capture_file
Definition: cfile.h:58