Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::net::IPv6Address Class Referencefinal

IPv6 address class. More...

#include <IPv6Address.h>

Inheritance diagram for sese::net::IPv6Address:
sese::net::IPAddress sese::net::Address

Public Types

using Ptr = std::shared_ptr<IPv6Address>
 
- Public Types inherited from sese::net::IPAddress
using Ptr = std::shared_ptr<IPAddress>
 
- Public Types inherited from sese::net::Address
using Ptr = std::shared_ptr<Address>
 

Public Member Functions

 IPv6Address () noexcept
 
 IPv6Address (const sockaddr_in6 &address) noexcept
 
 IPv6Address (const uint8_t *address, uint16_t port=0)
 
sockaddr * getRawAddress () const noexcept override
 
socklen_t getRawAddressLength () const noexcept override
 
std::string getAddress () const noexcept override
 
IPAddress::Ptr getBroadcastAddress (uint32_t prefix_len) const noexcept override
 
IPAddress::Ptr getNetworkAddress (uint32_t prefix_len) const noexcept override
 
IPAddress::Ptr getSubnetMask (uint32_t prefix_len) const noexcept override
 
void setPort (uint16_t port) noexcept override
 
uint16_t getPort () const noexcept override
 
void setFamily (uint16_t family) noexcept override
 
uint16_t getFamily () noexcept override
 
- Public Member Functions inherited from sese::net::Address
virtual ~Address ()=default
 

Static Public Member Functions

static IPv6Address::Ptr create (const char *address, uint16_t port)
 
static IPv6Address::Ptr localhost (uint16_t port=0)
 
static IPv6Address::Ptr any (uint16_t port=0)
 
- Static Public Member Functions inherited from sese::net::IPAddress
static Ptr create (const char *address, uint16_t port=0)
 
- Static Public Member Functions inherited from sese::net::Address
static Ptr create (const sockaddr *address, socklen_t address_len)
 
static bool lookUp (std::vector< Address::Ptr > &result, const std::string &host, int family=AF_INET, int type=0, int protocol=0)
 
static Address::Ptr lookUpAny (const std::string &host, int family=AF_INET, int type=0, int protocol=0)
 

Private Attributes

sockaddr_in6 address {0}
 

Detailed Description

IPv6 address class.

Member Typedef Documentation

◆ Ptr

using sese::net::IPv6Address::Ptr = std::shared_ptr<IPv6Address>

Constructor & Destructor Documentation

◆ IPv6Address() [1/3]

IPv6Address::IPv6Address ( )
explicitnoexcept

References address.

◆ IPv6Address() [2/3]

IPv6Address::IPv6Address ( const sockaddr_in6 & address)
explicitnoexcept

◆ IPv6Address() [3/3]

IPv6Address::IPv6Address ( const uint8_t * address,
uint16_t port = 0 )
explicit

References address, and ToBigEndian16().

Member Function Documentation

◆ any()

IPv6Address::Ptr IPv6Address::any ( uint16_t port = 0)
static

◆ create()

IPv6Address::Ptr IPv6Address::create ( const char * address,
uint16_t port )
static

References address, sese::net::inetPton(), and ToBigEndian16().

Referenced by any(), and localhost().

◆ getAddress()

std::string IPv6Address::getAddress ( ) const
nodiscardoverridevirtualnoexcept

Implements sese::net::Address.

References address, and ToBigEndian16().

◆ getBroadcastAddress()

IPAddress::Ptr IPv6Address::getBroadcastAddress ( uint32_t prefix_len) const
nodiscardoverridevirtualnoexcept

◆ getFamily()

uint16_t sese::net::IPv6Address::getFamily ( )
inlineoverridevirtualnoexcept

Implements sese::net::IPAddress.

References address.

◆ getNetworkAddress()

IPAddress::Ptr IPv6Address::getNetworkAddress ( uint32_t prefix_len) const
nodiscardoverridevirtualnoexcept

◆ getPort()

uint16_t sese::net::IPv6Address::getPort ( ) const
inlinenodiscardoverridevirtualnoexcept

Implements sese::net::IPAddress.

References address, and FromBigEndian16().

◆ getRawAddress()

sockaddr * IPv6Address::getRawAddress ( ) const
nodiscardoverridevirtualnoexcept

Implements sese::net::Address.

References address.

◆ getRawAddressLength()

socklen_t IPv6Address::getRawAddressLength ( ) const
nodiscardoverridevirtualnoexcept

Implements sese::net::Address.

References address.

◆ getSubnetMask()

IPAddress::Ptr IPv6Address::getSubnetMask ( uint32_t prefix_len) const
nodiscardoverridevirtualnoexcept

Implements sese::net::IPAddress.

◆ localhost()

IPv6Address::Ptr IPv6Address::localhost ( uint16_t port = 0)
static

References create().

◆ setFamily()

void sese::net::IPv6Address::setFamily ( uint16_t family)
inlineoverridevirtualnoexcept

Implements sese::net::IPAddress.

References address.

◆ setPort()

void sese::net::IPv6Address::setPort ( uint16_t port)
inlineoverridevirtualnoexcept

Implements sese::net::IPAddress.

References ToBigEndian16().

Member Data Documentation

◆ address

sockaddr_in6 sese::net::IPv6Address::address {0}
private

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