Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
profile_switcher.h
Go to the documentation of this file.
1
9
10#pragma once
11
12#include <config.h>
13
14#include "capture_event.h"
15#include <epan/cfile.h>
16
17#include <QObject>
18#include <QVector>
19
25 QString name;
26 dfilter_t *dfcode;
27};
28
29
30class PacketListModel;
31
32
37class ProfileSwitcher : public QObject
38{
39 Q_OBJECT
40public:
45 explicit ProfileSwitcher(QObject *parent = nullptr);
46
47public slots:
54
62 void checkPacket(capture_file *cap_file, frame_data *fdata, qsizetype row);
63
64private:
65 QVector<struct profile_switch_filter> profile_filters_;
66 bool capture_file_changed_;
67 bool profile_changed_;
68 QString previous_cap_file_;
69
73 void clearProfileFilters();
74
75private slots:
80 void disableSwitching();
81};
struct _capture_file capture_file
Represents a capture file and its associated metadata.
Represents an event occurring during a capture or file operation.
Definition capture_event.h:24
A Qt item model representing the list of packets in a capture file.
Definition packet_list_model.h:36
void checkPacket(capture_file *cap_file, frame_data *fdata, qsizetype row)
Evaluates a single packet against all registered profile filters and switches the active profile if a...
Definition profile_switcher.cpp:69
void captureEventHandler(CaptureEvent ev)
Handles capture lifecycle events (e.g. file open/close, capture start/stop) and updates internal stat...
Definition profile_switcher.cpp:41
ProfileSwitcher(QObject *parent=nullptr)
Constructs a ProfileSwitcher with no active filters.
Definition profile_switcher.cpp:33
DIAG_OFF_PEDANTIC struct _frame_data frame_data
Frame data structure.
Associates a configuration profile name with a compiled display-filter program used to trigger an aut...
Definition profile_switcher.h:24
dfilter_t * dfcode
Definition profile_switcher.h:26
QString name
Definition profile_switcher.h:25