The Firewall will handle Firewall rules as linked list.
More...
#include <Firewall.hpp>
|
| Firewall () |
| Construct a new Firewall object, retrieve current amount of firewall rules and restore them from Storage.
|
|
| ~Firewall () |
| Destroy the Firewall object.
|
|
firewall_rule_t * | get_rule_head () |
| Get the current rule head, it indicates the first rule position of the linked list. More...
|
|
void | add_rule_to_firewall (firewall_rule_t *rule_ptr, const bool save_in_eeprom=true) |
| add a new rule to the linked list, update amount of rules, store it in Storage if save_in_eeprom is true More...
|
|
firewall_rule_t * | add_rule_to_firewall (String *args) |
| add a new rule to the firewall, providing request parameter More...
|
|
firewall_rule_t * | update_rule_of_firewall (String *args, const uint8_t key) |
| update rule of firewall, store it in Storage More...
|
|
firewall_rule_t * | get_rule_from_firewall (const uint8_t key) |
| retrieve rule from the firewall linked list More...
|
|
ok_t | delete_rule_from_firewall (const uint8_t key) |
| delete rule from the firewall linked list, update amount of rules, store new order of rules in Storage More...
|
|
bool | is_packet_allowed (struct pbuf *pbuf) |
| checks if network packet is allowed to pass firewall More...
|
|
| Storage () |
| Construct a new Storage object.
|
|
| ~Storage () |
| Destroy the Storage object.
|
|
The Firewall will handle Firewall rules as linked list.
◆ add_rule_to_firewall() [1/2]
void fw::Firewall::add_rule_to_firewall |
( |
firewall_rule_t * |
rule_ptr, |
|
|
const bool |
save_in_eeprom = true |
|
) |
| |
add a new rule to the linked list, update amount of rules, store it in Storage if save_in_eeprom is true
- Parameters
-
◆ add_rule_to_firewall() [2/2]
add a new rule to the firewall, providing request parameter
- Parameters
-
- Returns
- firewall_rule_t*
◆ delete_rule_from_firewall()
ok_t fw::Firewall::delete_rule_from_firewall |
( |
const uint8_t |
key | ) |
|
delete rule from the firewall linked list, update amount of rules, store new order of rules in Storage
- Parameters
-
- Returns
- ok_t
◆ get_packet_information()
my_packet_t * fw::Firewall::get_packet_information |
( |
struct pbuf * |
pbuf | ) |
|
|
protected |
prepares the necessary information to check packet
- Parameters
-
- Returns
- my_packet_t*
◆ get_rule_from_firewall()
firewall_rule_t * fw::Firewall::get_rule_from_firewall |
( |
const uint8_t |
key | ) |
|
retrieve rule from the firewall linked list
- Parameters
-
- Returns
- firewall_rule_t*
◆ get_rule_head()
Get the current rule head, it indicates the first rule position of the linked list.
- Returns
- firewall_rule_t*
◆ is_packet_allowed()
bool fw::Firewall::is_packet_allowed |
( |
struct pbuf * |
pbuf | ) |
|
checks if network packet is allowed to pass firewall
- Parameters
-
- Returns
- true
-
false
◆ rule_allows_packet()
checks if network packet is allowed by the rule
- Parameters
-
- Returns
- true
-
false
◆ update_rule_of_firewall()
firewall_rule_t * fw::Firewall::update_rule_of_firewall |
( |
String * |
args, |
|
|
const uint8_t |
key |
|
) |
| |
update rule of firewall, store it in Storage
- Parameters
-
- Returns
- firewall_rule_t*
The documentation for this class was generated from the following files: