ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::socket::Ipv4Allow Class Reference

IPv4 peers that may connect. An empty list allows every peer. More...

#include <ipv4_allow.h>

Public Member Functions

void set (const Ipv4AllowEntry *entries, size_t count)
 
bool allows (const struct sockaddr *peer) const
 A v4 mapped IPv6 peer is unwrapped; any other family fails a non empty list.
 
bool allows (uint32_t addr) const
 addr is network byte order, as it sits in a sockaddr_in.
 
size_t size () const
 
Ipv4AllowEntry entry (size_t i) const
 A copy of entry i, read from flash.
 

Detailed Description

IPv4 peers that may connect. An empty list allows every peer.

Definition at line 20 of file ipv4_allow.h.

Member Function Documentation

◆ 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

addr is network byte order, as it sits in a sockaddr_in.

Definition at line 37 of file ipv4_allow.h.

◆ entry()

Ipv4AllowEntry esphome::socket::Ipv4Allow::entry ( size_t i) const
inline

A copy of entry i, read from flash.

Definition at line 52 of file ipv4_allow.h.

◆ set()

void esphome::socket::Ipv4Allow::set ( const Ipv4AllowEntry * entries,
size_t count )
inline

Definition at line 22 of file ipv4_allow.h.

◆ size()

size_t esphome::socket::Ipv4Allow::size ( ) const
inline

Definition at line 50 of file ipv4_allow.h.


The documentation for this class was generated from the following file: