OpenDDS
Snapshot(2023/04/28-20:55)
dds
DCPS
DefaultNetworkConfigMonitor.h
Go to the documentation of this file.
1
/*
2
*
3
*
4
* Distributed under the OpenDDS License.
5
* See: http://www.opendds.org/license.html
6
*/
7
8
#ifndef OPENDDS_DCPS_DEFAULT_NETWORK_CONFIG_MONITOR_H
9
#define OPENDDS_DCPS_DEFAULT_NETWORK_CONFIG_MONITOR_H
10
11
#include "ace/config.h"
12
13
#include "
NetworkConfigMonitor.h
"
14
#include "
dcps_export.h
"
15
16
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
17
18
namespace
OpenDDS
{
19
namespace
DCPS {
20
21
class
OpenDDS_Dcps_Export
DefaultNetworkConfigMonitor
:
public
NetworkConfigMonitor
{
22
public
:
23
bool
open
()
24
{
25
const
NetworkAddress
sp_default =
TheServiceParticipant
->default_address();
26
if
(sp_default !=
NetworkAddress
()) {
27
set
(
NetworkInterfaceAddress
(
""
,
true
, sp_default));
28
return
true
;
29
}
30
31
static
const
u_short port_zero = 0;
32
ACE_INET_Addr
addr(port_zero,
"0.0.0.0"
);
33
set
(
NetworkInterfaceAddress
(
""
,
true
,
NetworkAddress
(addr)));
34
#ifdef ACE_HAS_IPV6
35
ACE_INET_Addr
addr2(port_zero,
"::"
);
36
set
(
NetworkInterfaceAddress
(
""
,
true
,
NetworkAddress
(addr2)));
37
#endif
38
39
return
true
;
40
}
41
42
bool
close
() {
return
true
; }
43
};
44
45
}
// DCPS
46
}
// OpenDDS
47
48
OPENDDS_END_VERSIONED_NAMESPACE_DECL
49
50
#endif // OPENDDS_DCPS_DEFAULT_NETWORK_CONFIG_MONITOR_H
OpenDDS::DCPS::DefaultNetworkConfigMonitor::open
bool open()
Definition:
DefaultNetworkConfigMonitor.h:23
OpenDDS::DCPS::NetworkAddress
Definition:
NetworkAddress.h:28
dcps_export.h
OpenDDS::DCPS::DefaultNetworkConfigMonitor
Definition:
DefaultNetworkConfigMonitor.h:21
OpenDDS_Dcps_Export
#define OpenDDS_Dcps_Export
Definition:
dcps_export.h:24
OpenDDS::DCPS::NetworkInterfaceAddress
Definition:
NetworkConfigMonitor.h:23
ACE_INET_Addr
OpenDDS::DCPS::DefaultNetworkConfigMonitor::close
bool close()
Definition:
DefaultNetworkConfigMonitor.h:42
OpenDDS::DCPS::NetworkConfigMonitor
Definition:
NetworkConfigMonitor.h:78
OPENDDS_END_VERSIONED_NAMESPACE_DECL
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
Definition:
Versioned_Namespace.h:48
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
Definition:
Hash.cpp:17
TheServiceParticipant
#define TheServiceParticipant
Definition:
Service_Participant.h:792
NetworkConfigMonitor.h
OpenDDS
The Internal API and Implementation of OpenDDS.
Definition:
AddressCache.h:28
Generated by
1.8.13