ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::network::IPAddress Struct Reference

#include <ip_address.h>

Public Member Functions

 IPAddress ()
 
 IPAddress (uint8_t first, uint8_t second, uint8_t third, uint8_t fourth)
 
 IPAddress (const std::string &in_address)
 
 IPAddress (const struct in6_addr *other_ip)
 
 IPAddress (const struct sockaddr_in6 *addr)
 
 operator struct in6_addr () const
 
bool is_set () const
 
bool is_ip4 () const
 
bool is_ip6 () const
 
bool is_ip4 () const
 
bool is_ip6 () const
 
bool is_multicast () const
 
char * str_to (char *buf) const
 
bool operator== (const IPAddress &other) const
 
bool operator!= (const IPAddress &other) const
 
 IPAddress ()
 
 IPAddress (uint8_t first, uint8_t second, uint8_t third, uint8_t fourth)
 
 IPAddress (const char *in_address)
 
 IPAddress (const std::string &in_address)
 
 IPAddress (const ip_addr_t *other_ip)
 
 IPAddress (ip4_addr_t *other_ip)
 
 IPAddress (ip6_addr_t *other_ip)
 
 operator ip_addr_t () const
 
bool is_set () const
 
bool is_ip4 () const
 
bool is_ip6 () const
 
bool is_multicast () const
 
char * str_to (char *buf) const
 
bool operator== (const IPAddress &other) const
 
bool operator!= (const IPAddress &other) const
 
IPAddress & operator+= (uint8_t increase)
 
 IPAddress ()
 
 IPAddress (uint8_t first, uint8_t second, uint8_t third, uint8_t fourth)
 
 IPAddress (const std::string &in_address)
 
 IPAddress (const ip_addr_t *other_ip)
 
bool is_ip4 () const
 
bool is_ip6 () const
 
char * str_to (char *buf) const
 Write IP address to buffer. Buffer must be at least IP_ADDRESS_BUFFER_SIZE bytes.
 
 IPAddress ()
 
 IPAddress (uint8_t first, uint8_t second, uint8_t third, uint8_t fourth)
 
 IPAddress (const ip_addr_t *other_ip)
 
 IPAddress (const char *in_address)
 
 IPAddress (const std::string &in_address)
 
 IPAddress (ip4_addr_t *other_ip)
 
 IPAddress (const arduino_ns::IPAddress &other_ip)
 
 IPAddress (ip6_addr_t *other_ip)
 
 IPAddress (esp_ip6_addr_t *other_ip)
 
 IPAddress (esp_ip4_addr_t *other_ip)
 
 IPAddress (esp_ip_addr_t *other_ip)
 
 operator esp_ip_addr_t () const
 
 operator esp_ip4_addr_t () const
 
 operator ip_addr_t () const
 
 operator ip4_addr_t () const
 
 operator arduino_ns::IPAddress () const
 
bool is_set () const
 
bool is_ip4 () const
 
bool is_ip6 () const
 
bool is_multicast () const
 
char * str_to (char *buf) const
 Write IP address to buffer.
 
bool operator== (const IPAddress &other) const
 
bool operator!= (const IPAddress &other) const
 
IPAddress & operator+= (uint8_t increase)
 

Protected Attributes

ip_addr_t ip_addr_
 

Detailed Description

Definition at line 109 of file ip_address.h.

Constructor & Destructor Documentation

◆ IPAddress() [1/27]

esphome::network::IPAddress::IPAddress ( )
inline

Definition at line 113 of file ip_address.h.

◆ IPAddress() [2/27]

esphome::network::IPAddress::IPAddress ( uint8_t first,
uint8_t second,
uint8_t third,
uint8_t fourth )
inline

Definition at line 115 of file ip_address.h.

◆ IPAddress() [3/27]

esphome::network::IPAddress::IPAddress ( const std::string & in_address)
inline

Definition at line 121 of file ip_address.h.

◆ IPAddress() [4/27]

esphome::network::IPAddress::IPAddress ( const struct in6_addr * other_ip)
inline

Definition at line 122 of file ip_address.h.

◆ IPAddress() [5/27]

esphome::network::IPAddress::IPAddress ( const struct sockaddr_in6 * addr)
inline

Definition at line 123 of file ip_address.h.

◆ IPAddress() [6/27]

esphome::network::IPAddress::IPAddress ( )
inline

Definition at line 172 of file ip_address.h.

◆ IPAddress() [7/27]

esphome::network::IPAddress::IPAddress ( uint8_t first,
uint8_t second,
uint8_t third,
uint8_t fourth )
inline

Definition at line 173 of file ip_address.h.

◆ IPAddress() [8/27]

esphome::network::IPAddress::IPAddress ( const char * in_address)
inline

Definition at line 179 of file ip_address.h.

◆ IPAddress() [9/27]

esphome::network::IPAddress::IPAddress ( const std::string & in_address)
inline

Definition at line 183 of file ip_address.h.

◆ IPAddress() [10/27]

esphome::network::IPAddress::IPAddress ( const ip_addr_t * other_ip)
inline

Definition at line 184 of file ip_address.h.

◆ IPAddress() [11/27]

esphome::network::IPAddress::IPAddress ( ip4_addr_t * other_ip)
inline

Definition at line 185 of file ip_address.h.

◆ IPAddress() [12/27]

esphome::network::IPAddress::IPAddress ( ip6_addr_t * other_ip)
inline

Definition at line 190 of file ip_address.h.

◆ IPAddress() [13/27]

esphome::network::IPAddress::IPAddress ( )
inline

Definition at line 237 of file ip_address.h.

◆ IPAddress() [14/27]

esphome::network::IPAddress::IPAddress ( uint8_t first,
uint8_t second,
uint8_t third,
uint8_t fourth )
inline

Definition at line 238 of file ip_address.h.

◆ IPAddress() [15/27]

esphome::network::IPAddress::IPAddress ( const std::string & in_address)
inline

Definition at line 241 of file ip_address.h.

◆ IPAddress() [16/27]

esphome::network::IPAddress::IPAddress ( const ip_addr_t * other_ip)
inline

Definition at line 242 of file ip_address.h.

◆ IPAddress() [17/27]

esphome::network::IPAddress::IPAddress ( )
inline

Definition at line 252 of file ip_address.h.

◆ IPAddress() [18/27]

esphome::network::IPAddress::IPAddress ( uint8_t first,
uint8_t second,
uint8_t third,
uint8_t fourth )
inline

Definition at line 254 of file ip_address.h.

◆ IPAddress() [19/27]

esphome::network::IPAddress::IPAddress ( const ip_addr_t * other_ip)
inline

Definition at line 258 of file ip_address.h.

◆ IPAddress() [20/27]

esphome::network::IPAddress::IPAddress ( const char * in_address)
inline

Definition at line 259 of file ip_address.h.

◆ IPAddress() [21/27]

esphome::network::IPAddress::IPAddress ( const std::string & in_address)
inline

Definition at line 260 of file ip_address.h.

◆ IPAddress() [22/27]

esphome::network::IPAddress::IPAddress ( ip4_addr_t * other_ip)
inline

Definition at line 262 of file ip_address.h.

◆ IPAddress() [23/27]

esphome::network::IPAddress::IPAddress ( const arduino_ns::IPAddress & other_ip)
inline

Definition at line 270 of file ip_address.h.

◆ IPAddress() [24/27]

esphome::network::IPAddress::IPAddress ( ip6_addr_t * other_ip)
inline

Definition at line 273 of file ip_address.h.

◆ IPAddress() [25/27]

esphome::network::IPAddress::IPAddress ( esp_ip6_addr_t * other_ip)
inline

Definition at line 281 of file ip_address.h.

◆ IPAddress() [26/27]

esphome::network::IPAddress::IPAddress ( esp_ip4_addr_t * other_ip)
inline

Definition at line 287 of file ip_address.h.

◆ IPAddress() [27/27]

esphome::network::IPAddress::IPAddress ( esp_ip_addr_t * other_ip)
inline

Definition at line 294 of file ip_address.h.

Member Function Documentation

◆ is_ip4() [1/5]

bool esphome::network::IPAddress::is_ip4 ( ) const
inline

Definition at line 137 of file ip_address.h.

◆ is_ip4() [2/5]

bool esphome::network::IPAddress::is_ip4 ( ) const
inline

Definition at line 140 of file ip_address.h.

◆ is_ip4() [3/5]

bool esphome::network::IPAddress::is_ip4 ( ) const
inline

Definition at line 203 of file ip_address.h.

◆ is_ip4() [4/5]

bool esphome::network::IPAddress::is_ip4 ( ) const
inline

Definition at line 243 of file ip_address.h.

◆ is_ip4() [5/5]

bool esphome::network::IPAddress::is_ip4 ( ) const
inline

Definition at line 339 of file ip_address.h.

◆ is_ip6() [1/5]

bool esphome::network::IPAddress::is_ip6 ( ) const
inline

Definition at line 138 of file ip_address.h.

◆ is_ip6() [2/5]

bool esphome::network::IPAddress::is_ip6 ( ) const
inline

Definition at line 141 of file ip_address.h.

◆ is_ip6() [3/5]

bool esphome::network::IPAddress::is_ip6 ( ) const
inline

Definition at line 204 of file ip_address.h.

◆ is_ip6() [4/5]

bool esphome::network::IPAddress::is_ip6 ( ) const
inline

Definition at line 244 of file ip_address.h.

◆ is_ip6() [5/5]

bool esphome::network::IPAddress::is_ip6 ( ) const
inline

Definition at line 340 of file ip_address.h.

◆ is_multicast() [1/3]

bool esphome::network::IPAddress::is_multicast ( ) const
inline

Definition at line 143 of file ip_address.h.

◆ is_multicast() [2/3]

bool esphome::network::IPAddress::is_multicast ( ) const
inline

Definition at line 205 of file ip_address.h.

◆ is_multicast() [3/3]

bool esphome::network::IPAddress::is_multicast ( ) const
inline

Definition at line 341 of file ip_address.h.

◆ is_set() [1/3]

bool esphome::network::IPAddress::is_set ( ) const
inline

Definition at line 127 of file ip_address.h.

◆ is_set() [2/3]

bool esphome::network::IPAddress::is_set ( ) const
inline

Definition at line 196 of file ip_address.h.

◆ is_set() [3/3]

bool esphome::network::IPAddress::is_set ( ) const
inline

Definition at line 338 of file ip_address.h.

◆ operator arduino_ns::IPAddress()

esphome::network::IPAddress::operator arduino_ns::IPAddress ( ) const
inline

Definition at line 335 of file ip_address.h.

◆ operator esp_ip4_addr_t()

esphome::network::IPAddress::operator esp_ip4_addr_t ( ) const
inline

Definition at line 317 of file ip_address.h.

◆ operator esp_ip_addr_t()

esphome::network::IPAddress::operator esp_ip_addr_t ( ) const
inline

Definition at line 301 of file ip_address.h.

◆ operator ip4_addr_t()

esphome::network::IPAddress::operator ip4_addr_t ( ) const
inline

Definition at line 331 of file ip_address.h.

◆ operator ip_addr_t() [1/2]

esphome::network::IPAddress::operator ip_addr_t ( ) const
inline

Definition at line 195 of file ip_address.h.

◆ operator ip_addr_t() [2/2]

esphome::network::IPAddress::operator ip_addr_t ( ) const
inline

Definition at line 329 of file ip_address.h.

◆ operator struct in6_addr()

esphome::network::IPAddress::operator struct in6_addr ( ) const
inline

Definition at line 125 of file ip_address.h.

◆ operator!=() [1/3]

bool esphome::network::IPAddress::operator!= ( const IPAddress & other) const
inline

Definition at line 168 of file ip_address.h.

◆ operator!=() [2/3]

bool esphome::network::IPAddress::operator!= ( const IPAddress & other) const
inline

Definition at line 229 of file ip_address.h.

◆ operator!=() [3/3]

bool esphome::network::IPAddress::operator!= ( const IPAddress & other) const
inline

Definition at line 350 of file ip_address.h.

◆ operator+=() [1/2]

IPAddress & esphome::network::IPAddress::operator+= ( uint8_t increase)
inline

Definition at line 230 of file ip_address.h.

◆ operator+=() [2/2]

IPAddress & esphome::network::IPAddress::operator+= ( uint8_t increase)
inline

Definition at line 352 of file ip_address.h.

◆ operator==() [1/3]

bool esphome::network::IPAddress::operator== ( const IPAddress & other) const
inline

Definition at line 167 of file ip_address.h.

◆ operator==() [2/3]

bool esphome::network::IPAddress::operator== ( const IPAddress & other) const
inline

Definition at line 220 of file ip_address.h.

◆ operator==() [3/3]

bool esphome::network::IPAddress::operator== ( const IPAddress & other) const
inline

Definition at line 349 of file ip_address.h.

◆ str_to() [1/4]

char * esphome::network::IPAddress::str_to ( char * buf) const
inline

Definition at line 153 of file ip_address.h.

◆ str_to() [2/4]

char * esphome::network::IPAddress::str_to ( char * buf) const
inline

Definition at line 211 of file ip_address.h.

◆ str_to() [3/4]

char * esphome::network::IPAddress::str_to ( char * buf) const
inline

Write IP address to buffer. Buffer must be at least IP_ADDRESS_BUFFER_SIZE bytes.

Definition at line 246 of file ip_address.h.

◆ str_to() [4/4]

char * esphome::network::IPAddress::str_to ( char * buf) const
inline

Write IP address to buffer.

Buffer must be at least IP_ADDRESS_BUFFER_SIZE bytes. Output is lowercased per RFC 5952 (IPv6 hex digits a-f).

Definition at line 344 of file ip_address.h.

Field Documentation

◆ ip_addr_

ip_addr_t esphome::network::IPAddress::ip_addr_
protected

Definition at line 366 of file ip_address.h.


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