summaryrefslogtreecommitdiff
path: root/TAO/tao/params.cpp
diff options
context:
space:
mode:
authorbala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-11-28 05:44:15 +0000
committerbala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-11-28 05:44:15 +0000
commitebef86abd71a70fe7ec2b23537f6656ac1e671e3 (patch)
treec1bfd1845cf0d5e249792dae5ac41f4434d2421e /TAO/tao/params.cpp
parent99f54895852018c071fc02b180fb29e3d305f5cf (diff)
downloadATCD-ebef86abd71a70fe7ec2b23537f6656ac1e671e3.tar.gz
ChangeLogTag:Sun Nov 28 05:14:24 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/params.cpp')
-rw-r--r--TAO/tao/params.cpp80
1 files changed, 65 insertions, 15 deletions
diff --git a/TAO/tao/params.cpp b/TAO/tao/params.cpp
index 1add777ba58..acd06795c40 100644
--- a/TAO/tao/params.cpp
+++ b/TAO/tao/params.cpp
@@ -15,21 +15,23 @@ ACE_RCSID (tao,
TAO_ORB_Parameters::TAO_ORB_Parameters (void)
- : endpoints_map_ (10),
- mcast_discovery_endpoint_ (),
- default_init_ref_ (TAO_DEFAULT_INIT_REFERENCE_INITIALIZER),
- sock_rcvbuf_size_ (ACE_DEFAULT_MAX_SOCKET_BUFSIZ),
- sock_sndbuf_size_ (ACE_DEFAULT_MAX_SOCKET_BUFSIZ),
- nodelay_ (1),
- cdr_memcpy_tradeoff_ (ACE_DEFAULT_CDR_MEMCPY_TRADEOFF),
- use_lite_protocol_ (0),
- use_dotted_decimal_addresses_ (0),
- std_profile_components_ (1),
- ace_sched_policy_ (ACE_SCHED_OTHER),
- sched_policy_ (THR_SCHED_DEFAULT),
- scope_policy_ (THR_SCOPE_PROCESS),
- single_read_optimization_ (1),
- disable_rt_collocation_resolver_ (false)
+ : endpoints_map_ (10)
+ , mcast_discovery_endpoint_ ()
+ , default_init_ref_ (TAO_DEFAULT_INIT_REFERENCE_INITIALIZER)
+ , sock_rcvbuf_size_ (ACE_DEFAULT_MAX_SOCKET_BUFSIZ)
+ , sock_sndbuf_size_ (ACE_DEFAULT_MAX_SOCKET_BUFSIZ)
+ , nodelay_ (1)
+ , cdr_memcpy_tradeoff_ (ACE_DEFAULT_CDR_MEMCPY_TRADEOFF)
+ , use_lite_protocol_ (0)
+ , use_dotted_decimal_addresses_ (0)
+ , std_profile_components_ (1)
+ , ace_sched_policy_ (ACE_SCHED_OTHER)
+ , sched_policy_ (THR_SCHED_DEFAULT)
+ , scope_policy_ (THR_SCOPE_PROCESS)
+ , single_read_optimization_ (1)
+ , disable_rt_collocation_resolver_ (false)
+ , pref_network_ ()
+ , enforce_preferred_interfaces_ (false)
{
for (int i = 0; i != TAO_NO_OF_MCAST_SERVICES; ++i)
{
@@ -189,3 +191,51 @@ TAO_ORB_Parameters::parse_and_add_endpoints (const ACE_CString &endpoints,
return status;
}
+
+bool
+TAO_ORB_Parameters::preferred_interfaces (const char *s)
+{
+ ACE_CString tmp (s);
+
+ ssize_t index = 0;
+ int comma = 0;
+ while ((index = tmp.find (",", index)) != ACE_CString::npos)
+ {
+ ++comma;
+ ++index;
+ }
+
+ index = 0;
+
+ int colon = 0;
+ while ((index = tmp.find (":", index)) != ACE_CString::npos)
+ {
+ ++colon;
+ ++index;
+ }
+
+ if (colon != (comma + 1))
+ return false;
+
+ this->pref_network_ = tmp;
+
+ return true;
+}
+
+const char *
+TAO_ORB_Parameters::preferred_interfaces (void) const
+{
+ return this->pref_network_.c_str ();
+}
+
+void
+TAO_ORB_Parameters::enforce_pref_interfaces (bool p)
+{
+ this->enforce_preferred_interfaces_ = p;
+}
+
+bool
+TAO_ORB_Parameters::enforce_pref_interfaces (void) const
+{
+ return this->enforce_preferred_interfaces_;
+}