IBR-DTNSuite
0.8
|
#include <vaddress.h>
Classes | |
class | address_not_set |
class | family_not_set |
Public Types | |
enum | Family { VADDRESS_UNSPEC = AF_UNSPEC, VADDRESS_INET = AF_INET, VADDRESS_INET6 = AF_INET6, VADDRESS_UNIX = AF_UNIX } |
Public Member Functions | |
vaddress (const std::string &address) | |
vaddress (const Family &family=VADDRESS_INET) | |
vaddress (const Family &family, const std::string &address, const bool broadcast=false) | |
vaddress (const Family &family, const std::string &address, const int iface, const bool broadcast=false) | |
virtual | ~vaddress () |
Family | getFamily () const |
const std::string | get (bool internal=true) const |
bool | isBroadcast () const |
bool | isMulticast () const |
bool | operator!= (const vaddress &obj) const |
bool | operator== (const vaddress &obj) const |
const std::string | toString () const |
struct addrinfo * | addrinfo (struct addrinfo *hints) const |
struct addrinfo * | addrinfo (struct addrinfo *hints, unsigned int port) const |
Static Public Member Functions | |
static const std::string | strip_netmask (const std::string &data) |
Definition at line 17 of file vaddress.h.
Definition at line 34 of file vaddress.h.
ibrcommon::vaddress::vaddress | ( | const std::string & | address | ) |
Definition at line 32 of file vaddress.cpp.
References ibrcommon::File::exists(), VADDRESS_INET, VADDRESS_INET6, and VADDRESS_UNIX.
ibrcommon::vaddress::vaddress | ( | const Family & | family = VADDRESS_INET | ) |
Definition at line 27 of file vaddress.cpp.
ibrcommon::vaddress::vaddress | ( | const Family & | family, |
const std::string & | address, | ||
const bool | broadcast = false |
||
) |
Definition at line 85 of file vaddress.cpp.
ibrcommon::vaddress::vaddress | ( | const Family & | family, |
const std::string & | address, | ||
const int | iface, | ||
const bool | broadcast = false |
||
) |
Definition at line 80 of file vaddress.cpp.
ibrcommon::vaddress::~vaddress | ( | ) | [virtual] |
Definition at line 90 of file vaddress.cpp.
struct addrinfo * ibrcommon::vaddress::addrinfo | ( | struct addrinfo * | hints | ) | const [read] |
Definition at line 149 of file vaddress.cpp.
References VADDRESS_UNSPEC.
Referenced by addrinfo(), ibrcommon::udpsocket::send(), and ibrcommon::vsocket::sendto().
struct addrinfo * ibrcommon::vaddress::addrinfo | ( | struct addrinfo * | hints, |
unsigned int | port | ||
) | const [read] |
Definition at line 164 of file vaddress.cpp.
References addrinfo(), and VADDRESS_UNSPEC.
const std::string ibrcommon::vaddress::get | ( | bool | internal = true | ) | const |
Definition at line 109 of file vaddress.cpp.
References ibrcommon::LinkManager::getInstance(), and ibrcommon::LinkManager::getInterface().
Referenced by ibrcommon::MulticastSocket::joinGroup(), ibrcommon::MulticastSocket::leaveGroup(), and ibrcommon::MulticastSocket::setInterface().
Definition at line 104 of file vaddress.cpp.
Referenced by ibrcommon::MulticastSocket::joinGroup(), ibrcommon::MulticastSocket::leaveGroup(), ibrcommon::vsocket::sendto(), and ibrcommon::MulticastSocket::setInterface().
bool ibrcommon::vaddress::isBroadcast | ( | ) | const |
Definition at line 144 of file vaddress.cpp.
Referenced by ibrcommon::udpsocket::send().
bool ibrcommon::vaddress::isMulticast | ( | ) | const |
Checks whether a given address is a multicast address or not
address | The address to check. |
Definition at line 187 of file vaddress.cpp.
References bzero.
Referenced by __daemon_run(), dtn::net::IPNDAgent::componentUp(), dtn::net::IPNDAgent::eventNotify(), dtn::net::IPNDAgent::IPNDAgent(), and ibrcommon::udpsocket::send().
bool ibrcommon::vaddress::operator!= | ( | const vaddress & | obj | ) | const |
Definition at line 130 of file vaddress.cpp.
bool ibrcommon::vaddress::operator== | ( | const vaddress & | obj | ) | const |
Definition at line 137 of file vaddress.cpp.
const std::string ibrcommon::vaddress::strip_netmask | ( | const std::string & | data | ) | [static] |
Definition at line 95 of file vaddress.cpp.
Referenced by ibrcommon::add_addr_to_list().
const std::string ibrcommon::vaddress::toString | ( | ) | const |
Definition at line 208 of file vaddress.cpp.
References ibrcommon::LinkManager::getInstance(), and ibrcommon::LinkManager::getInterface().
Referenced by ibrcommon::vsocket::eventNotify(), dtn::net::IPNDAgent::IPNDAgent(), ibrcommon::MulticastSocket::joinGroup(), ibrcommon::udpsocket::send(), ibrcommon::vsocket::sendto(), ibrcommon::NetLink3ManagerEvent::toString(), and ibrcommon::NetLinkManagerEvent::toString().