Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
imsi_list_dialog.h
Go to the documentation of this file.
1
9
10#ifndef IMSI_LIST_DIALOG_H
11#define IMSI_LIST_DIALOG_H
12
13#include <config.h>
14
15#include <epan/cfile.h>
16#include <epan/packet.h>
17#include <epan/tap.h>
18#include <epan/dissectors/packet-e212.h>
19
20#include "wireshark_dialog.h"
21
22#include <QAbstractButton>
23#include <QPushButton>
24#include <QStandardItemModel>
25
26namespace Ui {
27class ImsiListDialog;
28}
29
33struct ImsiEntry {
34 QString imsi;
35 uint32_t packet_count;
36 uint32_t first_frame;
37 uint32_t last_frame;
38 QStringList protocols;
39 QSet<uint32_t> seen_frames;
40};
41
45class ImsiListDialog : public WiresharkDialog
46{
47 Q_OBJECT
48
49public:
50 explicit ImsiListDialog(QWidget &parent, CaptureFile &cf);
51 ~ImsiListDialog();
52
53signals:
54 void updateFilter(QString filter, bool force = false);
55 void goToPacket(int packet_num);
56
57protected:
58 void captureFileClosing() override;
59
60private slots:
61 void updateWidgets() override;
62 void prepareFilter();
63 void onImsiDoubleClicked(const QModelIndex &index);
64 void on_buttonBox_clicked(QAbstractButton *button);
65 void displayFilterCheckBoxToggled(bool checked);
66
67private:
68 Ui::ImsiListDialog *ui;
69 QWidget &parent_;
70
71 QPushButton *prepare_button_;
72
73 QStandardItemModel *model_;
74
76 QHash<QString, ImsiEntry*> imsi_entries_;
77
78 // Tap callbacks
79 static void tapReset(void *tapdata);
80 static tap_packet_status tapPacket(void *tapdata, packet_info *pinfo,
81 epan_dissect_t *edt, const void *data,
82 tap_flags_t flags);
83 static void tapDraw(void *tapdata);
84
85 void resetData();
86 void updateModel();
87};
88
89#endif // IMSI_LIST_DIALOG_H
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
void captureFileClosing() override
Called when the capture file is about to close. This can be used to disconnect taps and similar actio...
Definition imsi_list_dialog.cpp:80
virtual void updateWidgets()
Updates the state and contents of the dialog's widgets.
Definition wireshark_dialog.cpp:92
WiresharkDialog(QWidget &parent, CaptureFile &capture_file)
Constructs a new WiresharkDialog object.
Definition wireshark_dialog.cpp:30
struct epan_dissect epan_dissect_t
Opaque type representing a single packet dissection context.
Definition epan.h:62
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
Entry for a single IMSI discovered in the capture.
Definition imsi_list_dialog.h:33
QSet< uint32_t > seen_frames
Definition imsi_list_dialog.h:39
tap_packet_status
Definition tap.h:22