blob: c3fd906d0ad6724a397ee598dc29e80dea4cd51a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// -*- C++ -*-
//
// $Id$
#include "ace/OS_NS_string.h"
#include "ace/Global_Macros.h"
#include "ace/os_include/sys/os_socket.h"
ACE_INLINE void
ACE_DEV_Addr::set (const ACE_TCHAR *devname)
{
ACE_TRACE ("ACE_DEV_Addr::set");
this->ACE_Addr::base_set
(AF_DEV, static_cast<int> (ACE_OS::strlen (devname)));
ACE_OS::strsncpy (this->devname_, devname, MAXPATHLEN);
}
// Transform the current address into string format.
ACE_INLINE int
ACE_DEV_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const
{
ACE_TRACE ("ACE_DEV_Addr::addr_to_string");
ACE_OS::strsncpy (s, this->devname_, len);
return 0;
}
// Return a pointer to the address.
ACE_INLINE void *
ACE_DEV_Addr::get_addr (void) const
{
ACE_TRACE ("ACE_DEV_Addr::get_addr");
return (void *) &this->devname_;
}
// Compare two addresses for equality.
ACE_INLINE bool
ACE_DEV_Addr::operator == (const ACE_DEV_Addr &sap) const
{
ACE_TRACE ("ACE_DEV_Addr::operator ==");
return ACE_OS::strcmp (this->devname_, sap.devname_) == 0;
}
// Compare two addresses for inequality.
ACE_INLINE bool
ACE_DEV_Addr::operator != (const ACE_DEV_Addr &sap) const
{
ACE_TRACE ("ACE_DEV_Addr::operator !=");
return !((*this) == sap); // This is lazy, of course... ;-).
}
// Return the path name used for the rendezvous point.
ACE_INLINE const ACE_TCHAR *
ACE_DEV_Addr::get_path_name (void) const
{
ACE_TRACE ("ACE_DEV_Addr::get_path_name");
return this->devname_;
}
|