Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
firewall_rules_dialog.h
1 /* firewall_rules_dialog.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
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 {
19 }
20 
21 class QAbstractButton;
22 
23 typedef void (*syntax_func)(GString *rtxt, gchar *addr, guint32 port, port_type ptype, gboolean inbound, gboolean deny);
24 
26 {
27  Q_OBJECT
28 
29 public:
30  explicit FirewallRulesDialog(QWidget &parent, CaptureFile &cf);
32 
33 private slots:
34  void on_productComboBox_currentIndexChanged(int new_idx);
35  void on_inboundCheckBox_toggled(bool);
36  void on_denyCheckBox_toggled(bool);
37  void on_buttonBox_helpRequested();
38 
39  void on_buttonBox_clicked(QAbstractButton *button);
40 
41 private:
43 
44  QString file_name_;
45  int packet_num_;
46 
47  size_t prod_;
48  address dl_src_;
49  address dl_dst_;
50  address net_src_;
51  address net_dst_;
52  port_type ptype_;
53  guint32 src_port_;
54  guint32 dst_port_;
55 
56  void updateWidgets();
57  void addRule(QString description, syntax_func rule_func, address *addr, guint32 port);
58 };
59 
60 #endif // FIREWALL_RULES_DIALOG_H
61 
62 /*
63  * Editor modelines
64  *
65  * Local Variables:
66  * c-basic-offset: 4
67  * tab-width: 8
68  * indent-tabs-mode: nil
69  * End:
70  *
71  * ex: set shiftwidth=4 tabstop=8 expandtab:
72  * :indentSize=4:tabSize=8:noTabs=true:
73  */
Definition: ui_about_dialog.h:291
Definition: ui_firewall_rules_dialog.h:117
Definition: firewall_rules_dialog.h:25
Definition: wireshark_dialog.h:32
Definition: capture_file.h:22
Definition: address.h:47