| 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
24 struct profile_switch_filter {
25 QString name;
26 dfilter_t *dfcode;
27};
28
29
30 class PacketListModel;
31
32
37 class ProfileSwitcher : public QObject
38{
39 Q_OBJECT
40 public:
45 explicit ProfileSwitcher(QObject *parent = nullptr);
46
47 public slots:
53 void captureEventHandler(CaptureEvent ev);
54
62 void checkPacket(capture_file *cap_file, frame_data *fdata, qsizetype row);
63
64 private:
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
75 private slots:
80 void disableSwitching();
81};
capture_event.h
cfile.h
capture_file
struct _capture_file capture_file
Represents a capture file and its associated metadata.
CaptureEvent
Represents an event occurring during a capture or file operation.
Definition capture_event.h:24
PacketListModel
A Qt item model representing the list of packets in a capture file.
Definition packet_list_model.h:36
ProfileSwitcher::checkPacket
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
ProfileSwitcher::captureEventHandler
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::ProfileSwitcher
ProfileSwitcher(QObject *parent=nullptr)
Constructs a ProfileSwitcher with no active filters.
Definition profile_switcher.cpp:33
frame_data
DIAG_OFF_PEDANTIC struct _frame_data frame_data
Frame data structure.
profile_switch_filter
Associates a configuration profile name with a compiled display-filter program used to trigger an aut...
Definition profile_switcher.h:24
profile_switch_filter::dfcode
dfilter_t * dfcode
Definition profile_switcher.h:26
profile_switch_filter::name
QString name
Definition profile_switcher.h:25