From 3850771ba0c5d26eb50f98023e42a4550541ae41 Mon Sep 17 00:00:00 2001 From: Brian Marchi Date: Fri, 18 Oct 2019 19:30:11 -0300 Subject: [PATCH] Add function to enable localhost communication only from env var (#190) * Add function to check for allowed hosts from env var Signed-off-by: Brian Ezequiel Marchi * Change the use and name of the local host env variable Signed-off-by: Brian Ezequiel Marchi * Rename host file and functions Signed-off-by: Brian Ezequiel Marchi * Change rmw_create_node signature and add loopback bool Signed-off-by: Brian Ezequiel Marchi * Move localhost file to rcl Signed-off-by: Brian Ezequiel Marchi --- rmw/include/rmw/rmw.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rmw/include/rmw/rmw.h b/rmw/include/rmw/rmw.h index 13d24efd..11dc462e 100644 --- a/rmw/include/rmw/rmw.h +++ b/rmw/include/rmw/rmw.h @@ -160,6 +160,8 @@ rmw_get_serialization_format(void); * \param[in] namespace_ the node namespace * \param[in] domain_id the id of the domain that the node should join * \param[in] security_options the security configurations for the node + * \param[in] localhost_only whenever to use loopback only for communication or default + * network interfaces. * \return rmw node handle or `NULL` if there was an error */ RMW_PUBLIC @@ -170,7 +172,8 @@ rmw_create_node( const char * name, const char * namespace_, size_t domain_id, - const rmw_node_security_options_t * security_options); + const rmw_node_security_options_t * security_options, + bool localhost_only); /// Finalize a given node handle, reclaim the resources, and deallocate the node handle. /**