Skip to content

Commit

Permalink
Add function to enable localhost communication only from env var (#190)
Browse files Browse the repository at this point in the history
* Add function to check for allowed hosts from env var

Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>

* Change the use and name of the local host env variable

Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>

* Rename host file and functions

Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>

* Change rmw_create_node signature and add loopback bool

Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>

* Move localhost file to rcl

Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
  • Loading branch information
BMarchi authored and hidmic committed Oct 18, 2019
1 parent 85001d0 commit 3850771
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rmw/include/rmw/rmw.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
/**
Expand Down

0 comments on commit 3850771

Please sign in to comment.