IPv4 peers that may connect. An empty list allows every peer.
More...
#include <ipv4_allow.h>
IPv4 peers that may connect. An empty list allows every peer.
Definition at line 20 of file ipv4_allow.h.
◆ admit()
allows(peer), logging a refused peer at most once every REJECT_LOG_INTERVAL_MS.
Definition at line 11 of file ipv4_allow.cpp.
◆ allows() [1/2]
| bool esphome::socket::Ipv4Allow::allows |
( |
const struct sockaddr * | peer | ) |
const |
|
inline |
A v4 mapped IPv6 peer is unwrapped; any other family fails a non empty list.
Definition at line 28 of file ipv4_allow.h.
◆ allows() [2/2]
| bool esphome::socket::Ipv4Allow::allows |
( |
uint32_t | addr | ) |
const |
|
inline |
◆ dump_config()
| void esphome::socket::Ipv4Allow::dump_config |
( |
const char * | tag | ) |
const |
One config line per allowed network.
Definition at line 24 of file ipv4_allow.cpp.
◆ entry()
A copy of entry i, read from flash.
Definition at line 56 of file ipv4_allow.h.
◆ set()
| void esphome::socket::Ipv4Allow::set |
( |
const Ipv4AllowEntry * | entries, |
|
|
size_t | count ) |
|
inline |
◆ size()
| size_t esphome::socket::Ipv4Allow::size |
( |
| ) |
const |
|
inline |
◆ count_
| size_t esphome::socket::Ipv4Allow::count_ {0} |
|
protected |
◆ entries_
◆ last_reject_log_ms_
| uint32_t esphome::socket::Ipv4Allow::last_reject_log_ms_ {0} |
|
protected |
◆ REJECT_LOG_INTERVAL_MS
| uint32_t esphome::socket::Ipv4Allow::REJECT_LOG_INTERVAL_MS = 5000 |
|
staticconstexprprotected |
The documentation for this class was generated from the following files: