Wireshark  4.3.0
The Wireshark network protocol analyzer
wireless_timeline.h
Go to the documentation of this file.
1 
15 #include <QScrollArea>
16 
17 #ifndef WIRELESSTIMELINE_H
18 #define WIRELESSTIMELINE_H
19 
20 #include <stdio.h>
21 
22 #include <config.h>
23 
24 #include <glib.h>
25 
26 #include "file.h"
27 
28 #include "ui/ws_ui_util.h"
29 
30 #include <epan/prefs.h>
31 #include <epan/plugin_if.h>
32 #include <epan/tap.h>
33 #include <epan/timestamp.h>
34 
35 #include <epan/dissectors/packet-ieee80211-radio.h>
36 
37 #include <QScrollArea>
38 
39 #include "cfile.h"
40 
41 /* pixels height for rendered timeline */
42 #define TIMELINE_HEIGHT 64
43 
44 /* Maximum zoom levels for the timeline */
45 #define TIMELINE_MAX_ZOOM 25.0
46 
47 class WirelessTimeline;
48 class PacketList;
49 
50 class WirelessTimeline : public QWidget
51 {
52  Q_OBJECT
53 
54 public:
55  explicit WirelessTimeline(QWidget *parent);
57  void setPacketList(PacketList *packet_list);
58  void captureFileReadStarted(capture_file *cf);
59  void captureFileReadFinished();
60 
61 protected:
62  void resizeEvent(QResizeEvent *event);
63  void paintEvent(QPaintEvent *event);
64  void mousePressEvent (QMouseEvent *event);
65  void mouseMoveEvent (QMouseEvent *event);
66  void mouseReleaseEvent (QMouseEvent *event);
67  bool event(QEvent *event);
68  void wheelEvent(QWheelEvent *event);
69 
70 public slots:
71  void bgColorizationProgress(int first, int last);
72  void appInitialized();
73 
74 protected:
75  static void tap_timeline_reset(void* tapdata);
76  static tap_packet_status tap_timeline_packet(void *tapdata, packet_info* pinfo, epan_dissect_t* edt, const void *data, tap_flags_t flags);
77 
78  struct wlan_radio* get_wlan_radio(guint32 packet_num);
79 
80  void clip_tsf();
81  int position(guint64 tsf, float ratio);
82  int find_packet_tsf(guint64 tsf);
83  void doToolTip(struct wlan_radio *wr, QPoint pos, int x);
84  void zoom(double x_fraction);
85  double zoom_level;
86  qreal start_x, last_x;
87  PacketList *packet_list;
88  guint find_packet(qreal x);
89  float rgb[TIMELINE_HEIGHT][3];
90 
91  guint64 start_tsf;
92  guint64 end_tsf;
93  int first_packet; /* first packet displayed */
94  struct wlan_radio *first, *last;
95  capture_file *capfile;
96 
97  GHashTable* radio_packet_list;
98 
99 protected slots:
100  void selectedFrameChanged(QList<int>);
101 };
102 
103 #endif // WIRELESS_TIMELINE_H
Definition: packet_list.h:39
Definition: wireless_timeline.h:51
Definition: cfile.h:67
Definition: packet_info.h:44
Definition: epan_dissect.h:28
Definition: packet-ieee80211-radio.h:28
tap_packet_status
Definition: tap.h:25