rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Toggle main menu visibility
Loading...
Searching...
No Matches
wifi_req.h
Go to the documentation of this file.
1
8
9
#ifndef RCBENCH_WIFI_REQ_H
10
#define RCBENCH_WIFI_REQ_H
11
12
#include <stdbool.h>
13
#include <stddef.h>
14
15
#include "esp_err.h"
16
#include "esp_http_server.h"
17
#include "
wa_guard.h
"
18
20
typedef
struct
{
21
char
host
[64];
22
char
origin
[64];
23
char
referer
[128];
24
char
upload
[8];
25
}
wifi_req_bufs_t
;
26
36
const
char
*
wifi_req_hdr
(httpd_req_t *r,
const
char
*key,
char
*out,
37
size_t
cap);
38
56
bool
wifi_req_guard
(httpd_req_t *r,
wa_req_kind_t
kind,
const
char
*name,
57
wifi_req_bufs_t
*bufs, esp_err_t *e);
58
59
#endif
/* RCBENCH_WIFI_REQ_H */
wifi_req_bufs_t
Where wifi_req_guard() reads a request's headers into.
Definition
wifi_req.h:20
wifi_req_bufs_t::referer
char referer[128]
Definition
wifi_req.h:23
wifi_req_bufs_t::origin
char origin[64]
Definition
wifi_req.h:22
wifi_req_bufs_t::host
char host[64]
Definition
wifi_req.h:21
wifi_req_bufs_t::upload
char upload[8]
Definition
wifi_req.h:24
wa_guard.h
Which requests the Wi-Fi page answers at all: the Host header, the Origin or Referer of a write,...
wa_req_kind_t
wa_req_kind_t
What the request is to the guard.
Definition
wa_guard.h:58
wifi_req_guard
bool wifi_req_guard(httpd_req_t *r, wa_req_kind_t kind, const char *name, wifi_req_bufs_t *bufs, esp_err_t *e)
wa_guard() over r: the Host, the body's size, a write's Origin or Referer and the upload's header.
Definition
wifi_req.c:69
wifi_req_hdr
const char * wifi_req_hdr(httpd_req_t *r, const char *key, char *out, size_t cap)
Header key of r into out.
Definition
wifi_req.c:20
firmware
panel
components
wifi_access
wifi_req.h
Generated by
1.18.0