|
join 1.0
lightweight network framework library
|
IPv4 address implementation. More...


Public Member Functions | |
| Ipv4Address () | |
| create the Ipv4Address instance. | |
| Ipv4Address (const Ipv4Address &address) | |
| create the Ipv4Address instance by copy. | |
| Ipv4Address & | operator= (const Ipv4Address &address) |
| copy the Ipv4Address instance. | |
| Ipv4Address (const void *address) | |
| create the Ipv4Address instance using IPv4 address structure. | |
| Ipv4Address (int prefix) | |
| create netmask address using prefix. | |
| ~Ipv4Address () | |
| destroy the Ipv4Address instance. | |
| int | family () const |
| get address family. | |
| const void * | addr () const |
| get the internal address structure. | |
| socklen_t | length () const |
| get the size in byte of the internal address structure. | |
| uint32_t | scope () const |
| get the scope identifier of the address. | |
| int | prefix () const |
| get prefix length from netmask address. | |
| bool | isWildcard () const |
| check if IP address is | |
| bool | isLoopBack () const |
| check if IP address is a loopback address. | |
| bool | isLinkLocal () const |
| check if IP address is link local. | |
| bool | isSiteLocal () const |
| check if IP address is site local (deprecated). | |
| bool | isUniqueLocal () const |
| check if IP address is unique local. | |
| bool | isBroadcast (int prefix) const |
| check if IP address is a broadcast address. | |
| bool | isMulticast () const |
| check if IP address is multicast. | |
| bool | isIpv4Compat () const |
| check if IP address is IPv4 compatible (deprecated). | |
| bool | isIpv4Mapped () const |
| check if IP address is IPv4 mapped. | |
| std::string | toString () const |
| convert internal address structure to string. | |
| std::string | toArpa () const |
| convert IP address to the in-addr.arpa domain name. | |
| Ipv4Address | operator& (const Ipv4Address &address) const |
| perform AND operation on IP address. | |
| Ipv4Address | operator| (const Ipv4Address &address) const |
| perform OR operation on IP address. | |
| Ipv4Address | operator^ (const Ipv4Address &address) const |
| perform XOR operation on IP address. | |
| Ipv4Address | operator~ () const |
| perform NOT operation on IP address. | |
| void | clear () |
| clear IP address (wilcard address). | |
| uint8_t & | operator[] (size_t position) |
| returns a reference to the element at the specified location. | |
Public Member Functions inherited from join::IpAddressImpl | |
| virtual | ~IpAddressImpl () |
| destroy the IpAddressImpl instance. | |
Static Public Member Functions | |
| static bool | parse (const std::string &address, Ipv4Address &ip) |
| parse an IPv4 address in string format. | |
Additional Inherited Members | |
Protected Member Functions inherited from join::IpAddressImpl | |
| IpAddressImpl () | |
| create the IpAddressImpl instance. | |
| IpAddressImpl (const IpAddressImpl &address)=delete | |
| create the IpAddressImpl instance by copy. | |
IPv4 address implementation.
|
inline |
create the Ipv4Address instance.
|
inline |
create the Ipv4Address instance by copy.
| address | address to copy. |
|
inline |
create the Ipv4Address instance using IPv4 address structure.
| address | address structure to use. |
|
inline |
create netmask address using prefix.
| prefix | number of bits to create the netmask address from. |
|
inline |
destroy the Ipv4Address instance.
|
inlinevirtual |
get the internal address structure.
Implements join::IpAddressImpl.
|
inlinevirtual |
clear IP address (wilcard address).
Implements join::IpAddressImpl.
|
inlinevirtual |
|
inlinevirtual |
check if IP address is a broadcast address.
| prefix | prefix length. |
Implements join::IpAddressImpl.
|
inlinevirtual |
check if IP address is IPv4 compatible (deprecated).
Implements join::IpAddressImpl.
|
inlinevirtual |
check if IP address is IPv4 mapped.
Implements join::IpAddressImpl.
|
inlinevirtual |
check if IP address is link local.
Implements join::IpAddressImpl.
|
inlinevirtual |
check if IP address is a loopback address.
Implements join::IpAddressImpl.
|
inlinevirtual |
check if IP address is multicast.
Implements join::IpAddressImpl.
|
inlinevirtual |
check if IP address is site local (deprecated).
Implements join::IpAddressImpl.
|
inlinevirtual |
check if IP address is unique local.
Implements join::IpAddressImpl.
|
inlinevirtual |
check if IP address is
Implements join::IpAddressImpl.
|
inlinevirtual |
get the size in byte of the internal address structure.
Implements join::IpAddressImpl.
|
inline |
perform AND operation on IP address.
| address | address to compare. |
|
inline |
copy the Ipv4Address instance.
| address | address to copy. |
|
inlinevirtual |
returns a reference to the element at the specified location.
| position | position of the element to return. |
| invalid_argument | if position is out of range. |
Implements join::IpAddressImpl.
|
inline |
perform XOR operation on IP address.
| address | address to compare. |
|
inline |
perform OR operation on IP address.
| address | Address to compare. |
|
inline |
perform NOT operation on IP address.
|
inlinestatic |
parse an IPv4 address in string format.
| address | address string to use. |
| ip | IP address output. |
|
inlinevirtual |
|
inlinevirtual |
get the scope identifier of the address.
Implements join::IpAddressImpl.
|
inlinevirtual |
convert IP address to the in-addr.arpa domain name.
Implements join::IpAddressImpl.
|
inlinevirtual |
convert internal address structure to string.
Implements join::IpAddressImpl.