Skip to content

Commit 3850771

Browse files
BMarchihidmic
authored andcommitted
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 <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>
1 parent 85001d0 commit 3850771

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rmw/include/rmw/rmw.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ rmw_get_serialization_format(void);
160160
* \param[in] namespace_ the node namespace
161161
* \param[in] domain_id the id of the domain that the node should join
162162
* \param[in] security_options the security configurations for the node
163+
* \param[in] localhost_only whenever to use loopback only for communication or default
164+
* network interfaces.
163165
* \return rmw node handle or `NULL` if there was an error
164166
*/
165167
RMW_PUBLIC
@@ -170,7 +172,8 @@ rmw_create_node(
170172
const char * name,
171173
const char * namespace_,
172174
size_t domain_id,
173-
const rmw_node_security_options_t * security_options);
175+
const rmw_node_security_options_t * security_options,
176+
bool localhost_only);
174177

175178
/// Finalize a given node handle, reclaim the resources, and deallocate the node handle.
176179
/**

0 commit comments

Comments
 (0)