move credentials into struct

This commit is contained in:
Florian Hoss 2022-04-22 08:46:37 +02:00
parent 6a2b4df655
commit bb1a67c49d
4 changed files with 15 additions and 9 deletions

View file

@ -6,6 +6,7 @@
#include "esp32-hal-log.h"
static const uint8_t IPV4ADDRESS_LENGTH = 16;
static const uint8_t CREDENTIALS_LENGTH = 32;
typedef enum firewall_targets : uint8_t
{
@ -44,6 +45,12 @@ typedef struct firewall_rules
struct firewall_rules *next;
} firewall_rule_t;
typedef struct credentials
{
char password[CREDENTIALS_LENGTH];
char username[CREDENTIALS_LENGTH];
} credential_t;
namespace firewall
{
String protocol_to_string(firewall_protocol_t &protocol);