Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
funnel_statistics.h
Go to the documentation of this file.
1
10#ifndef FUNNELSTATISTICS_H
11#define FUNNELSTATISTICS_H
12
13#include <QObject>
14#include <QAction>
15#include <QSet>
16#include <QPointer>
17
18#include <epan/funnel.h>
19#include "io_console_dialog.h"
20#include "capture_file.h"
21#include <ui/qt/filter_action.h>
22
23struct _funnel_ops_t;
24struct progdlg;
25
29typedef void (* funnel_packet_menu_callback)(void *, GPtrArray*);
30
31class FunnelStatistics : public QObject
32{
33 Q_OBJECT
34public:
35 explicit FunnelStatistics(QObject *parent, CaptureFile &cf);
37 void retapPackets();
38 struct progdlg *progressDialogNew(const char *task_title, const char *item_title, bool terminate_is_stop, bool *stop_flag);
39 const char *displayFilter();
40 void emitSetDisplayFilter(const QString filter);
41 void reloadPackets();
42 void redissectPackets();
43 void reloadLuaPlugins();
44 void emitApplyDisplayFilter();
45 void emitOpenCaptureFile(QString cf_path, QString filter);
46 static const QString &actionName() { return action_name_; }
47
48signals:
49 void openCaptureFile(QString cf_path, QString filter);
50 void setDisplayFilter(QString filter, FilterAction::Action action, FilterAction::ActionType filterType);
51
52public slots:
53 void funnelActionTriggered();
54 void displayFilterTextChanged(const QString &filter);
55
56private:
57 static const QString action_name_;
58 struct _funnel_ops_t *funnel_ops_;
59 struct _funnel_ops_id_t *funnel_ops_id_;
60
61 CaptureFile &capture_file_;
62 QByteArray display_filter_;
63 QString prepared_filter_;
64};
65
66class FunnelAction : public QAction
67{
68 Q_OBJECT
69public:
70 FunnelAction(QObject *parent = nullptr);
71 FunnelAction(QString title, funnel_menu_callback callback, void *callback_data, bool retap, QObject *parent);
72 FunnelAction(QString title, funnel_packet_menu_callback callback, void *callback_data, bool retap, const char *packet_required_fields, QObject *parent);
74 funnel_menu_callback callback() const;
75 QString title() const;
76 virtual void triggerCallback();
77 void setPacketCallback(funnel_packet_menu_callback packet_callback);
78 void setPacketData(GPtrArray* finfos);
79 void addToMenu(QMenu * ctx_menu, QHash<QString, QMenu *> &menuTextToMenus);
80 void setPacketRequiredFields(const char *required_fields_str);
81 const QSet<QString> getPacketRequiredFields();
82 bool retap();
83 QString getPacketSubmenus();
84
85public slots:
86 void triggerPacketCallback();
87
88private:
89 QString title_;
90 QString packetSubmenu_;
91 funnel_menu_callback callback_;
92 void *callback_data_;
93 bool retap_;
94 funnel_packet_menu_callback packetCallback_;
95 GPtrArray* packetData_;
96 QSet<QString> packetRequiredFields_;
97};
98
100{
101 Q_OBJECT
102public:
103 FunnelConsoleAction(QString name, funnel_console_eval_cb_t eval_cb,
106 void *callback_data, QObject *parent);
108 virtual void triggerCallback();
109
110private:
111 QString title_;
115 void *callback_data_;
116 QPointer<IOConsoleDialog> dialog_;
117};
118
119extern "C" {
120 void funnel_statistics_reload_menus(void);
121 void funnel_statistics_load_packet_menus(void);
122 void funnel_statistics_load_console_menus(void);
124} // extern "C"
125
126#endif // FUNNELSTATISTICS_H
Definition capture_file.h:21
Definition funnel_statistics.h:67
Definition funnel_statistics.h:100
Definition funnel_statistics.h:32
void(* funnel_console_open_cb_t)(void(*print_func)(const char *, void *), void *print_data, void *callback_data)
Definition funnel.h:177
int(* funnel_console_eval_cb_t)(const char *console_input, char **error_ptr, char **error_hint, void *callback_data)
Definition funnel.h:169
void(* funnel_console_close_cb_t)(void *callback_data)
Definition funnel.h:182
void(* funnel_packet_menu_callback)(void *, GPtrArray *)
Definition funnel_statistics.h:29
bool funnel_statistics_packet_menus_modified(void)
Definition funnel_statistics.cpp:568
Definition funnel_statistics.cpp:249
Definition funnel.h:46
Definition progress_frame.h:31