#include <Addr.h>
Inheritance diagram for ACE_Addr:
Public Member Functions | |
ACE_Addr (int type=-1, int size=-1) | |
Initializes instance variables. | |
virtual | ~ACE_Addr (void) |
Destructor. | |
int | get_size (void) const |
Return the size of the address. | |
void | set_size (int size) |
Sets the size of the address. | |
int | get_type (void) const |
Get the type of the address. | |
void | set_type (int type) |
Set the type of the address. | |
virtual void * | get_addr (void) const |
Return a pointer to the address. | |
virtual void | set_addr (void *, int len) |
Set a pointer to the address. | |
bool | operator== (const ACE_Addr &sap) const |
Check for address equality. | |
bool | operator!= (const ACE_Addr &sap) const |
Check for address inequality. | |
void | base_set (int type, int size) |
Initializes instance variables. | |
virtual unsigned long | hash (void) const |
void | dump (void) const |
Dump the state of an object. | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Static Public Attributes | |
static const ACE_Addr | sap_any |
Wild-card address. | |
Protected Attributes | |
int | addr_type_ |
e.g., AF_UNIX, AF_INET, AF_SPIPE, etc. | |
int | addr_size_ |
Number of bytes in the address. |
Definition at line 32 of file Addr.h.
ACE_Addr::ACE_Addr | ( | int | type = -1 , |
|
int | size = -1 | |||
) |
Initializes instance variables.
ACE_Addr::~ACE_Addr | ( | void | ) | [virtual] |
void ACE_Addr::base_set | ( | int | type, | |
int | size | |||
) |
Initializes instance variables.
Definition at line 54 of file Addr.cpp.
References addr_size_, and addr_type_.
Referenced by ACE_UNIX_Addr::set(), ACE_SPIPE_Addr::set(), ACE_INET_Addr::set(), ACE_FILE_Addr::set(), ACE_DEV_Addr::set(), ACE_UNIX_Addr::set_addr(), ACE_SPIPE_Addr::set_addr(), and ACE_INET_Addr::set_address().
00055 { 00056 this->addr_type_ = type; 00057 this->addr_size_ = size; 00058 }
void ACE_Addr::dump | ( | void | ) | const |
Dump the state of an object.
Reimplemented in ACE_DEV_Addr, ACE_FILE_Addr, ACE_INET_Addr, ACE_SPIPE_Addr, and ACE_UNIX_Addr.
Definition at line 61 of file Addr.cpp.
References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_TEXT, ACE_TRACE, and LM_DEBUG.
00062 { 00063 #if defined (ACE_HAS_DUMP) 00064 ACE_TRACE ("ACE_Addr::dump"); 00065 00066 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); 00067 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("addr_type_ = %d"), this->addr_type_)); 00068 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\naddr_size_ = %d"), this->addr_size_)); 00069 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); 00070 #endif /* ACE_HAS_DUMP */ 00071 }
void * ACE_Addr::get_addr | ( | void | ) | const [virtual] |
Return a pointer to the address.
Reimplemented in ACE_DEV_Addr, ACE_FILE_Addr, ACE_INET_Addr, ACE_SPIPE_Addr, and ACE_UNIX_Addr.
Definition at line 41 of file Addr.cpp.
Referenced by ACE_SOCK_SEQPACK_Acceptor::accept(), ACE_SOCK_Acceptor::accept(), ACE_LSOCK_Acceptor::accept(), ACE_SOCK_SEQPACK_Connector::complete(), ACE_SOCK_Connector::complete(), ACE_SOCK_SEQPACK_Connector::connect(), ACE_SOCK_Connector::connect(), ACE_SOCK::get_local_addr(), ACE_SOCK::get_remote_addr(), ACE_SOCK_CODgram::open(), ACE_SOCK_Dgram::recv(), ACE_SOCK_Dgram_Bcast::send(), ACE_SOCK_Dgram::send(), ACE_SOCK_SEQPACK_Connector::shared_connect_start(), ACE_SOCK_Connector::shared_connect_start(), ACE_SOCK_SEQPACK_Acceptor::shared_open(), ACE_SOCK_Dgram::shared_open(), and ACE_SOCK_Acceptor::shared_open().
ACE_INLINE int ACE_Addr::get_size | ( | void | ) | const |
Return the size of the address.
Definition at line 26 of file Addr.inl.
References addr_size_.
Referenced by ACE_SOCK_SEQPACK_Acceptor::accept(), ACE_SOCK_Acceptor::accept(), ACE_LSOCK_Acceptor::accept(), ACE::bind_port(), ACE_SOCK_SEQPACK_Connector::complete(), ACE_SOCK_Connector::complete(), ACE_SOCK_SEQPACK_Connector::connect(), ACE_SOCK_Connector::connect(), ACE_SOCK::get_local_addr(), ACE_SOCK::get_remote_addr(), ACE_INET_Addr::is_ip_equal(), ACE_SOCK_CODgram::open(), ACE_INET_Addr::operator==(), ACE_SOCK_Dgram::recv(), ACE_SOCK_Dgram_Bcast::send(), ACE_SOCK_Dgram::send(), ACE_UNIX_Addr::set(), ACE_SPIPE_Addr::set(), ACE_INET_Addr::set(), ACE_FILE_Addr::set(), ACE_DEV_Addr::set(), ACE_SOCK_SEQPACK_Connector::shared_connect_start(), ACE_SOCK_Connector::shared_connect_start(), ACE_SOCK_SEQPACK_Acceptor::shared_open(), ACE_SOCK_Dgram::shared_open(), and ACE_SOCK_Acceptor::shared_open().
00027 { 00028 return this->addr_size_; 00029 }
ACE_INLINE int ACE_Addr::get_type | ( | void | ) | const |
Get the type of the address.
Definition at line 42 of file Addr.inl.
References addr_type_.
Referenced by ACE_SOCK_SEQPACK_Connector::connect(), ACE_SOCK_Connector::connect(), ACE::get_fqdn(), ACE_INET_Addr::get_host_name_i(), ACE_INET_Addr::is_ip_equal(), ACE_SOCK_SEQPACK_Acceptor::open(), ACE_SOCK_Dgram_Mcast::open(), ACE_SOCK_Dgram::open(), ACE_SOCK_CODgram::open(), ACE_SOCK_Acceptor::open(), ACE_SOCK_Dgram_Mcast::open_i(), ACE_INET_Addr::operator<(), ACE_INET_Addr::operator==(), ACE_UNIX_Addr::set(), ACE_SPIPE_Addr::set(), ACE_INET_Addr::set(), ACE_FILE_Addr::set(), ACE_DEV_Addr::set(), ACE_SOCK_Dgram_Mcast::subscribe_i(), ACE_SOCK_Dgram_Mcast::subscribe_ifs(), ACE_SOCK_Dgram_Mcast::unsubscribe_i(), and ACE_SOCK_Dgram_Mcast::unsubscribe_ifs().
00043 { 00044 return this->addr_type_; 00045 }
ACE_INLINE unsigned long ACE_Addr::hash | ( | void | ) | const [virtual] |
Returns a hash value. This should be overwritten by a subclass that can produce a better hash value.
Reimplemented in ACE_INET_Addr, and ACE_UNIX_Addr.
Definition at line 56 of file Addr.inl.
ACE_INLINE bool ACE_Addr::operator!= | ( | const ACE_Addr & | sap | ) | const |
Check for address inequality.
Definition at line 17 of file Addr.inl.
References addr_size_, and addr_type_.
00018 { 00019 return (sap.addr_type_ != this->addr_type_ || 00020 sap.addr_size_ != this->addr_size_ ); 00021 }
ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE bool ACE_Addr::operator== | ( | const ACE_Addr & | sap | ) | const |
Check for address equality.
Definition at line 10 of file Addr.inl.
References addr_size_, and addr_type_.
00011 { 00012 return (sap.addr_type_ == this->addr_type_ && 00013 sap.addr_size_ == this->addr_size_ ); 00014 }
void ACE_Addr::set_addr | ( | void * | , | |
int | len | |||
) | [virtual] |
Set a pointer to the address.
Reimplemented in ACE_INET_Addr, ACE_SPIPE_Addr, and ACE_UNIX_Addr.
Definition at line 47 of file Addr.cpp.
ACE_INLINE void ACE_Addr::set_size | ( | int | size | ) |
Sets the size of the address.
Definition at line 34 of file Addr.inl.
References addr_size_.
Referenced by ACE_SPIPE_Acceptor::accept(), ACE_SOCK_SEQPACK_Acceptor::accept(), ACE_SOCK_Acceptor::accept(), ACE_LSOCK_Acceptor::accept(), ACE_SOCK::get_local_addr(), ACE_SOCK_SEQPACK_Association::get_local_addrs(), ACE_SOCK::get_remote_addr(), ACE_SOCK_SEQPACK_Association::get_remote_addrs(), ACE_SOCK_Dgram::recv(), ACE_INET_Addr::set(), and ACE_INET_Addr::set_address().
00035 { 00036 this->addr_size_ = size; 00037 }
ACE_INLINE void ACE_Addr::set_type | ( | int | type | ) |
Set the type of the address.
Definition at line 50 of file Addr.inl.
References addr_type_.
Referenced by ACE_SOCK_SEQPACK_Acceptor::accept(), ACE_SOCK_Acceptor::accept(), ACE_SOCK::get_local_addr(), ACE_SOCK_SEQPACK_Association::get_local_addrs(), ACE_SOCK::get_remote_addr(), ACE_SOCK_SEQPACK_Association::get_remote_addrs(), ACE_SOCK_Dgram::recv(), ACE_INET_Addr::set(), and ACE_INET_Addr::set_addr().
00051 { 00052 this->addr_type_ = type; 00053 }
Declare the dynamic allocation hooks.
Reimplemented in ACE_DEV_Addr, ACE_FILE_Addr, ACE_INET_Addr, ACE_SPIPE_Addr, and ACE_UNIX_Addr.
int ACE_Addr::addr_size_ [protected] |
Number of bytes in the address.
Definition at line 92 of file Addr.h.
Referenced by base_set(), get_size(), operator!=(), operator==(), and set_size().
int ACE_Addr::addr_type_ [protected] |
e.g., AF_UNIX, AF_INET, AF_SPIPE, etc.
Definition at line 89 of file Addr.h.
Referenced by base_set(), get_type(), operator!=(), operator==(), and set_type().
const ACE_Addr ACE_Addr::sap_any [static] |
Wild-card address.
Definition at line 75 of file Addr.h.
Referenced by ACE_FILE_Connector::connect(), ACE_SOCK_SEQPACK_Acceptor::open(), ACE_SOCK_Dgram::open(), ACE_SOCK_CODgram::open(), ACE_SOCK_Acceptor::open(), ACE_Pipe::open(), ACE_SOCK_SEQPACK_Connector::shared_connect_start(), ACE_SOCK_Connector::shared_connect_start(), ACE_SOCK_SEQPACK_Acceptor::shared_open(), ACE_SOCK_Dgram::shared_open(), and ACE_SOCK_Acceptor::shared_open().