10#include "lwip/prot/udp.h"
11#include "lwip/prot/tcp.h"
118 uint8_t amount_of_rules = 0;
The Firewall will handle Firewall rules as linked list.
Definition: Firewall.hpp:20
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 Storag...
Definition: Firewall.cpp:88
bool rule_allows_packet(firewall_rule_t *rule_ptr, my_packet_t *packet)
checks if network packet is allowed by the rule
Definition: Firewall.cpp:151
~Firewall()
Destroy the Firewall object.
Definition: Firewall.cpp:15
Firewall()
Construct a new Firewall object, retrieve current amount of firewall rules and restore them from Stor...
Definition: Firewall.cpp:5
my_packet_t * get_packet_information(struct pbuf *pbuf)
prepares the necessary information to check packet
Definition: Firewall.cpp:128
firewall_rule_t * get_rule_from_firewall(const uint8_t key)
retrieve rule from the firewall linked list
Definition: Firewall.cpp:73
bool is_packet_allowed(struct pbuf *pbuf)
checks if network packet is allowed to pass firewall
Definition: Firewall.cpp:166
firewall_rule_t * get_rule_head()
Get the current rule head, it indicates the first rule position of the linked list.
Definition: Firewall.cpp:19
firewall_rule_t * update_rule_of_firewall(String *args, const uint8_t key)
update rule of firewall, store it in Storage
Definition: Firewall.cpp:58
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 t...
Definition: Firewall.cpp:24
The Storage will handle Firewall rules in EEPROM.
Definition: Storage.hpp:18