Sese Framework  x.y.z
A cross-platform framework
载入中...
搜索中...
未找到
sese::net::IPv6Address类 参考final

IPv6 地址类 更多...

#include <IPv6Address.h>

类 sese::net::IPv6Address 继承关系图:
sese::net::IPAddress sese::net::Address

Public 类型

using Ptr = std::shared_ptr<IPv6Address>
 
- Public 类型 继承自 sese::net::IPAddress
using Ptr = std::shared_ptr<IPAddress>
 
- Public 类型 继承自 sese::net::Address
using Ptr = std::shared_ptr<Address>
 

Public 成员函数

 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 成员函数 继承自 sese::net::Address
virtual ~Address ()=default
 

静态 Public 成员函数

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)
 
- 静态 Public 成员函数 继承自 sese::net::IPAddress
static Ptr create (const char *address, uint16_t port=0)
 
- 静态 Public 成员函数 继承自 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 属性

sockaddr_in6 address {0}
 

详细描述

IPv6 地址类

成员类型定义说明

◆ Ptr

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

构造及析构函数说明

◆ IPv6Address() [1/3]

IPv6Address::IPv6Address ( )
explicitnoexcept

引用了 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

引用了 address , 以及 ToBigEndian16().

成员函数说明

◆ any()

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

◆ create()

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

引用了 address, sese::net::inetPton() , 以及 ToBigEndian16().

被这些函数引用 any() , 以及 localhost().

◆ getAddress()

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

实现了 sese::net::Address.

引用了 address , 以及 ToBigEndian16().

◆ getBroadcastAddress()

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

◆ getFamily()

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

实现了 sese::net::IPAddress.

引用了 address.

◆ getNetworkAddress()

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

◆ getPort()

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

实现了 sese::net::IPAddress.

引用了 address , 以及 FromBigEndian16().

◆ getRawAddress()

sockaddr * IPv6Address::getRawAddress ( ) const
nodiscardoverridevirtualnoexcept

实现了 sese::net::Address.

引用了 address.

◆ getRawAddressLength()

socklen_t IPv6Address::getRawAddressLength ( ) const
nodiscardoverridevirtualnoexcept

实现了 sese::net::Address.

引用了 address.

◆ getSubnetMask()

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

◆ localhost()

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

引用了 create().

◆ setFamily()

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

实现了 sese::net::IPAddress.

引用了 address.

◆ setPort()

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

实现了 sese::net::IPAddress.

引用了 ToBigEndian16().

类成员变量说明

◆ address

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

该类的文档由以下文件生成: