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

#include <ip_address.h>

Public Member Functions

 IPAddress ()
 
 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_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
 
 ESPDEPRECATED ("str() is deprecated: use 'char buf[IP_ADDRESS_BUFFER_SIZE]; ip.str_to(buf);' instead. Removed in 2026.8.0", "2026.2.0") std
 
 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)
 
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
 
IPAddressoperator+= (uint8_t increase)
 

Protected Attributes

ip_addr_t ip_addr_
 

Detailed Description

Definition at line 87 of file ip_address.h.

Constructor & Destructor Documentation

◆ IPAddress() [1/26]

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

Definition at line 90 of file ip_address.h.

◆ IPAddress() [2/26]

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

Definition at line 91 of file ip_address.h.

◆ IPAddress() [3/26]

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

Definition at line 92 of file ip_address.h.

◆ IPAddress() [4/26]

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

Definition at line 93 of file ip_address.h.

◆ IPAddress() [5/26]

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

Definition at line 111 of file ip_address.h.

◆ IPAddress() [6/26]

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

Definition at line 112 of file ip_address.h.

◆ IPAddress() [7/26]

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

Definition at line 118 of file ip_address.h.

◆ IPAddress() [8/26]

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

Definition at line 122 of file ip_address.h.

◆ IPAddress() [9/26]

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

Definition at line 123 of file ip_address.h.

◆ IPAddress() [10/26]

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

Definition at line 124 of file ip_address.h.

◆ IPAddress() [11/26]

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

Definition at line 129 of file ip_address.h.

◆ IPAddress() [12/26]

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

Definition at line 185 of file ip_address.h.

◆ IPAddress() [13/26]

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

Definition at line 186 of file ip_address.h.

◆ IPAddress() [14/26]

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

Definition at line 189 of file ip_address.h.

◆ IPAddress() [15/26]

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

Definition at line 190 of file ip_address.h.

◆ IPAddress() [16/26]

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

Definition at line 198 of file ip_address.h.

◆ IPAddress() [17/26]

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

Definition at line 199 of file ip_address.h.

◆ IPAddress() [18/26]

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

Definition at line 202 of file ip_address.h.

◆ IPAddress() [19/26]

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

Definition at line 203 of file ip_address.h.

◆ IPAddress() [20/26]

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

Definition at line 204 of file ip_address.h.

◆ IPAddress() [21/26]

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

Definition at line 205 of file ip_address.h.

◆ IPAddress() [22/26]

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

Definition at line 212 of file ip_address.h.

◆ IPAddress() [23/26]

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

Definition at line 215 of file ip_address.h.

◆ IPAddress() [24/26]

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

Definition at line 223 of file ip_address.h.

◆ IPAddress() [25/26]

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

Definition at line 228 of file ip_address.h.

◆ IPAddress() [26/26]

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

Definition at line 234 of file ip_address.h.

Member Function Documentation

◆ ESPDEPRECATED()

esphome::network::IPAddress::ESPDEPRECATED ( "str() is deprecated: use 'char buf; ip.str_to(buf);' instead. Removed in 2026.8.0" [IP_ADDRESS_BUFFER_SIZE],
"2026.2.0"  )
inline

Definition at line 151 of file ip_address.h.

◆ is_ip4() [1/3]

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

Definition at line 98 of file ip_address.h.

◆ is_ip4() [2/3]

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

Definition at line 142 of file ip_address.h.

◆ is_ip4() [3/3]

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

Definition at line 271 of file ip_address.h.

◆ is_ip6() [1/3]

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

Definition at line 99 of file ip_address.h.

◆ is_ip6() [2/3]

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

Definition at line 143 of file ip_address.h.

◆ is_ip6() [3/3]

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

Definition at line 272 of file ip_address.h.

◆ is_multicast() [1/3]

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

Definition at line 100 of file ip_address.h.

◆ is_multicast() [2/3]

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

Definition at line 144 of file ip_address.h.

◆ is_multicast() [3/3]

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

Definition at line 273 of file ip_address.h.

◆ is_set() [1/3]

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

Definition at line 97 of file ip_address.h.

◆ is_set() [2/3]

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

Definition at line 135 of file ip_address.h.

◆ is_set() [3/3]

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

Definition at line 270 of file ip_address.h.

◆ operator arduino_ns::IPAddress()

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

Definition at line 267 of file ip_address.h.

◆ operator esp_ip4_addr_t()

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

Definition at line 250 of file ip_address.h.

◆ operator esp_ip_addr_t()

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

Definition at line 241 of file ip_address.h.

◆ operator ip4_addr_t()

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

Definition at line 263 of file ip_address.h.

◆ operator ip_addr_t() [1/2]

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

Definition at line 134 of file ip_address.h.

◆ operator ip_addr_t() [2/2]

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

Definition at line 261 of file ip_address.h.

◆ operator struct in6_addr()

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

Definition at line 95 of file ip_address.h.

◆ operator!=() [1/2]

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

Definition at line 107 of file ip_address.h.

◆ operator!=() [2/2]

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

Definition at line 282 of file ip_address.h.

◆ operator+=()

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

Definition at line 283 of file ip_address.h.

◆ operator==() [1/2]

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

Definition at line 106 of file ip_address.h.

◆ operator==() [2/2]

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

Definition at line 281 of file ip_address.h.

◆ str_to() [1/3]

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

Definition at line 101 of file ip_address.h.

◆ str_to() [2/3]

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 192 of file ip_address.h.

◆ str_to() [3/3]

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 276 of file ip_address.h.

Field Documentation

◆ ip_addr_

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

Definition at line 296 of file ip_address.h.


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