Wrapper class around lwip implementation of a ip address. More...
#include <mn_basic_ip_address.hpp>
Public Member Functions | |
basic_ip_address (address_family fam) | |
Constructor. More... | |
virtual const char * | to_string ()=0 |
Returns a string containing a representation of the address in presentation format. More... | |
virtual uint8_t * | get_bytes ()=0 |
Get the ip address as byte array. More... | |
virtual bool | is_loopback ()=0 |
Is the this address a loopback address? More... | |
virtual bool | is_broadcast ()=0 |
Is the this address a broadcast address? More... | |
virtual address_family | get_family () |
Get the address family (AF_INET or AF_INET6) of the address. More... | |
virtual int | length () const =0 |
Returns the length in bytes of the ip address. More... | |
virtual void | swap (basic_ip_address &rhs) noexcept |
Protected Attributes | |
address_family | m_aFamily |
A saved / cached copy of the address family type of this socket. More... | |
Detailed Description
Wrapper class around lwip implementation of a ip address.
- Note
- To use this, you need to subclass it. All of your ip address should be derived from the basic_ip_address class. Then implement the all virtual abstracted functions.
Constructor & Destructor Documentation
◆ basic_ip_address()
|
inline |
Constructor.
Member Function Documentation
◆ get_bytes()
|
pure virtual |
Get the ip address as byte array.
- Returns
- The ip address as byte array
Implemented in mn::net::basic_ip6_address, and mn::net::basic_ip4_address.
◆ get_family()
|
inlinevirtual |
Get the address family (AF_INET or AF_INET6) of the address.
- Returns
- The address family
◆ is_broadcast()
|
pure virtual |
Is the this address a broadcast address?
- Returns
- if true then yes and false if not
Implemented in mn::net::basic_ip6_address, and mn::net::basic_ip4_address.
◆ is_loopback()
|
pure virtual |
Is the this address a loopback address?
- Returns
- if true then yes and false if not
Implemented in mn::net::basic_ip6_address, and mn::net::basic_ip4_address.
◆ length()
|
pure virtual |
Returns the length in bytes of the ip address.
- Returns
- The length in bytes of the ip address
Implemented in mn::net::basic_ip6_address, and mn::net::basic_ip4_address.
◆ swap()
|
inlinevirtualnoexcept |
◆ to_string()
|
pure virtual |
Returns a string containing a representation of the address in presentation format.
- Returns
- The ip address as string
Implemented in mn::net::basic_ip6_address, and mn::net::basic_ip4_address.
Member Data Documentation
◆ m_aFamily
|
protected |
A saved / cached copy of the address family type of this socket.
The documentation for this class was generated from the following file: