Skip to content

Commit

Permalink
SKA-533: modify executable names (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
VKyllianAubry authored and GitHub Enterprise committed Jun 25, 2024
1 parent 2082e24 commit 38446eb
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 49 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ install(
)

install(
TARGETS
SilKitDemoEthernetIcmpEchoDevice
TARGETS
sil-kit-demo-ethernet-icmp-echo-device
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
Expand All @@ -170,13 +170,13 @@ install(
EXCLUDE_FROM_ALL
)

# only SilKitAdapterTap should be installed to /usr/local/bin by calling --target install (therefore it is not excluded)
# only sil-kit-adapter-tap should be installed to /usr/local/bin by calling --target install (therefore it is not excluded)
install(
TARGETS
SilKitAdapterTap
TARGETS
sil-kit-adapter-tap
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/SilKitAdapterTap COMPONENT Development
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/sil-kit-adapter-tap COMPONENT Development
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ Download a preview or release of the Adapters directly from [Vector SIL Kit Adap

If not already existent on your system you should also download a SIL Kit Release directly from [Vector SIL Kit Releases](https://github.com/vectorgrp/sil-kit/releases). You will need this for being able to start a sil-kit-registry.

## Install the SilKitAdapterTap (optional)
## Install the sil-kit-adapter-tap (optional)
Be aware that SIL Kit itself also needs to be installed to run the adapter.

Run the following command to install the SilKitAdapterTap (can be done for self build and pre build package after cmake configure):
Run the following command to install the sil-kit-adapter-tap (can be done for self build and pre build package after cmake configure):


### Linux installation

sudo cmake --build build --target install

**Note:** After installing the adapter on Linux, the following command ``SilKitAdapterTap`` can be called from everywhere without defining a path. The default installation path will be ``/usr/local/bin``.
**Note:** After installing the adapter on Linux, the following command ``sil-kit-adapter-tap`` can be called from everywhere without defining a path. The default installation path will be ``/usr/local/bin``.

### Windows installation

Expand All @@ -70,20 +70,20 @@ Run the following command to install the SilKitAdapterTap (can be done for self
**Note 2:** The default installation path will be ``C:\Program Files\Vector SIL Kit Adapters TAP <TAP_ADAPTER_VERSION>``, with <TAP_ADAPTER_VERSION> as the version of the TAP adapter you install.
Depending on your system this default path can be ``Program Files (x86)``.

## Run the SilKitAdapterTap
## Run the sil-kit-adapter-tap
This application allows the user to attach a TAP device of a Linux or Windows system to the Vector SIL Kit.

Before you start the adapter there always needs to be a sil-kit-registry running already. Start it e.g. like this:

/path/to/SilKit-x.y.z-$platform/SilKit/bin/sil-kit-registry --listen-uri 'silkit://0.0.0.0:8501'

It is also necessary that the TAP device exists before the ``SilKitAdapterTap`` is started.
It is also necessary that the TAP device exists before the ``sil-kit-adapter-tap`` is started.

**Hint:** If your TAP device has been created by a third party application (you want the SIL Kit to connect to) it is possible that this TAP device resource is 'flagged' as busy/blocked. In this case you just can create another TAP device for usage with the ``SilKitAdapterTap`` by yourself and bridge (``brctl`` on Linux, ``netsh bridge`` on Windows) it with the TAP device of your third party application.
**Hint:** If your TAP device has been created by a third party application (you want the SIL Kit to connect to) it is possible that this TAP device resource is 'flagged' as busy/blocked. In this case you just can create another TAP device for usage with the ``sil-kit-adapter-tap`` by yourself and bridge (``brctl`` on Linux, ``netsh bridge`` on Windows) it with the TAP device of your third party application.

The application *optionally* takes the following command line arguments (default between curly braces):

SilKitAdapterTap [--name <participant's name{EthernetTapDevice}>]
sil-kit-adapter-tap [--name <participant's name{EthernetTapDevice}>]
[--configuration <path to .silkit.yaml or .json configuration file>]
[--registry-uri silkit://<host{localhost}>:<port{8501}>]
[--log <Trace|Debug|Warn|{Info}|Error|Critical|Off>]
Expand Down
4 changes: 2 additions & 2 deletions adaptive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ The user manual of the start application suggests to create a network adapter wi
a) If no special SIL Kit configuration was added in the global CANoe options, this is just the name of the used network, e.g. ``Ethernet1``.

```bash
./bin/SilKitAdapterTap --network 'Ethernet1'
./bin/sil-kit-adapter-tap --network 'Ethernet1'
```

b) If the Vector SIL Kit was configured with an additional configuration.yaml, make sure to use the network name from that file.
Expand All @@ -235,7 +235,7 @@ The user manual of the start application suggests to create a network adapter wi
```

```bash
./bin/SilKitAdapterTap --network 'silkit_network'
./bin/sil-kit-adapter-tap --network 'silkit_network'
```

3. Move the TAP device "silkit_tap" to the network namespace "tap_demo_ns"
Expand Down
8 changes: 4 additions & 4 deletions tap/adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
add_executable(SilKitAdapterTap
add_executable(sil-kit-adapter-tap
"SilKitAdapterTap.cpp"
"TapConnection.cpp"
"Parsing.cpp"
"SignalHandler.cpp"
)
target_link_libraries(SilKitAdapterTap
target_link_libraries(sil-kit-adapter-tap
PRIVATE
Utility
asio
SilKit::SilKit
)
set_target_properties(SilKitAdapterTap
set_target_properties(sil-kit-adapter-tap
PROPERTIES
#ensure SilKit shared libraries can be loaded
INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN"
BUILD_RPATH "$ORIGIN"
RUNTIME_OUTPUT_DIRECTORY $<$<BOOL:ALWAYS>:${SILKIT_ADAPTERS_TAP_OUTPUT_DIRECTORY}>
)
add_custom_command(
TARGET SilKitAdapterTap
TARGET sil-kit-adapter-tap
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy $<TARGET_FILE:SilKit::SilKit> ${SILKIT_ADAPTERS_TAP_LIBRARY_DIRECTORY}/libSilKit.so
Expand Down
4 changes: 2 additions & 2 deletions tap/adapter/Parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bool adapters::thereAreUnknownArguments(int argc, char** argv)
void adapters::print_help(bool userRequested)
{
std::cout << "Usage (defaults in curly braces if you omit the switch):" << std::endl
<< "SilKitAdapterTap ["<<participantNameArg<<" <participant's name{EthernetTapDevice}>]\n"
<< "sil-kit-adapter-tap ["<<participantNameArg<<" <participant's name{EthernetTapDevice}>]\n"
" ["<<configurationArg<<" <path to .silkit.yaml or .json configuration file>]\n"
" ["<<regUriArg<<" silkit://<host{localhost}>:<port{8501}>]\n"
" ["<<logLevelArg<<" <Trace|Debug|Warn|{Info}|Error|Critical|Off>]\n"
Expand All @@ -53,7 +53,7 @@ void adapters::print_help(bool userRequested)
"SIL Kit-specific CLI arguments will be overwritten by the config file passed by " << configurationArg << ".\n";
std::cout << "\n"
"Example:\n"
"SilKitAdapterTap "<<participantNameArg<<" EthernetTapBridge "
"sil-kit-adapter-tap "<<participantNameArg<<" EthernetTapBridge "
<< networkArg<<" tap_bridge\n";
if (!userRequested)
std::cout << "\n"
Expand Down
4 changes: 2 additions & 2 deletions tap/demos/CANoe4SW_SE/run_all.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ $execRegistry = {

$execAdapter = {
param ($ScriptDir)
& $ScriptDir\..\..\..\bin\SilKitAdapterTap.exe --log Debug | Out-File -FilePath $ScriptDir\SilKitAdapterTap.out
& $ScriptDir\..\..\..\bin\sil-kit-adapter-tap.exe --log Debug | Out-File -FilePath $ScriptDir\sil-kit-adapter-tap.out
}

$execDemo = {
param ($ScriptDir)
& $ScriptDir\..\..\..\bin\SilKitDemoEthernetIcmpEchoDevice.exe --log Debug | Out-File -FilePath $ScriptDir\SilKitDemoEthernetIcmpEchoDevice.out
& $ScriptDir\..\..\..\bin\sil-kit-demo-ethernet-icmp-echo-device.exe --log Debug | Out-File -FilePath $ScriptDir\sil-kit-demo-ethernet-icmp-echo-device.out
}

$execPing = {
Expand Down
2 changes: 1 addition & 1 deletion tap/demos/CANoe4SW_SE/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ timeout 30s grep -q 'Registered signal handler' <(tail -f /$scriptDir/sil-kit-re

$scriptDir/../DemoLinux/start_adapter_and_ping_demo.sh &> $scriptDir/start_adapter_and_ping_demo.out &

$scriptDir/../../../bin/SilKitDemoEthernetIcmpEchoDevice &> $scriptDir/SilKitDemoEthernetIcmpEchoDevice.out &
$scriptDir/../../../bin/sil-kit-demo-ethernet-icmp-echo-device &> $scriptDir/sil-kit-demo-ethernet-icmp-echo-device.out &

$scriptDir/run.sh

Expand Down
12 changes: 6 additions & 6 deletions tap/demos/DemoLinux/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Ethernet Demo and Adapter Setup
This demo consists of a TAP device "silkit_tap" which is connected to the SIL Kit via ``SilKitAdapterTap`` as a SIL Kit participant. In a second step this TAP device is moved to a Linux network name space and gets a IP configured which is in the same range as the one of the ``SilKitDemoEthernetIcmpEchoDevice``. The Linux ping application is used within this created network name space to ping ``SilKitDemoEthernetIcmpEchoDevice`` through the TAP device via SIL Kit. The application ``SilKitDemoEthernetIcmpEchoDevice``, which is a SIL Kit participant as well, will reply to an ARP request and respond to ICMPv4 echo requests.
This demo consists of a TAP device "silkit_tap" which is connected to the SIL Kit via ``sil-kit-adapter-tap`` as a SIL Kit participant. In a second step this TAP device is moved to a Linux network name space and gets a IP configured which is in the same range as the one of the ``sil-kit-demo-ethernet-icmp-echo-device``. The Linux ping application is used within this created network name space to ping ``sil-kit-demo-ethernet-icmp-echo-device`` through the TAP device via SIL Kit. The application ``sil-kit-demo-ethernet-icmp-echo-device``, which is a SIL Kit participant as well, will reply to an ARP request and respond to ICMPv4 echo requests.

The following sketch shows the general setup:

Expand All @@ -19,7 +19,7 @@ The following sketch shows the general setup:
+----------------------------------------+ +-----------------------------------+


## SilKitDemoEthernetIcmpEchoDevice
## sil-kit-demo-ethernet-icmp-echo-device
This demo application implements a very simple SIL Kit participant with a single simulated ethernet controller.
The application will reply to an ARP request and respond to ICMPv4 Echo Requests directed to it's hardcoded MAC address
(``52:54:56:53:4B:55``) and IPv4 address (``192.168.7.35``).
Expand All @@ -29,20 +29,20 @@ The application will reply to an ARP request and respond to ICMPv4 Echo Requests

## Running the Demo Applications

Now is a good point to start the ``sil-kit-registry``, the ``SilKitDemoEthernetIcmpEchoDevice`` and the demo helper script ``start_adapter_and_ping_demo`` - which creates the TAP device, connects it to the adapter and afterwards adds it to the network namespace and starts pinging the echos device from there - in separate terminals:
Now is a good point to start the ``sil-kit-registry``, the ``sil-kit-demo-ethernet-icmp-echo-device`` and the demo helper script ``start_adapter_and_ping_demo`` - which creates the TAP device, connects it to the adapter and afterwards adds it to the network namespace and starts pinging the echos device from there - in separate terminals:

/path/to/SilKit-x.y.z-$platform/SilKit/bin/sil-kit-registry --listen-uri 'silkit://0.0.0.0:8501'
./bin/SilKitDemoEthernetIcmpEchoDevice --log Debug
./bin/sil-kit-demo-ethernet-icmp-echo-device --log Debug

sudo ./tap/demos/DemoLinux/start_adapter_and_ping_demo.sh

The applications will produce output when they send and receive Ethernet frames from the TAP device or the Vector SIL Kit. The console output of ``SilKitAdapterTap`` is redirected to ``./bin/SilKitAdapterTap.out``.
The applications will produce output when they send and receive Ethernet frames from the TAP device or the Vector SIL Kit. The console output of ``sil-kit-adapter-tap`` is redirected to ``./bin/sil-kit-adapter-tap.out``.

## ICMP Ping and Pong
The ping requests should all receive responses.

You should see output similar to the following from the ``SilKitDemoEthernetIcmpEchoDevice`` application:
You should see output similar to the following from the ``sil-kit-demo-ethernet-icmp-echo-device`` application:

[date time] [EthernetDevice] [debug] SIL Kit >> Demo: Ethernet frame (98 bytes)
[date time] [EthernetDevice] [debug] EthernetHeader(destination=EthernetAddress(52:54:56:53:4b:55),source=EthernetAddress(9a:97:c4:83:d8:d0),etherType=EtherType::Ip4)
Expand Down
8 changes: 4 additions & 4 deletions tap/demos/DemoLinux/start_adapter_and_ping_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ fi
echo "Creating tap device silkit_tap"
ip tuntap add dev silkit_tap mode tap

echo "Starting SilKitAdapterTap..."
$SCRIPT_DIR/../../../bin/SilKitAdapterTap --configuration $SCRIPT_DIR/../SilKitConfig_Adapter.silkit.yaml &> /$SCRIPT_DIR/../CANoe4SW_SE/SilKitAdapterTap.out &
echo "Starting sil-kit-adapter-tap..."
$SCRIPT_DIR/../../../bin/sil-kit-adapter-tap --configuration $SCRIPT_DIR/../SilKitConfig_Adapter.silkit.yaml &> /$SCRIPT_DIR/../CANoe4SW_SE/sil-kit-adapter-tap.out &
sleep 1 # wait 1 second for the creation/existense of the .out file

timeout 30s grep -q 'Press CTRL + C to stop the process...' <(tail -f /$SCRIPT_DIR/../CANoe4SW_SE/SilKitAdapterTap.out) || (echo "[error] Timeout reached while waiting for SilKitAdapterTap to start"; exit 1;)
echo "SilKitAdapterTap has been started"
timeout 30s grep -q 'Press CTRL + C to stop the process...' <(tail -f /$SCRIPT_DIR/../CANoe4SW_SE/sil-kit-adapter-tap.out) || (echo "[error] Timeout reached while waiting for sil-kit-adapter-tap to start"; exit 1;)
echo "sil-kit-adapter-tap has been started"

# Hint: It is important to establish the connection to the the adapter before moving the tap device to its separate namespace
echo "Moving tap device 'silkit_tap' to network namespace 'tap_demo_ns'"
Expand Down
20 changes: 10 additions & 10 deletions tap/demos/DemoWindows/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Ethernet Demo and Adapter Setup
This demo consists of a TAP device "silkit_tap" which is connected to the SIL Kit via ``SilKitAdapterTap`` as a SIL Kit participant. This TAP device gets
a IP configured which is in the same range as the one of the ``SilKitDemoEthernetIcmpEchoDevice``.
The Windows ping application is used to ping ``SilKitDemoEthernetIcmpEchoDevice`` through the TAP device via SIL Kit.
The application ``SilKitDemoEthernetIcmpEchoDevice``, which is a SIL Kit participant as well, will reply to an ARP request and respond to ICMPv4 echo requests.
This demo consists of a TAP device "silkit_tap" which is connected to the SIL Kit via ``sil-kit-adapter-tap`` as a SIL Kit participant. This TAP device gets
a IP configured which is in the same range as the one of the ``sil-kit-demo-ethernet-icmp-echo-device``.
The Windows ping application is used to ping ``sil-kit-demo-ethernet-icmp-echo-device`` through the TAP device via SIL Kit.
The application ``sil-kit-demo-ethernet-icmp-echo-device``, which is a SIL Kit participant as well, will reply to an ARP request and respond to ICMPv4 echo requests.

The following sketch shows the general setup:

Expand All @@ -22,7 +22,7 @@ The following sketch shows the general setup:
+----------------------------------------+ +-----------------------------------+


## SilKitDemoEthernetIcmpEchoDevice
## sil-kit-demo-ethernet-icmp-echo-device
This demo application implements a very simple SIL Kit participant with a single simulated ethernet controller.
The application will reply to an ARP request and respond to ICMPv4 Echo Requests directed to it's hardcoded MAC address
(``52:54:56:53:4B:55``) and IPv4 address (``192.168.7.35``).
Expand All @@ -46,23 +46,23 @@ netsh interface ip set address silkit_tap static 192.168.7.2 255.255.255.0

## Running the Demo Applications

Now is a good point to start the ``sil-kit-registry``, the ``SilKitDemoEthernetIcmpEchoDevice`` in separate terminals:
Now is a good point to start the ``sil-kit-registry``, the ``sil-kit-demo-ethernet-icmp-echo-device`` in separate terminals:

/path/to/SilKit-x.y.z-$platform/SilKit/bin/sil-kit-registry.exe --listen-uri 'silkit://0.0.0.0:8501'

./bin/SilKitAdapterTap.exe --log Debug
./bin/sil-kit-adapter-tap.exe --log Debug

./bin/SilKitDemoEthernetIcmpEchoDevice.exe --log Debug
./bin/sil-kit-demo-ethernet-icmp-echo-device.exe --log Debug

The applications will produce output when they send and receive Ethernet frames from the TAP device or the Vector SIL Kit.

## ICMP Ping and Pong
To ping the ``SilKitDemoEthernetIcmpEchoDevice`` and make sure the route over the Windows TAP is taken, specify the source as follow:
To ping the ``sil-kit-demo-ethernet-icmp-echo-device`` and make sure the route over the Windows TAP is taken, specify the source as follow:
```
ping 192.168.7.35 -S 192.168.7.2 -t
```

You should see output similar to the following from the ``SilKitDemoEthernetIcmpEchoDevice`` application:
You should see output similar to the following from the ``sil-kit-demo-ethernet-icmp-echo-device`` application:

[date time] [EthernetDevice] [debug] SIL Kit >> Demo: Ethernet frame (98 bytes)
[date time] [EthernetDevice] [debug] EthernetHeader(destination=EthernetAddress(52:54:56:53:4b:55),source=EthernetAddress(9a:97:c4:83:d8:d0),etherType=EtherType::Ip4)
Expand Down
6 changes: 3 additions & 3 deletions tap/demos/IcmpEchoDevice/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
add_executable(SilKitDemoEthernetIcmpEchoDevice
add_executable(sil-kit-demo-ethernet-icmp-echo-device
"SilKitDemoEthernetIcmpEchoDevice.cpp"
Device.hpp
Device.cpp
${CMAKE_SOURCE_DIR}/tap/adapter/Parsing.cpp
${CMAKE_SOURCE_DIR}/tap/adapter/SignalHandler.cpp
)
target_link_libraries(SilKitDemoEthernetIcmpEchoDevice
target_link_libraries(sil-kit-demo-ethernet-icmp-echo-device
PRIVATE
Utility
SilKit::SilKit
)
set_target_properties(SilKitDemoEthernetIcmpEchoDevice
set_target_properties(sil-kit-demo-ethernet-icmp-echo-device
PROPERTIES
#ensure SilKit shared libraries can be loaded
INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN"
Expand Down
4 changes: 2 additions & 2 deletions tap/demos/IcmpEchoDevice/SilKitDemoEthernetIcmpEchoDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ void promptForExit()
void print_demo_help(bool userRequested)
{
std::cout << "Usage (defaults in curly braces if you omit the switch):" << std::endl;
std::cout << "SilKitDemoEthernetIcmpEchoDevice [" << participantNameArg << " <participant's name{EthernetDevice}>]\n"
std::cout << "sil-kit-demo-ethernet-icmp-echo-device [" << participantNameArg << " <participant's name{EthernetDevice}>]\n"
" [" << regUriArg << " silkit://<host{localhost}>:<port{8501}>]\n"
" [" << networkArg << " <SIL Kit Ethernet network name{tap_demo}>]\n"
" [" << logLevelArg << " <Trace|Debug|Warn|{Info}|Error|Critical|Off>]\n";
std::cout << "\n"
"Example:\n"
"SilKitDemoEthernetIcmpEchoDevice " << participantNameArg << " EchoDevice " << networkArg << " tap_network " << logLevelArg << " Off\n ";
"sil-kit-demo-ethernet-icmp-echo-device " << participantNameArg << " EchoDevice " << networkArg << " tap_network " << logLevelArg << " Off\n ";

if (!userRequested)
std::cout << "\n"
Expand Down

0 comments on commit 38446eb

Please sign in to comment.