#include <SPIPE_Addr.h>
Inheritance diagram for ACE_SPIPE_Addr:


Public Member Functions | |
| ACE_SPIPE_Addr (void) | |
| Default constructor.   | |
| ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa) | |
| Copy constructor.   | |
| ACE_SPIPE_Addr (const ACE_TCHAR *rendezvous_point, gid_t=0, uid_t=0) | |
| int | set (const ACE_SPIPE_Addr &sa) | 
| Acts like a copy constructor...   | |
| int | set (const ACE_TCHAR *rendezvous_point, gid_t=0, uid_t=0) | 
| virtual void * | get_addr (void) const | 
| Return a pointer to the address.   | |
| virtual void | set_addr (void *addr, int len) | 
| Set a pointer to the underlying network address.   | |
| virtual int | addr_to_string (ACE_TCHAR *addr, size_t) const | 
| Transform the current address into string format.   | |
| virtual int | string_to_addr (const ACE_TCHAR *addr) | 
| Transform the string into the current addressing format.   | |
| bool | operator== (const ACE_SPIPE_Addr &SAP) const | 
| Check for equality.   | |
| bool | operator!= (const ACE_SPIPE_Addr &SAP) const | 
| Check for inequality.   | |
| const ACE_TCHAR * | get_path_name (void) const | 
| Pathname of rendezvous point in file system.   | |
| uid_t | user_id (void) const | 
| Get user id.   | |
| void | user_id (uid_t uid) | 
| Set user id.   | |
| void | group_id (gid_t gid) | 
| Set group ids.   | |
| gid_t | group_id (void) const | 
| Get group ids.   | |
| void | dump (void) const | 
| Dump the state of an object.   | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks.   | |
Private Attributes | |
| ACE_SPIPE_Addr::SPIPE_Addr | SPIPE_addr_ | 
| Contains security attributes.   | |
Definition at line 35 of file SPIPE_Addr.h.
      
  | 
  
| 
 Default constructor. 
 Definition at line 48 of file SPIPE_Addr.cpp. References AF_SPIPE, and ACE_OS::memset(). 
 00049 : ACE_Addr (AF_SPIPE, sizeof this->SPIPE_addr_) 00050 { 00051 (void) ACE_OS::memset ((void *) &this->SPIPE_addr_, 00052 0, 00053 sizeof this->SPIPE_addr_); 00054 }  | 
  
      
  | 
  
| 
 Copy constructor. 
 Definition at line 91 of file SPIPE_Addr.cpp. References AF_SPIPE, and set(). 
  | 
  
      
  | 
  ||||||||||||||||
| 
 Create a ACE_SPIPE_Addr from a rendezvous point in the file system. Definition at line 159 of file SPIPE_Addr.cpp. References ACE_TCHAR, AF_SPIPE, gid_t, set(), and uid_t. 
  | 
  
      
  | 
  ||||||||||||
| 
 Transform the current address into string format. 
 Definition at line 57 of file SPIPE_Addr.cpp. References ACE_TCHAR, and ACE_OS::strsncpy(). 
 00058 {
00059   ACE_OS::strsncpy (s,
00060                     this->SPIPE_addr_.rendezvous_,
00061                     len);
00062   return 0;
00063 }
 | 
  
      
  | 
  
| 
 Dump the state of an object. 
 Reimplemented from ACE_Addr. Definition at line 19 of file SPIPE_Addr.cpp. 
 00020 {
00021 #if defined (ACE_HAS_DUMP)
00022 #endif /* ACE_HAS_DUMP */
00023 }
 | 
  
      
  | 
  
| 
 Return a pointer to the address. 
 Reimplemented from ACE_Addr. Definition at line 40 of file SPIPE_Addr.cpp. References SPIPE_addr_. 
 00041 {
00042   return (void *) &this->SPIPE_addr_;
00043 }
 | 
  
      
  | 
  
| 
 Pathname of rendezvous point in file system. 
 Definition at line 30 of file SPIPE_Addr.inl. References ACE_SPIPE_Addr::SPIPE_Addr::rendezvous_, and SPIPE_addr_. Referenced by ACE_SPIPE_Connector::ACE_SPIPE_Connector(), ACE_SPIPE_Connector::connect(), and ACE_SPIPE_Acceptor::create_new_instance(). 
 00031 {
00032   return this->SPIPE_addr_.rendezvous_;
00033 }
 | 
  
      
  | 
  
| 
 Get group ids. 
 Definition at line 48 of file SPIPE_Addr.inl. References ACE_SPIPE_Addr::SPIPE_Addr::gid_, and SPIPE_addr_. 
 00049 {
00050   return this->SPIPE_addr_.gid_;
00051 }
 | 
  
      
  | 
  
| 
 Set group ids. 
 Definition at line 54 of file SPIPE_Addr.inl. References ACE_SPIPE_Addr::SPIPE_Addr::gid_, gid_t, and SPIPE_addr_. Referenced by ACE_SPIPE_Acceptor::accept(). 
 00055 {
00056   this->SPIPE_addr_.gid_ = gid;
00057 }
 | 
  
      
  | 
  
| 
 Check for inequality. 
 Definition at line 22 of file SPIPE_Addr.inl. 
 00023 {
00024   return !((*this) == sap);     // This is lazy, of course... ;-)
00025 }
 | 
  
      
  | 
  
| 
 Check for equality. 
 Definition at line 13 of file SPIPE_Addr.inl. References ACE_SPIPE_Addr::SPIPE_Addr::rendezvous_, SPIPE_addr_, and ACE_OS::strcmp(). 
 00014 {
00015   return ACE_OS::strcmp (this->SPIPE_addr_.rendezvous_,
00016                          sap.SPIPE_addr_.rendezvous_    ) == 0;
00017 }
 | 
  
      
  | 
  ||||||||||||||||
| 
 Create a ACE_SPIPE_Addr from a rendezvous point in the file system. Definition at line 98 of file SPIPE_Addr.cpp. References ACE_ALLOCATOR_RETURN, ACE_TCHAR, ACE_TEXT, AF_SPIPE, ACE_Addr::base_set(), ACE_OS::free(), ACE_OS::getgid(), ACE_OS::getuid(), ACE_SPIPE_Addr::SPIPE_Addr::gid_, gid_t, SPIPE_addr_, ACE_OS::strcat(), ACE_OS::strchr(), ACE_OS::strcpy(), ACE_OS::strlen(), ACE_OS::strncmp(), ACE_OS::strsncpy(), ACE_SPIPE_Addr::SPIPE_Addr::uid_, and uid_t. 
 00101 {
00102   int len = sizeof (this->SPIPE_addr_.uid_);
00103   len += sizeof (this->SPIPE_addr_.gid_);
00104 
00105 #if defined (ACE_WIN32)
00106   const ACE_TCHAR *colonp = ACE_OS::strchr (addr, ':');
00107   ACE_TCHAR temp[BUFSIZ];
00108 
00109   if (colonp == 0) // Assume it's a local name.
00110     {
00111       ACE_OS::strcpy (temp, ACE_TEXT ( "\\\\.\\pipe\\"));
00112       ACE_OS::strcat (temp, addr);
00113     }
00114   else
00115     {
00116 
00117       if (ACE_OS::strncmp (addr,
00118                            ACE_TEXT ("localhost"),
00119                            ACE_OS::strlen ("localhost")) == 0)
00120         // change "localhost" to "."
00121         ACE_OS::strcpy (temp, ACE_TEXT ("\\\\."));
00122       else
00123         {
00124           ACE_OS::strcpy (temp, ACE_TEXT ("\\\\"));
00125 
00126           ACE_TCHAR *t;
00127 
00128           // We need to allocate a duplicate so that we can write a
00129           // NUL character into it.
00130           ACE_ALLOCATOR_RETURN (t, ACE_OS::strdup (addr), -1);
00131 
00132           t[colonp - addr] = ACE_TEXT ('\0');
00133           ACE_OS::strcat (temp, t);
00134 
00135           ACE_OS::free (t);
00136         }
00137 
00138       ACE_OS::strcat (temp, ACE_TEXT ("\\pipe\\"));
00139       ACE_OS::strcat (temp, colonp + 1);
00140     }
00141   len += static_cast<int> (ACE_OS::strlen (temp));
00142   this->ACE_Addr::base_set (AF_SPIPE, len);
00143 
00144   ACE_OS::strcpy (this->SPIPE_addr_.rendezvous_, temp);
00145 #else
00146   this->ACE_Addr::base_set (AF_SPIPE,
00147                             ACE_OS::strlen (addr) + 1 + len);
00148   ACE_OS::strsncpy (this->SPIPE_addr_.rendezvous_,
00149                     addr,
00150                     sizeof this->SPIPE_addr_.rendezvous_);
00151 #endif /* ACE_WIN32 */
00152   this->SPIPE_addr_.gid_ = gid == 0 ? ACE_OS::getgid () : gid;
00153   this->SPIPE_addr_.uid_ = uid == 0 ? ACE_OS::getuid () : uid;
00154   return 0;
00155 }
 | 
  
      
  | 
  
| 
 Acts like a copy constructor... 
 Definition at line 74 of file SPIPE_Addr.cpp. References AF_ANY, ACE_Addr::base_set(), ACE_Addr::get_size(), ACE_Addr::get_type(), ACE_OS::memcpy(), ACE_OS::memset(), and SPIPE_addr_. Referenced by ACE_SPIPE_Addr(), and string_to_addr(). 
 00075 {
00076   this->base_set (sa.get_type (), sa.get_size ());
00077 
00078   if (sa.get_type () == AF_ANY)
00079     (void) ACE_OS::memset ((void *) &this->SPIPE_addr_,
00080                            0,
00081                            sizeof this->SPIPE_addr_);
00082   else
00083     (void) ACE_OS::memcpy ((void *) &this->SPIPE_addr_, (void *)
00084                            &sa.SPIPE_addr_,
00085                            sa.get_size ());
00086   return 0;
00087 }
 | 
  
      
  | 
  ||||||||||||
| 
 Set a pointer to the underlying network address. 
 Reimplemented from ACE_Addr. Definition at line 27 of file SPIPE_Addr.cpp. References ACE_TRACE, AF_SPIPE, ACE_Addr::base_set(), and ACE_OS::memcpy(). 
 00028 {
00029   ACE_TRACE ("ACE_SPIPE_Addr::set_addr");
00030 
00031   this->ACE_Addr::base_set (AF_SPIPE, len);
00032   ACE_OS::memcpy ((void *) &this->SPIPE_addr_,
00033                   (void *) addr,
00034                   len);
00035 }
 | 
  
      
  | 
  
| 
 Transform the string into the current addressing format. 
 Definition at line 68 of file SPIPE_Addr.cpp. References ACE_TCHAR, and set(). 
 00069 {
00070   return this->set (addr);
00071 }
 | 
  
      
  | 
  
| 
 Set user id. 
 Definition at line 42 of file SPIPE_Addr.inl. References SPIPE_addr_, ACE_SPIPE_Addr::SPIPE_Addr::uid_, and uid_t. 
 00043 {
00044   this->SPIPE_addr_.uid_ = uid;
00045 }
 | 
  
      
  | 
  
| 
 Get user id. 
 Definition at line 36 of file SPIPE_Addr.inl. References SPIPE_addr_, and ACE_SPIPE_Addr::SPIPE_Addr::uid_. Referenced by ACE_SPIPE_Acceptor::accept(). 
 00037 {
00038   return this->SPIPE_addr_.uid_;
00039 }
 | 
  
      
  | 
  
| 
 Declare the dynamic allocation hooks. 
 Reimplemented from ACE_Addr. Definition at line 95 of file SPIPE_Addr.h.  | 
  
      
  | 
  
| 
 Contains security attributes. 
 Referenced by get_addr(), get_path_name(), group_id(), operator==(), set(), and user_id().  | 
  
 
1.3.6