diff options
Diffstat (limited to 'main/session.h')
| -rw-r--r-- | main/session.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/session.h b/main/session.h index 8e2d48d..6282f5a 100644 --- a/main/session.h +++ b/main/session.h | |||
| @@ -13,6 +13,8 @@ typedef struct { | |||
| 13 | char mac[SESSION_MAX_MAC_LEN]; | 13 | char mac[SESSION_MAX_MAC_LEN]; |
| 14 | uint64_t allotment_ms; | 14 | uint64_t allotment_ms; |
| 15 | int64_t start_time_ms; | 15 | int64_t start_time_ms; |
| 16 | uint64_t allotment_bytes; | ||
| 17 | uint64_t bytes_consumed; | ||
| 16 | bool active; | 18 | bool active; |
| 17 | char spent_secrets[5][65]; | 19 | char spent_secrets[5][65]; |
| 18 | int spent_secret_count; | 20 | int spent_secret_count; |
| @@ -23,6 +25,11 @@ esp_err_t session_manager_init(void); | |||
| 23 | session_t *session_create(uint32_t client_ip, uint64_t allotment_ms, | 25 | session_t *session_create(uint32_t client_ip, uint64_t allotment_ms, |
| 24 | const char *spent_secrets[], int secret_count); | 26 | const char *spent_secrets[], int secret_count); |
| 25 | 27 | ||
| 28 | session_t *session_create_bytes(uint32_t client_ip, uint64_t allotment_bytes, | ||
| 29 | const char *spent_secrets[], int secret_count); | ||
| 30 | |||
| 31 | void session_add_bytes(uint32_t client_ip, uint64_t bytes); | ||
| 32 | |||
| 26 | session_t *session_find_by_ip(uint32_t client_ip); | 33 | session_t *session_find_by_ip(uint32_t client_ip); |
| 27 | session_t *session_find_by_mac(const char *mac); | 34 | session_t *session_find_by_mac(const char *mac); |
| 28 | 35 | ||