Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.5 KB

whitelist.rst

File metadata and controls

43 lines (32 loc) · 1.5 KB

Interface Whitelist

Using Fast DDS, it is possible to limit the network interfaces used by :ref:`transport_tcp_tcp` and :ref:`transport_udp_udp`. This is achieved by adding the interfaces' IP addresses to the |SocketTransportDescriptor::interfaceWhiteList-api| field in the :ref:`transport_tcp_transportDescriptor` or :ref:`transport_udp_transportDescriptor`. Thus, the communication interfaces used by the |DomainParticipants| whose |TransportDescriptorInterface-api| defines an |SocketTransportDescriptor::interfaceWhiteList-api| is limited to the interfaces' IP addresses defined in that list, therefore avoiding the use of the rest of the network interfaces available in the system. The values on this list should match the IPs of your machine in that networks. For example:

.. tabs::

  .. tab:: C++

    .. literalinclude:: /../code/DDSCodeTester.cpp
      :language: c++
      :start-after: //TRANSPORT-DESCRIPTORS
      :end-before: //!--
      :dedent: 8

  .. tab:: XML

    .. literalinclude:: /../code/XMLTester.xml
      :language: xml
      :start-after: <!-->TRANSPORT-DESCRIPTORS
      :end-before: <!--><-->
      :lines: 2-3,5-
      :append: </profiles>

Warning

The interface whitelist feature applies to network interfaces. Therefore, it is only available on :ref:`transport_tcp_tcp` and :ref:`transport_udp_udp`.