This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can only create whitelisting with IP, also set to default profile.
- Loading branch information
Showing
3 changed files
with
48 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
# Fast-DDS https://fast-dds.docs.eprosima.com/en/latest/fastdds/transport/whitelist.html | ||
# needs actual ip for this interface | ||
interface=wlan0 | ||
ipinet="$(ip a s $interface | egrep -o 'inet [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')" | ||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?> | ||
<profiles xmlns=\"http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles\"> | ||
<transport_descriptors> | ||
<transport_descriptor> | ||
<transport_id>CustomUDPTransport</transport_id> | ||
<type>UDPv4</type> | ||
<interfaceWhiteList> | ||
<address>${ipinet##inet }</address> | ||
</interfaceWhiteList> | ||
</transport_descriptor> | ||
<transport_descriptor> | ||
<transport_id>CustomTcpTransport</transport_id> | ||
<type>TCPv4</type> | ||
<interfaceWhiteList> | ||
<address>${ipinet##inet }</address> | ||
</interfaceWhiteList> | ||
</transport_descriptor> | ||
</transport_descriptors> | ||
<participant profile_name=\"CustomUDPTransportParticipant\" is_default_profile=\"true\"> | ||
<rtps> | ||
<userTransports> | ||
<transport_id>CustomUDPTransport</transport_id> | ||
</userTransports> | ||
<useBuiltinTransports>false</useBuiltinTransports> | ||
</rtps> | ||
</participant> | ||
<participant profile_name=\"CustomTcpTransportParticipant\" is_default_profile=\"true\"> | ||
<rtps> | ||
<userTransports> | ||
<transport_id>CustomTcpTransport</transport_id> | ||
</userTransports> | ||
<useBuiltinTransports>false</useBuiltinTransports> | ||
</rtps> | ||
</participant> | ||
</profiles>" > fastrtps-whitelist-wlan.xml |
This file was deleted.
Oops, something went wrong.