This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
esp-firewall/SourceCode/arduino/lib/Firewall/esp32Firewall.hpp

32 lines
786 B
C++
Raw Normal View History

2022-04-19 21:26:43 +02:00
#ifndef ESP32_FIREWALL_HPP
#define ESP32_FIREWALL_HPP
2022-04-10 20:46:54 +02:00
2022-04-19 21:15:55 +02:00
#include "FirewallTypes.h"
#include "esp32Storage.hpp"
#include "WString.h"
2022-04-18 17:35:52 +02:00
2022-04-20 13:08:12 +02:00
namespace firewall
2022-04-10 20:46:54 +02:00
{
class Firewall : public Storage
2022-04-20 13:08:12 +02:00
{
protected:
uint8_t amount_of_rules = 0;
struct firewall_rule *head = NULL;
void add_rule_to_firewall(firewall_rule_t *);
firewall_rule_t *get_rule_from_firewall(uint8_t);
bool delete_rule_from_firewall(uint8_t);
String protocol_to_string(firewall_protocol_t &protocol);
firewall_protocol_t string_to_protocol(std::string &protocol);
String target_to_string(firewall_target_t &target);
firewall_target_t string_to_target(std::string &target);
2022-04-20 13:08:12 +02:00
public:
Firewall();
~Firewall();
2022-04-20 13:08:12 +02:00
};
}
2022-04-10 20:46:54 +02:00
#endif