mn_basic_ip4_address.hpp
Go to the documentation of this file.
129 inline bool is_multicast() { return ( as_int32 & PP_HTONL(0xf0000000UL) ) == PP_HTONL(0xe0000000UL); }
134 inline bool is_linklocal() { return ( as_int32 & PP_HTONL(0xf0000000UL) ) == PP_HTONL(0xa9fe0000UL); }
This class represents an internet (IP) version 6 host address.
Definition: mn_basic_ip4_address.hpp:38
uint8_t * get_bytes()
Get the ip4 address as array.
Definition: mn_basic_ip4_address.cpp:96
void set_broadcast()
Set the ip as BROADCAST Address.
Definition: mn_basic_ip4_address.hpp:104
void set_any()
Set the ip as ANY Address.
Definition: mn_basic_ip4_address.hpp:100
basic_ip4_address calc_broadcast(const basic_ip4_address &subnet)
Definition: mn_basic_ip4_address.cpp:181
bool operator==(const basic_ip4_address &ipOther)
equel operator
Definition: mn_basic_ip4_address.hpp:169
void set_zero()
Get the ip4 address as array.
Definition: mn_basic_ip4_address.hpp:96
basic_ip4_address operator~() const
arametic NICHT operator
Definition: mn_basic_ip4_address.cpp:163
virtual bool is_equel(const basic_ip4_address &ipOther)
Definition: mn_basic_ip4_address.cpp:110
void set_loop()
Set the ip as LOOPBACK Address.
Definition: mn_basic_ip4_address.hpp:108
basic_ip4_address calc_network_id(const basic_ip4_address &subnet)
Definition: mn_basic_ip4_address.cpp:193
basic_ip4_address operator|(const basic_ip4_address &other) const
arametic OR operator
Definition: mn_basic_ip4_address.cpp:149
basic_ip4_address & operator=(const uint32_t &address)
Assigns an basic_ip4_address.
Definition: mn_basic_ip4_address.cpp:118
static uint8_t get_subnet_cidr(const basic_ip4_address &subnet)
Get the subnet_cidr from the given netmask.
Definition: mn_basic_ip4_address.cpp:205
int length() const
Returns the length in bytes of the ip address.
Definition: mn_basic_ip4_address.cpp:103
basic_ip4_address operator&(const basic_ip4_address &other) const
arametic AND operator
Definition: mn_basic_ip4_address.cpp:142
bool operator!=(const basic_ip4_address &ipOther)
unequel operator
Definition: mn_basic_ip4_address.hpp:173
uint8_t operator[](int index) const
array get opertor on the uint8_t array[4]
Definition: mn_basic_ip4_address.hpp:161
basic_ip4_address()
Construct a none IPv4 basic_ip4_address.
Definition: mn_basic_ip4_address.cpp:27
uint8_t & operator[](int index)
array get opertor on the uint8_t array[4]
Definition: mn_basic_ip4_address.hpp:165
basic_ip4_address operator^(const basic_ip4_address &other) const
arametic XOR operator
Definition: mn_basic_ip4_address.cpp:156
virtual const char * to_string()
Returns a string containing a representation of the address in presentation format.
Definition: mn_basic_ip4_address.cpp:170
virtual void swap(basic_ip4_address &rhs) noexcept
Definition: mn_basic_ip4_address.hpp:212
Wrapper class around lwip implementation of a ip address.
Definition: mn_basic_ip_address.hpp:65
virtual void swap(basic_ip_address &rhs) noexcept
Definition: mn_basic_ip_address.hpp:108
#define MNNET_IPV4_ADDRESS_LOOPBACK
Definition: mn_basic_ip4_address.hpp:26
#define MNNET_IPV4_ADDRESS_BROADCAST
Definition: mn_basic_ip4_address.hpp:27
Definition: mn_allocator_typetraits.hpp:25