41 typedef sockaddr general_type ;
42 typedef sockaddr_in6 specific_type ;
43 typedef sockaddr_storage storage_type ;
45 { specific_type specific ; general_type general ; storage_type storage ; } ;
48 explicit Address6(
const std::string & ) ;
49 Address6(
const std::string & ,
const std::string & ) ;
50 Address6(
const std::string & ,
unsigned int ) ;
51 Address6(
unsigned int port ,
int ) ;
52 Address6(
const sockaddr * addr , socklen_t len ) ;
56 static unsigned short family() ;
57 const sockaddr * address()
const ;
58 sockaddr * address() ;
59 static socklen_t length() ;
60 unsigned long scopeId()
const ;
61 unsigned int port()
const ;
62 void setPort(
unsigned int port ) ;
64 static bool validString(
const std::string & , std::string * =
nullptr ) ;
65 static bool validStrings(
const std::string & ,
const std::string & , std::string * =
nullptr ) ;
66 static bool validPort(
unsigned int port ) ;
67 static bool validData(
const sockaddr * addr , socklen_t len ) ;
69 bool same(
const Address6 & other )
const ;
70 bool sameHostPart(
const Address6 & other )
const ;
71 bool isLoopback()
const ;
72 bool isLocal( std::string & )
const ;
74 std::string displayString()
const ;
75 std::string hostPartString()
const ;
81 static const char * setAddress(
union_type & ,
const std::string & ) ;
82 static const char * setHostAddress(
union_type & ,
const std::string & ) ;
83 static const char * setPort(
union_type & ,
unsigned int ) ;
84 static const char * setPort(
union_type & ,
const std::string & ) ;
85 static bool sameAddr( const ::in6_addr & a , const ::in6_addr & b ) ;
86 static void setZone(
union_type & ,
unsigned int ) ;
Used by GNet::Address6 to cast between sockaddr and sockaddr_in6.
std::vector< std::string > StringArray
A std::vector of std::strings.
A 'sockaddr' wrapper class for IPv6 addresses.