#include <Sockets.hpp>
List of all members.
Public Types |
| typedef sockaddr_in6 | SockAddr |
Public Member Functions |
| CAT_INLINE bool | Convert (bool To6) |
| bool | DemoteTo4 () |
| bool | EqualsIPOnly (const NetAddr &addr) const |
| CAT_INLINE const u32 | GetIP4 () const |
| CAT_INLINE const u64 * | GetIP6 () const |
| CAT_INLINE Port | GetPort () const |
| CAT_INLINE void | Invalidate () |
| std::string | IPToString () const |
| CAT_INLINE bool | Is6 () const |
| bool | IsInternetRoutable () |
| bool | IsRoutable () |
| | NetAddr (int a, int b, int c, int d, Port port=0) |
| | NetAddr (const char *ip_str, Port port=0) |
| | NetAddr (const sockaddr_in &addr) |
| | NetAddr (const sockaddr *addr) |
| | NetAddr (const sockaddr_in6 &addr) |
| CAT_INLINE | NetAddr () |
| | NetAddr (const NetAddr &addr) |
| bool | operator!= (const NetAddr &addr) const |
| NetAddr & | operator= (const NetAddr &addr) |
| bool | operator== (const NetAddr &addr) const |
| bool | PromoteTo6 () |
| bool | SetFromDotDecimals (int a, int b, int c, int d, Port port=0) |
| bool | SetFromRawIP (const u8 *ip_binary, int bytes) |
| bool | SetFromString (const char *ip_str, Port port=0) |
| CAT_INLINE void | SetPort (Port port) |
| bool | Unwrap (SockAddr &addr, int &addr_len, bool PromoteToIP6=false) const |
| CAT_INLINE bool | Valid () const |
| bool | Wrap (const sockaddr_in &addr) |
| bool | Wrap (const sockaddr_in6 &addr) |
| bool | Wrap (const sockaddr *addr) |
Static Public Attributes |
| static const int | IP4_BYTES = 4 |
| static const int | IP6_BYTES = 16 |
Private Attributes |
| union { |
| struct { |
| u16 _family |
| Port _port |
| } | |
| u32 _valid |
| }; | |
| union { |
| struct { |
| u32 v4 |
| u32 v4_padding [3] |
| } | |
| u64 v6 [2] |
| u8 v6_bytes [16] |
| u16 v6_words [8] |
| } | _ip |
Detailed Description
Definition at line 65 of file Sockets.hpp.
Member Typedef Documentation
Constructor & Destructor Documentation
| CAT_INLINE cat::NetAddr::NetAddr |
( |
| ) |
[inline] |
| cat::NetAddr::NetAddr |
( |
const char * |
ip_str, |
|
|
Port |
port = 0 |
|
) |
| |
| cat::NetAddr::NetAddr |
( |
const sockaddr_in6 & |
addr | ) |
|
| cat::NetAddr::NetAddr |
( |
const sockaddr_in & |
addr | ) |
|
| cat::NetAddr::NetAddr |
( |
const sockaddr * |
addr | ) |
|
| cat::NetAddr::NetAddr |
( |
int |
a, |
|
|
int |
b, |
|
|
int |
c, |
|
|
int |
d, |
|
|
Port |
port = 0 |
|
) |
| |
| cat::NetAddr::NetAddr |
( |
const NetAddr & |
addr | ) |
|
Member Function Documentation
| CAT_INLINE bool cat::NetAddr::Convert |
( |
bool |
To6 | ) |
[inline] |
| bool cat::NetAddr::DemoteTo4 |
( |
| ) |
|
| bool cat::NetAddr::EqualsIPOnly |
( |
const NetAddr & |
addr | ) |
const |
| CAT_INLINE const u32 cat::NetAddr::GetIP4 |
( |
| ) |
const [inline] |
| CAT_INLINE const u64* cat::NetAddr::GetIP6 |
( |
| ) |
const [inline] |
| CAT_INLINE Port cat::NetAddr::GetPort |
( |
| ) |
const [inline] |
| CAT_INLINE void cat::NetAddr::Invalidate |
( |
| ) |
[inline] |
| std::string cat::NetAddr::IPToString |
( |
| ) |
const |
| CAT_INLINE bool cat::NetAddr::Is6 |
( |
| ) |
const [inline] |
| bool cat::NetAddr::IsInternetRoutable |
( |
| ) |
|
| bool cat::NetAddr::IsRoutable |
( |
| ) |
|
| bool cat::NetAddr::operator!= |
( |
const NetAddr & |
addr | ) |
const |
| bool cat::NetAddr::operator== |
( |
const NetAddr & |
addr | ) |
const |
| bool cat::NetAddr::PromoteTo6 |
( |
| ) |
|
| bool cat::NetAddr::SetFromDotDecimals |
( |
int |
a, |
|
|
int |
b, |
|
|
int |
c, |
|
|
int |
d, |
|
|
Port |
port = 0 |
|
) |
| |
| bool cat::NetAddr::SetFromRawIP |
( |
const u8 * |
ip_binary, |
|
|
int |
bytes |
|
) |
| |
| bool cat::NetAddr::SetFromString |
( |
const char * |
ip_str, |
|
|
Port |
port = 0 |
|
) |
| |
| CAT_INLINE void cat::NetAddr::SetPort |
( |
Port |
port | ) |
[inline] |
| bool cat::NetAddr::Unwrap |
( |
SockAddr & |
addr, |
|
|
int & |
addr_len, |
|
|
bool |
PromoteToIP6 = false |
|
) |
| const |
| CAT_INLINE bool cat::NetAddr::Valid |
( |
| ) |
const [inline] |
| bool cat::NetAddr::Wrap |
( |
const sockaddr * |
addr | ) |
|
| bool cat::NetAddr::Wrap |
( |
const sockaddr_in & |
addr | ) |
|
| bool cat::NetAddr::Wrap |
( |
const sockaddr_in6 & |
addr | ) |
|
Member Data Documentation
The documentation for this class was generated from the following file: