IBR-DTNSuite
0.12
|
#include <vaddress.h>
Classes | |
class | address_exception |
class | address_not_set |
class | scope_not_set |
class | service_not_set |
Public Member Functions | |
vaddress () | |
vaddress (const int port, sa_family_t family=AF_UNSPEC) | |
vaddress (const std::string &address, const int port, sa_family_t family=AF_UNSPEC) | |
vaddress (const std::string &address, const std::string &service, sa_family_t family=AF_UNSPEC) | |
vaddress (const std::string &address, const std::string &service, const std::string &scope, sa_family_t family=AF_UNSPEC) | |
virtual | ~vaddress () |
bool | isLocal () const |
bool | isAny () const |
sa_family_t | family () const throw (address_exception) |
std::string | scope () const throw (scope_not_set) |
const std::string | address () const throw (address_not_set) |
const std::string | name () const throw (address_exception) |
const std::string | service () const throw (service_not_set) |
void | setService (const uint32_t port) |
void | setService (const std::string &service) |
bool | operator< (const vaddress &dhs) const |
bool | operator!= (const vaddress &obj) const |
bool | operator== (const vaddress &obj) const |
const std::string | toString () const |
Static Public Attributes | |
static const std::string | SCOPE_GLOBAL = "universe" |
static const std::string | SCOPE_LINKLOCAL = "link" |
static const std::string | VADDR_LOCALHOST = "localhost" |
static const std::string | VADDR_ANY = "any" |
Definition at line 37 of file vaddress.h.
ibrcommon::vaddress::vaddress | ( | ) |
Definition at line 47 of file vaddress.cpp.
ibrcommon::vaddress::vaddress | ( | const int | port, |
sa_family_t | family = AF_UNSPEC |
||
) |
Definition at line 52 of file vaddress.cpp.
ibrcommon::vaddress::vaddress | ( | const std::string & | address, |
const int | port, | ||
sa_family_t | family = AF_UNSPEC |
||
) |
Definition at line 60 of file vaddress.cpp.
ibrcommon::vaddress::vaddress | ( | const std::string & | address, |
const std::string & | service, | ||
sa_family_t | family = AF_UNSPEC |
||
) |
Definition at line 68 of file vaddress.cpp.
ibrcommon::vaddress::vaddress | ( | const std::string & | address, |
const std::string & | service, | ||
const std::string & | scope, | ||
sa_family_t | family = AF_UNSPEC |
||
) |
Definition at line 73 of file vaddress.cpp.
|
virtual |
Definition at line 78 of file vaddress.cpp.
const std::string ibrcommon::vaddress::address | ( | ) | const | |
throw | ( | address_not_set | ||
) |
Definition at line 166 of file vaddress.cpp.
References isAny().
Referenced by ibrcommon::__copy_device_address(), dtn::net::IPNDAgent::componentRun(), dtn::net::TCPConvergenceLayer::componentRun(), dtn::net::UDPConvergenceLayer::eventNotify(), dtn::net::TCPConvergenceLayer::eventNotify(), family(), dtn::net::UDPConvergenceLayer::onUpdateBeacon(), dtn::net::TCPConvergenceLayer::onUpdateBeacon(), ibrcommon::LinkMonitor::run(), dtn::net::LOWPANConnection::run(), toString(), and ibrcommon::tcpsocket::up().
sa_family_t ibrcommon::vaddress::family | ( | ) | const | |
throw | ( | address_exception | ||
) |
Definition at line 125 of file vaddress.cpp.
References address(), and service().
Referenced by dtn::api::ApiServer::ApiServer(), dtn::net::UDPDatagramService::bind(), dtn::net::IPNDAgent::componentUp(), dtn::net::UDPConvergenceLayer::componentUp(), dtn::net::UDPDatagramService::getServiceDescription(), dtn::net::IPNDAgent::onAdvertiseBeacon(), dtn::net::UDPConvergenceLayer::onUpdateBeacon(), and dtn::net::TCPConvergenceLayer::onUpdateBeacon().
bool ibrcommon::vaddress::isAny | ( | ) | const |
bool ibrcommon::vaddress::isLocal | ( | ) | const |
Definition at line 104 of file vaddress.cpp.
References name(), and VADDR_LOCALHOST.
const std::string ibrcommon::vaddress::name | ( | ) | const | |
throw | ( | address_exception | ||
) |
Definition at line 173 of file vaddress.cpp.
Referenced by isLocal().
bool ibrcommon::vaddress::operator!= | ( | const vaddress & | obj) | const |
Definition at line 90 of file vaddress.cpp.
bool ibrcommon::vaddress::operator< | ( | const vaddress & | dhs) | const |
Definition at line 82 of file vaddress.cpp.
bool ibrcommon::vaddress::operator== | ( | const vaddress & | obj) | const |
Definition at line 97 of file vaddress.cpp.
std::string ibrcommon::vaddress::scope | ( | ) | const | |
throw | ( | scope_not_set | ||
) |
Definition at line 160 of file vaddress.cpp.
Referenced by dtn::net::UDPConvergenceLayer::onUpdateBeacon(), dtn::net::TCPConvergenceLayer::onUpdateBeacon(), and toString().
const std::string ibrcommon::vaddress::service | ( | ) | const | |
throw | ( | service_not_set | ||
) |
Definition at line 200 of file vaddress.cpp.
Referenced by dtn::net::TCPConvergenceLayer::componentRun(), family(), dtn::net::LOWPANConnection::run(), setService(), toString(), ibrcommon::tcpsocket::up(), and ibrcommon::udpsocket::up().
void ibrcommon::vaddress::setService | ( | const uint32_t | port) |
Definition at line 206 of file vaddress.cpp.
Referenced by dtn::api::ApiServer::ApiServer(), dtn::net::UDPDatagramService::bind(), dtn::net::UDPConvergenceLayer::componentUp(), dtn::net::IPNDAgent::eventNotify(), dtn::net::UDPConvergenceLayer::eventNotify(), and dtn::net::TCPConvergenceLayer::eventNotify().
void ibrcommon::vaddress::setService | ( | const std::string & | service) |
Definition at line 213 of file vaddress.cpp.
References service().
const std::string ibrcommon::vaddress::toString | ( | ) | const |
Definition at line 218 of file vaddress.cpp.
References address(), scope(), and service().
Referenced by dtn::net::IPNDAgent::add(), dtn::net::UDPDatagramService::bind(), ibrcommon::basesocket::bind(), dtn::net::LOWPANConvergenceLayer::componentRun(), dtn::net::IPNDAgent::componentUp(), dtn::net::IPNDAgent::onAdvertiseBeacon(), dtn::net::UDPDatagramService::recvfrom(), and ibrcommon::LinkEvent::toString().
|
static |
Definition at line 68 of file vaddress.h.
Referenced by ibrcommon::PosixLinkManager::getAddressList(), ibrcommon::Win32LinkManager::getAddressList(), dtn::net::UDPConvergenceLayer::onUpdateBeacon(), and dtn::net::TCPConvergenceLayer::onUpdateBeacon().
|
static |
Definition at line 69 of file vaddress.h.
Referenced by ibrcommon::PosixLinkManager::getAddressList(), ibrcommon::Win32LinkManager::getAddressList(), and ibrcommon::rtnl_addr_get_local_vaddress().
|
static |
Definition at line 72 of file vaddress.h.
Referenced by dtn::api::ApiServer::ApiServer(), and isAny().
|
static |
Definition at line 71 of file vaddress.h.
Referenced by dtn::api::ApiServer::ApiServer(), and isLocal().