Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
firewall_rules_dialog.h
Go to the documentation of this file.
1
10#ifndef FIREWALL_RULES_DIALOG_H
11#define FIREWALL_RULES_DIALOG_H
12
13#include "epan/address.h"
14
15#include <wireshark_dialog.h>
16
17namespace Ui {
19}
20
21class QAbstractButton;
22
32typedef void (*syntax_func)(GString *rtxt, char *addr, uint32_t port, port_type ptype, bool inbound, bool deny);
33
38{
39 Q_OBJECT
40
41public:
47 explicit FirewallRulesDialog(QWidget &parent, CaptureFile &cf);
48
53
54private slots:
59 void on_productComboBox_currentIndexChanged(int new_idx);
60
64 void on_inboundCheckBox_toggled(bool);
65
69 void on_denyCheckBox_toggled(bool);
70
74 void on_buttonBox_helpRequested();
75
80 void on_buttonBox_clicked(QAbstractButton *button);
81
82private:
84 Ui::FirewallRulesDialog *ui;
85
87 QString file_name_;
88
90 int packet_num_;
91
93 size_t prod_;
94
96 address dl_src_;
97
99 address dl_dst_;
100
102 address net_src_;
103
105 address net_dst_;
106
108 port_type ptype_;
109
111 uint32_t src_port_;
112
114 uint32_t dst_port_;
115
119 void updateWidgets();
120
128 void addRule(QString description, syntax_func rule_func, address *addr, uint32_t port);
129};
130
131#endif // FIREWALL_RULES_DIALOG_H
port_type
Transport-layer port number types recognized by Wireshark.
Definition address.h:425
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
A dialog for generating and displaying firewall rules based on packet data.
Definition firewall_rules_dialog.h:38
~FirewallRulesDialog()
Destroys the FirewallRulesDialog.
Definition firewall_rules_dialog.cpp:74
Base class for Wireshark specific dialogs that require interaction with a CaptureFile.
Definition wireshark_dialog.h:38
void(* syntax_func)(GString *rtxt, char *addr, uint32_t port, port_type ptype, bool inbound, bool deny)
Pointer to a function used to generate firewall rule syntax.
Definition firewall_rules_dialog.h:32
Holds a network or link-layer address of any supported type.
Definition address.h:62