#include <NetAddress.h>
Public Types | |
enum | SpicaSpecific { ss_none = 0x00, ss_plain = 0x01, ss_host = 0x02, ss_network = 0x03, ss_undecided = 0x04 } |
Public Member Functions | |
bool | equals (const NetAddress &other) const |
bool | equals (const NetAddress &other) const |
const asio::ip::address & | getAddress () const |
const asio::ip::address & | getAddress () const |
BytesPtr | getBytes () const |
BytesPtr | getBytes () const |
unsigned char | getCidr () const |
unsigned char | getCidr () const |
unsigned short | getPort () const |
unsigned short | getPort () const |
unsigned char | getProtocol () const |
unsigned char | getProtocol () const |
SpicaSpecific | getSpicaSpecific () const |
bool | isAny () const |
bool | isEmpty () const |
bool | isHost () const |
bool | isHost () const |
bool | isLoopback () const |
bool | isMulticast () const |
bool | isNetwork () const |
bool | isNetwork () const |
bool | isPlain () const |
bool | isPlain () const |
bool | isSpicaSpecific () const |
bool | isSpicaSpecific () const |
NetAddress () | |
NetAddress (const std::string spec) | |
NetAddress (const NetAddress &other) | |
NetAddress (const BytesPtr bytes) | |
NetAddress (const asio::ip::address &address) | |
NetAddress (SpicaSpecific ss, const asio::ip::tcp::endpoint &endpoint) | |
NetAddress (SpicaSpecific ss, const asio::ip::udp::endpoint &endpoint) | |
NetAddress (const NetAddress &other) | |
bool | operator!= (const NetAddress &other) const |
NetAddress & | operator= (const NetAddress &other) |
NetAddress & | operator= (const NetAddress &other) |
bool | operator== (const NetAddress &other) const |
bool | sameScope (const NetAddress &y) const |
void | setAddress (const asio::ip::address &address) |
void | setAddress (asio::ip::address addr_) |
void | setPort (unsigned short value) |
void | setProtocol (unsigned char value) |
void | setSpicaSpecific (SpicaSpecific value) |
bool | similarLess (const NetAddress &y, bool checkProtocol=false) const |
std::string | str () const |
std::string | str () const |
Static Public Member Functions | |
static NetAddressPtr | create (const std::string spec) throw (Exception) |
static NetAddressPtr | create (SpicaSpecific ss, unsigned char protocol, const asio::ip::address &address, unsigned short port) |
static NetAddressPtr | create (unsigned char protocol, const asio::ip::address &address, unsigned short port) |
static NetAddressPtr | create (SpicaSpecific ss, const asio::ip::tcp::endpoint &endpoint) |
static NetAddressPtr | create (SpicaSpecific ss, const asio::ip::udp::endpoint &endpoint) |
static NetAddressPtr | create (const BytesPtr bytes) throw () |
static NetAddressPtr | create (const char *data, size_t size) throw () |
static NetAddress | create (const std::string spec) throw (Exception) |
static NetAddress | create (unsigned char protocol, asio::ip::address address, unsigned short port) |
static NetAddress | create (const BytesPtr bytes) throw () |
static NetAddress | create (const unsigned char *data, size_t size) throw () |
static NetAddressPtr | createHost (unsigned char protocol, const asio::ip::address &address, unsigned short port) |
static NetAddress | createHost (unsigned char protocol, asio::ip::address address, unsigned short port) |
static NetAddressPtr | createNetwork (unsigned char protocol, const asio::ip::address &address, unsigned char cidr) |
static NetAddress | createNetwork (unsigned char protocol, asio::ip::address address, unsigned char cidr) |
static NetAddressPtr | createPlain (unsigned char protocol, const asio::ip::address &address) |
static NetAddress | createPlain (unsigned char protocol, asio::ip::address address) |
static std::string | protocol_to_string (int protocol) |
static std::string | protocol_to_string (int protocol) |
static unsigned char | string_to_protocol (const std::string protocol) |
static unsigned char | string_to_protocol (const std::string protocol) |
Protected Member Functions | |
NetAddress (SpicaSpecific spicaSpecific, unsigned char protocol, const asio::ip::address &address, unsigned short port, unsigned char cidr) | |
NetAddress () | |
NetAddress (SpicaSpecific spicaSpecific, unsigned char protocol, asio::ip::address address, unsigned short port, unsigned char cidr) | |
void | parse (const char *data, size_t size) throw () |
void | parse (const unsigned char *data, size_t size) throw () |
Private Attributes | |
asio::ip::address | address |
unsigned char | cidr |
bool | empty |
unsigned short | port |
unsigned char | protocol |
SpicaSpecific | spicaSpecific |
Friends | |
bool | operator!= (const NetAddress &one, const NetAddress &other) |
bool | operator< (const NetAddress &one, const NetAddress &other) |
bool | operator== (const NetAddress &one, const NetAddress &other) |
Definition at line 52 of file include/NetAddress.h.
Definition at line 48 of file src/net/NetAddress.h.
castor::net::NetAddress::NetAddress | ( | SpicaSpecific | spicaSpecific, |
unsigned char | protocol, | ||
const asio::ip::address & | address, | ||
unsigned short | port, | ||
unsigned char | cidr | ||
) | [protected] |
Definition at line 5 of file NetAddress.cpp.
Definition at line 13 of file NetAddress.cpp.
castor::net::NetAddress::NetAddress | ( | const std::string | spec | ) |
Definition at line 19 of file NetAddress.cpp.
castor::net::NetAddress::NetAddress | ( | const NetAddress & | other | ) |
Definition at line 256 of file NetAddress.cpp.
castor::net::NetAddress::NetAddress | ( | const BytesPtr | bytes | ) |
Definition at line 263 of file NetAddress.cpp.
castor::net::NetAddress::NetAddress | ( | const asio::ip::address & | address | ) |
Definition at line 267 of file NetAddress.cpp.
castor::net::NetAddress::NetAddress | ( | SpicaSpecific | ss, |
const asio::ip::tcp::endpoint & | endpoint | ||
) |
Definition at line 273 of file NetAddress.cpp.
castor::net::NetAddress::NetAddress | ( | SpicaSpecific | ss, |
const asio::ip::udp::endpoint & | endpoint | ||
) |
castor::net::NetAddress::NetAddress | ( | ) | [inline, protected] |
Definition at line 67 of file src/net/NetAddress.h.
castor::net::NetAddress::NetAddress | ( | SpicaSpecific | spicaSpecific, |
unsigned char | protocol, | ||
asio::ip::address | address, | ||
unsigned short | port, | ||
unsigned char | cidr | ||
) | [inline, protected] |
Definition at line 76 of file src/net/NetAddress.h.
castor::net::NetAddress::NetAddress | ( | const NetAddress & | other | ) | [inline] |
Definition at line 243 of file src/net/NetAddress.h.
NetAddressPtr castor::net::NetAddress::create | ( | const std::string | spec | ) | throw (Exception) [static] |
Definition at line 196 of file NetAddress.cpp.
NetAddressPtr castor::net::NetAddress::create | ( | SpicaSpecific | ss, |
unsigned char | protocol, | ||
const asio::ip::address & | address, | ||
unsigned short | port | ||
) | [static] |
Definition at line 200 of file NetAddress.cpp.
NetAddressPtr castor::net::NetAddress::create | ( | unsigned char | protocol, |
const asio::ip::address & | address, | ||
unsigned short | port | ||
) | [static] |
Definition at line 206 of file NetAddress.cpp.
NetAddressPtr castor::net::NetAddress::create | ( | SpicaSpecific | ss, |
const asio::ip::tcp::endpoint & | endpoint | ||
) | [static] |
Definition at line 230 of file NetAddress.cpp.
static NetAddressPtr castor::net::NetAddress::create | ( | SpicaSpecific | ss, |
const asio::ip::udp::endpoint & | endpoint | ||
) | [static] |
NetAddressPtr castor::net::NetAddress::create | ( | const BytesPtr | bytes | ) | throw () [static] |
Definition at line 244 of file NetAddress.cpp.
NetAddressPtr castor::net::NetAddress::create | ( | const char * | data, |
size_t | size | ||
) | throw () [static] |
Definition at line 250 of file NetAddress.cpp.
static NetAddress castor::net::NetAddress::create | ( | const std::string | spec | ) | throw (Exception) [inline, static] |
Definition at line 88 of file src/net/NetAddress.h.
static NetAddress castor::net::NetAddress::create | ( | unsigned char | protocol, |
asio::ip::address | address, | ||
unsigned short | port | ||
) | [inline, static] |
Definition at line 215 of file src/net/NetAddress.h.
static NetAddress castor::net::NetAddress::create | ( | const BytesPtr | bytes | ) | throw () [inline, static] |
Definition at line 231 of file src/net/NetAddress.h.
static NetAddress castor::net::NetAddress::create | ( | const unsigned char * | data, |
size_t | size | ||
) | throw () [inline, static] |
Definition at line 237 of file src/net/NetAddress.h.
NetAddressPtr castor::net::NetAddress::createHost | ( | unsigned char | protocol, |
const asio::ip::address & | address, | ||
unsigned short | port | ||
) | [static] |
Definition at line 218 of file NetAddress.cpp.
static NetAddress castor::net::NetAddress::createHost | ( | unsigned char | protocol, |
asio::ip::address | address, | ||
unsigned short | port | ||
) | [inline, static] |
Definition at line 223 of file src/net/NetAddress.h.
NetAddressPtr castor::net::NetAddress::createNetwork | ( | unsigned char | protocol, |
const asio::ip::address & | address, | ||
unsigned char | cidr | ||
) | [static] |
Definition at line 224 of file NetAddress.cpp.
static NetAddress castor::net::NetAddress::createNetwork | ( | unsigned char | protocol, |
asio::ip::address | address, | ||
unsigned char | cidr | ||
) | [inline, static] |
Definition at line 227 of file src/net/NetAddress.h.
NetAddressPtr castor::net::NetAddress::createPlain | ( | unsigned char | protocol, |
const asio::ip::address & | address | ||
) | [static] |
Definition at line 212 of file NetAddress.cpp.
static NetAddress castor::net::NetAddress::createPlain | ( | unsigned char | protocol, |
asio::ip::address | address | ||
) | [inline, static] |
Definition at line 219 of file src/net/NetAddress.h.
bool castor::net::NetAddress::equals | ( | const NetAddress & | other | ) | const |
Definition at line 567 of file NetAddress.cpp.
bool castor::net::NetAddress::equals | ( | const NetAddress & | other | ) | const [inline] |
Definition at line 460 of file src/net/NetAddress.h.
const asio::ip::address & castor::net::NetAddress::getAddress | ( | ) | const |
Definition at line 381 of file NetAddress.cpp.
const asio::ip::address& castor::net::NetAddress::getAddress | ( | ) | const [inline] |
Definition at line 274 of file src/net/NetAddress.h.
BytesPtr castor::net::NetAddress::getBytes | ( | ) | const |
Definition at line 385 of file NetAddress.cpp.
BytesPtr castor::net::NetAddress::getBytes | ( | ) | const [inline] |
Definition at line 283 of file src/net/NetAddress.h.
unsigned char castor::net::NetAddress::getCidr | ( | ) | const |
Definition at line 370 of file NetAddress.cpp.
unsigned char castor::net::NetAddress::getCidr | ( | ) | const [inline] |
Definition at line 267 of file src/net/NetAddress.h.
unsigned short castor::net::NetAddress::getPort | ( | ) | const |
Definition at line 360 of file NetAddress.cpp.
unsigned short castor::net::NetAddress::getPort | ( | ) | const [inline] |
Definition at line 260 of file src/net/NetAddress.h.
unsigned char castor::net::NetAddress::getProtocol | ( | ) | const |
Definition at line 352 of file NetAddress.cpp.
unsigned char castor::net::NetAddress::getProtocol | ( | ) | const [inline] |
Definition at line 258 of file src/net/NetAddress.h.
Definition at line 291 of file NetAddress.cpp.
bool castor::net::NetAddress::isAny | ( | ) | const |
Definition at line 311 of file NetAddress.cpp.
bool castor::net::NetAddress::isEmpty | ( | ) | const |
Definition at line 322 of file NetAddress.cpp.
bool castor::net::NetAddress::isHost | ( | ) | const |
Definition at line 303 of file NetAddress.cpp.
bool castor::net::NetAddress::isHost | ( | ) | const [inline] |
Definition at line 255 of file src/net/NetAddress.h.
bool castor::net::NetAddress::isLoopback | ( | ) | const |
Definition at line 326 of file NetAddress.cpp.
bool castor::net::NetAddress::isMulticast | ( | ) | const |
Definition at line 337 of file NetAddress.cpp.
bool castor::net::NetAddress::isNetwork | ( | ) | const |
Definition at line 307 of file NetAddress.cpp.
bool castor::net::NetAddress::isNetwork | ( | ) | const [inline] |
Definition at line 256 of file src/net/NetAddress.h.
bool castor::net::NetAddress::isPlain | ( | ) | const |
Definition at line 299 of file NetAddress.cpp.
bool castor::net::NetAddress::isPlain | ( | ) | const [inline] |
Definition at line 254 of file src/net/NetAddress.h.
bool castor::net::NetAddress::isSpicaSpecific | ( | ) | const |
Definition at line 295 of file NetAddress.cpp.
bool castor::net::NetAddress::isSpicaSpecific | ( | ) | const [inline] |
Definition at line 253 of file src/net/NetAddress.h.
bool castor::net::NetAddress::operator!= | ( | const NetAddress & | other | ) | const [inline] |
Definition at line 492 of file src/net/NetAddress.h.
NetAddress & castor::net::NetAddress::operator= | ( | const NetAddress & | other | ) |
Definition at line 571 of file NetAddress.cpp.
NetAddress& castor::net::NetAddress::operator= | ( | const NetAddress & | other | ) | [inline] |
Definition at line 464 of file src/net/NetAddress.h.
bool castor::net::NetAddress::operator== | ( | const NetAddress & | other | ) | const [inline] |
Definition at line 479 of file src/net/NetAddress.h.
void castor::net::NetAddress::parse | ( | const char * | data, |
size_t | size | ||
) | throw () [protected] |
Definition at line 758 of file NetAddress.cpp.
void castor::net::NetAddress::parse | ( | const unsigned char * | data, |
size_t | size | ||
) | throw () [inline, protected] |
Definition at line 498 of file src/net/NetAddress.h.
std::string castor::net::NetAddress::protocol_to_string | ( | int | protocol | ) | [static] |
Definition at line 544 of file NetAddress.cpp.
static std::string castor::net::NetAddress::protocol_to_string | ( | int | protocol | ) | [inline, static] |
Definition at line 437 of file src/net/NetAddress.h.
bool castor::net::NetAddress::sameScope | ( | const NetAddress & | y | ) | const |
Definition at line 662 of file NetAddress.cpp.
void castor::net::NetAddress::setAddress | ( | const asio::ip::address & | address | ) |
Definition at line 377 of file NetAddress.cpp.
void castor::net::NetAddress::setAddress | ( | asio::ip::address | addr_ | ) | [inline] |
Definition at line 278 of file src/net/NetAddress.h.
void castor::net::NetAddress::setPort | ( | unsigned short | value | ) |
Definition at line 356 of file NetAddress.cpp.
void castor::net::NetAddress::setProtocol | ( | unsigned char | value | ) |
Definition at line 348 of file NetAddress.cpp.
void castor::net::NetAddress::setSpicaSpecific | ( | SpicaSpecific | value | ) |
Definition at line 287 of file NetAddress.cpp.
bool castor::net::NetAddress::similarLess | ( | const NetAddress & | y, |
bool | checkProtocol = false |
||
) | const |
Definition at line 626 of file NetAddress.cpp.
std::string castor::net::NetAddress::str | ( | ) | const |
Definition at line 488 of file NetAddress.cpp.
std::string castor::net::NetAddress::str | ( | ) | const [inline] |
Definition at line 381 of file src/net/NetAddress.h.
unsigned char castor::net::NetAddress::string_to_protocol | ( | const std::string | protocol | ) | [static] |
Definition at line 554 of file NetAddress.cpp.
static unsigned char castor::net::NetAddress::string_to_protocol | ( | const std::string | protocol | ) | [inline, static] |
Definition at line 447 of file src/net/NetAddress.h.
bool operator!= | ( | const NetAddress & | one, |
const NetAddress & | other | ||
) | [friend] |
Definition at line 599 of file NetAddress.cpp.
bool operator< | ( | const NetAddress & | one, |
const NetAddress & | other | ||
) | [friend] |
Definition at line 603 of file NetAddress.cpp.
bool operator== | ( | const NetAddress & | one, |
const NetAddress & | other | ||
) | [friend] |
Definition at line 586 of file NetAddress.cpp.
Definition at line 60 of file include/NetAddress.h.
unsigned char castor::net::NetAddress::cidr [private] |
Definition at line 59 of file include/NetAddress.h.
bool castor::net::NetAddress::empty [private] |
Definition at line 61 of file include/NetAddress.h.
unsigned short castor::net::NetAddress::port [private] |
Definition at line 58 of file include/NetAddress.h.
unsigned char castor::net::NetAddress::protocol [private] |
Definition at line 57 of file include/NetAddress.h.
Definition at line 56 of file include/NetAddress.h.