A class to make it easier to handle and pass around IP addresses. More...

#include <IpAddress.h>

Public Member Functions

 IpAddress ()
 
 IpAddress (uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet)
 
 IpAddress (uint32_t address)
 
 IpAddress (ip_addr_t &addr)
 
 IpAddress (const ip_addr_t &addr)
 
 IpAddress (const uint8_t address[4])
 
 IpAddress (const String &address)
 
 operator uint32_t () const
 
 operator ip_addr_t () const
 
 operator ip_addr_t * ()
 
bool operator== (const IpAddress &otherAddress) const
 
bool operator== (const uint8_t addr[4]) const
 
bool operator!= (const IpAddress &otherAddress) const
 
bool operator!= (const uint8_t addr[4]) const
 
bool isNull () const
 
String toString () const
 
bool compare (const IpAddress &addr, const IpAddress &mask) const
 
uint8_t operator[] (int index) const
 
uint8_t & operator[] (int index)
 
IpAddressoperator= (const uint8_t address[4])
 
IpAddressoperator= (uint32_t address)
 
IpAddressoperator= (const String &address)
 
size_t printTo (Print &p) const
 

Detailed Description

A class to make it easier to handle and pass around IP addresses.

Constructor & Destructor Documentation

◆ IpAddress() [1/7]

IpAddress::IpAddress ( )
inline

◆ IpAddress() [2/7]

IpAddress::IpAddress ( uint8_t  first_octet,
uint8_t  second_octet,
uint8_t  third_octet,
uint8_t  fourth_octet 
)
inline

◆ IpAddress() [3/7]

IpAddress::IpAddress ( uint32_t  address)
inline

◆ IpAddress() [4/7]

IpAddress::IpAddress ( ip_addr_t addr)
inline

◆ IpAddress() [5/7]

IpAddress::IpAddress ( const ip_addr_t addr)
inline

◆ IpAddress() [6/7]

IpAddress::IpAddress ( const uint8_t  address[4])
inline
Parameters
addressIP4 address octets

◆ IpAddress() [7/7]

IpAddress::IpAddress ( const String address)
inline

Member Function Documentation

◆ compare()

bool IpAddress::compare ( const IpAddress addr,
const IpAddress mask 
) const
inline

◆ isNull()

bool IpAddress::isNull ( ) const
inline

◆ operator ip_addr_t()

IpAddress::operator ip_addr_t ( ) const
inline

◆ operator ip_addr_t *()

IpAddress::operator ip_addr_t * ( )
inline

◆ operator uint32_t()

IpAddress::operator uint32_t ( ) const
inline

◆ operator!=() [1/2]

bool IpAddress::operator!= ( const IpAddress otherAddress) const
inline

◆ operator!=() [2/2]

bool IpAddress::operator!= ( const uint8_t  addr[4]) const
inline

◆ operator=() [1/3]

IpAddress& IpAddress::operator= ( const String address)
inline

◆ operator=() [2/3]

IpAddress& IpAddress::operator= ( const uint8_t  address[4])
inline

◆ operator=() [3/3]

IpAddress& IpAddress::operator= ( uint32_t  address)
inline

◆ operator==() [1/2]

bool IpAddress::operator== ( const IpAddress otherAddress) const
inline

◆ operator==() [2/2]

bool IpAddress::operator== ( const uint8_t  addr[4]) const
inline

◆ operator[]() [1/2]

uint8_t& IpAddress::operator[] ( int  index)
inline

◆ operator[]() [2/2]

uint8_t IpAddress::operator[] ( int  index) const
inline

◆ printTo()

size_t IpAddress::printTo ( Print p) const

◆ toString()

String IpAddress::toString ( ) const

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