summaryrefslogtreecommitdiff
path: root/ace/UNIX_Addr.cpp
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-12-30 06:50:29 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-12-30 06:50:29 +0000
commita4a7690c336d4c8a16b3041c86d501ba38226e96 (patch)
tree9e9f93a98edd2591453f092d178ad29a1c5fb519 /ace/UNIX_Addr.cpp
parenta5c4d8047ab58df5c45092e18ae503ad40518f0e (diff)
downloadATCD-unlabeled-4.1.2.tar.gz
This commit was manufactured by cvs2svn to create branchunlabeled-4.1.2
'unlabeled-4.1.2'.
Diffstat (limited to 'ace/UNIX_Addr.cpp')
-rw-r--r--ace/UNIX_Addr.cpp103
1 files changed, 0 insertions, 103 deletions
diff --git a/ace/UNIX_Addr.cpp b/ace/UNIX_Addr.cpp
deleted file mode 100644
index 04775372d9b..00000000000
--- a/ace/UNIX_Addr.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-// UNIX_Addr.cpp
-// $Id$
-
-#define ACE_BUILD_DLL
-#include "ace/UNIX_Addr.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/UNIX_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_UNIX_Addr)
-
-// Set a pointer to the address.
-void
-ACE_UNIX_Addr::set_addr (void *addr, int len)
-{
- ACE_TRACE ("ACE_UNIX_Addr::set_addr");
-
- this->ACE_Addr::base_set (AF_UNIX, len);
- ACE_OS::memcpy ((void *) &this->unix_addr_,
- (void *) addr,
- len);
-}
-
-void
-ACE_UNIX_Addr::dump (void) const
-{
-}
-
-// Do nothing constructor.
-
-ACE_UNIX_Addr::ACE_UNIX_Addr (void)
- : ACE_Addr (AF_UNIX, sizeof this->unix_addr_)
-{
- (void) ACE_OS::memset ((void *) &this->unix_addr_, 0, sizeof this->unix_addr_);
-}
-
-// Copy constructor.
-
-ACE_UNIX_Addr::ACE_UNIX_Addr (const ACE_UNIX_Addr &sa)
- : ACE_Addr (AF_UNIX, sa.get_size ())
-{
- size_t size = sa.get_size ();
-
- // Add one extra byte to account for the NUL at the end of the
- // pathname.
- if (size < sizeof this->unix_addr_)
- size = sa.get_size () + 1;
-
- this->unix_addr_.sun_family = AF_UNIX;
- ACE_OS::strcpy (this->unix_addr_.sun_path, sa.unix_addr_.sun_path);
-}
-
-void
-ACE_UNIX_Addr::set (const sockaddr_un *un, int len)
-{
- (void) ACE_OS::memset ((void *) &this->unix_addr_, 0,
- sizeof this->unix_addr_);
- this->unix_addr_.sun_family = AF_UNIX;
- ACE_OS::strcpy (this->unix_addr_.sun_path, un->sun_path);
- this->base_set (AF_UNIX, len);
-}
-
-ACE_UNIX_Addr::ACE_UNIX_Addr (const sockaddr_un *un, int len)
-{
- this->set (un, len);
-}
-
-void
-ACE_UNIX_Addr::set (const char rendezvous_point[])
-{
- (void) ACE_OS::memset ((void *) &this->unix_addr_, 0,
- sizeof this->unix_addr_);
- this->unix_addr_.sun_family = AF_UNIX;
- size_t len = ACE_OS::strlen (rendezvous_point);
-
- if (len >= sizeof this->unix_addr_.sun_path)
- {
- // At this point, things are screwed up, so let's make sure we
- // don't crash.
- (void) ACE_OS::strncpy (this->unix_addr_.sun_path,
- rendezvous_point,
- sizeof this->unix_addr_.sun_path);
- len = sizeof this->unix_addr_.sun_path;
- this->unix_addr_.sun_path[len - 1] = '\0';
- // Don't count the NUL byte at the end of the string.
- len -= 2;
- }
- else
- (void) ACE_OS::strcpy (this->unix_addr_.sun_path, rendezvous_point);
- this->ACE_Addr::base_set (AF_UNIX, len + sizeof this->unix_addr_.sun_family);
-}
-
-// Create a ACE_Addr from a UNIX pathname.
-
-ACE_UNIX_Addr::ACE_UNIX_Addr (const char rendezvous_point[])
-{
- this->set (rendezvous_point);
-}
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */