E-MailRelay
|
A 'sockaddr' wrapper class for local-domain addresses. More...
#include <gaddresslocal.h>
Public Types | |
using | sockaddr_type = sockaddr_un |
Public Member Functions | |
AddressLocal (unsigned int) | |
AddressLocal (std::string_view) | |
AddressLocal (unsigned int port, int) | |
AddressLocal (const sockaddr *addr, socklen_t len) | |
const sockaddr * | address () const |
sockaddr * | address () |
socklen_t | length () const noexcept |
unsigned long | scopeId (unsigned long default_=0UL) const |
unsigned int | port () const |
void | setPort (unsigned int port) |
bool | setZone (std::string_view ipv6_zone_name_or_scope_id) |
void | setScopeId (unsigned long ipv6_scope_id) |
bool | same (const AddressLocal &other, bool ipv6_compare_with_scope=false) const |
bool | sameHostPart (const AddressLocal &other) const |
bool | isLoopback () const |
bool | isLocal (std::string &) const |
bool | isLinkLocal () const |
bool | isUniqueLocal () const |
bool | isMulticast () const |
bool | isAny () const |
unsigned int | bits () const |
std::string | displayString (bool ipv6_with_scope=false) const |
std::string | hostPartString () const |
std::string | queryString () const |
G::StringArray | wildcards () const |
Static Public Member Functions | |
static int | domain () noexcept |
static unsigned short | af () noexcept |
static bool | validString (std::string_view, std::string *=nullptr) |
static bool | validStrings (std::string_view, std::string_view, std::string *=nullptr) |
static bool | validPort (unsigned int port) |
static bool | validData (const sockaddr *addr, socklen_t len) |
static bool | format (const std::string &) |
A 'sockaddr' wrapper class for local-domain addresses.
Use "netcat -U" or "socat" to connect to local-domain sockets, eg:
Definition at line 55 of file gaddresslocal.h.
using GNet::AddressLocal::sockaddr_type = sockaddr_un |
Definition at line 58 of file gaddresslocal.h.
|
explicit |
Definition at line 42 of file gaddresslocal_none.cpp.
|
explicit |
Definition at line 57 of file gaddresslocal_none.cpp.
GNet::AddressLocal::AddressLocal | ( | unsigned int | port, |
int | |||
) |
Definition at line 47 of file gaddresslocal_none.cpp.
GNet::AddressLocal::AddressLocal | ( | const sockaddr * | addr, |
socklen_t | len | ||
) |
Definition at line 52 of file gaddresslocal_none.cpp.
sockaddr * GNet::AddressLocal::address | ( | ) |
Definition at line 143 of file gaddresslocal_none.cpp.
const sockaddr * GNet::AddressLocal::address | ( | ) | const |
Definition at line 138 of file gaddresslocal_none.cpp.
|
staticnoexcept |
Definition at line 24 of file gaddresslocal_none.cpp.
unsigned int GNet::AddressLocal::bits | ( | ) | const |
Definition at line 193 of file gaddresslocal_none.cpp.
std::string GNet::AddressLocal::displayString | ( | bool | ipv6_with_scope = false | ) | const |
Definition at line 80 of file gaddresslocal_none.cpp.
|
staticnoexcept |
Definition at line 29 of file gaddresslocal_none.cpp.
|
static |
Definition at line 158 of file gaddresslocal_none.cpp.
std::string GNet::AddressLocal::hostPartString | ( | ) | const |
Definition at line 85 of file gaddresslocal_none.cpp.
bool GNet::AddressLocal::isAny | ( | ) | const |
Definition at line 188 of file gaddresslocal_none.cpp.
bool GNet::AddressLocal::isLinkLocal | ( | ) | const |
Definition at line 173 of file gaddresslocal_none.cpp.
bool GNet::AddressLocal::isLocal | ( | std::string & | ) | const |
Definition at line 163 of file gaddresslocal_none.cpp.
bool GNet::AddressLocal::isLoopback | ( | ) | const |
Definition at line 168 of file gaddresslocal_none.cpp.
bool GNet::AddressLocal::isMulticast | ( | ) | const |
Definition at line 183 of file gaddresslocal_none.cpp.
bool GNet::AddressLocal::isUniqueLocal | ( | ) | const |
Definition at line 178 of file gaddresslocal_none.cpp.
|
noexcept |
Definition at line 148 of file gaddresslocal_none.cpp.
unsigned int GNet::AddressLocal::port | ( | ) | const |
Definition at line 128 of file gaddresslocal_none.cpp.
std::string GNet::AddressLocal::queryString | ( | ) | const |
Definition at line 90 of file gaddresslocal_none.cpp.
bool GNet::AddressLocal::same | ( | const AddressLocal & | other, |
bool | ipv6_compare_with_scope = false |
||
) | const |
Definition at line 118 of file gaddresslocal_none.cpp.
bool GNet::AddressLocal::sameHostPart | ( | const AddressLocal & | other | ) | const |
Definition at line 123 of file gaddresslocal_none.cpp.
unsigned long GNet::AddressLocal::scopeId | ( | unsigned long | default_ = 0UL | ) | const |
Definition at line 133 of file gaddresslocal_none.cpp.
void GNet::AddressLocal::setPort | ( | unsigned int | port | ) |
Definition at line 62 of file gaddresslocal_none.cpp.
void GNet::AddressLocal::setScopeId | ( | unsigned long | ipv6_scope_id | ) |
Definition at line 71 of file gaddresslocal_none.cpp.
bool GNet::AddressLocal::setZone | ( | std::string_view | ipv6_zone_name_or_scope_id | ) |
Definition at line 66 of file gaddresslocal_none.cpp.
|
static |
Definition at line 95 of file gaddresslocal_none.cpp.
|
static |
Definition at line 113 of file gaddresslocal_none.cpp.
|
static |
Definition at line 100 of file gaddresslocal_none.cpp.
|
static |
Definition at line 107 of file gaddresslocal_none.cpp.
G::StringArray GNet::AddressLocal::wildcards | ( | ) | const |
Definition at line 153 of file gaddresslocal_none.cpp.