| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
firewall_rules_dialog.h
Go to the documentation of this file.
1
9
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
17 namespace Ui {
18 class FirewallRulesDialog;
19}
20
21 class QAbstractButton;
22
32 typedef void (*syntax_func)(GString *rtxt, char *addr, uint32_t port, port_type ptype, bool inbound, bool deny);
33
37 class FirewallRulesDialog : public WiresharkDialog
38{
39 Q_OBJECT
40
41 public:
47 explicit FirewallRulesDialog(QWidget &parent, CaptureFile &cf);
48
52 ~FirewallRulesDialog();
53
54 private 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
82 private:
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() override;
120
128 void addRule(QString description, syntax_func rule_func, address *addr, uint32_t port);
129};
130
131#endif // FIREWALL_RULES_DIALOG_H
address.h
address
struct _address address
Holds a network or link-layer address of any supported type.
port_type
port_type
Transport-layer port number types recognized by Wireshark.
Definition address.h:425
CaptureFile
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
FirewallRulesDialog::~FirewallRulesDialog
~FirewallRulesDialog()
Destroys the FirewallRulesDialog.
Definition firewall_rules_dialog.cpp:74
FirewallRulesDialog::FirewallRulesDialog
FirewallRulesDialog(QWidget &parent, CaptureFile &cf)
Constructs a new FirewallRulesDialog.
Definition firewall_rules_dialog.cpp:38
WiresharkDialog::updateWidgets
virtual void updateWidgets()
Updates the state and contents of the dialog's widgets.
Definition wireshark_dialog.cpp:92
WiresharkDialog::WiresharkDialog
WiresharkDialog(QWidget &parent, CaptureFile &capture_file)
Constructs a new WiresharkDialog object.
Definition wireshark_dialog.cpp:30
syntax_func
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
wireshark_dialog.h