From 2d8b272ab5f9c068af6cc97a5bfc87d49ba4bd03 Mon Sep 17 00:00:00 2001 From: Florian Grandel Date: Mon, 2 Sep 2024 12:58:35 +0200 Subject: [PATCH] tools: net-tools: place net-tools inside tools Updates references to the net-tools project to refer to the correct placement of net-tools under tools. Signed-off-by: Florian Grandel --- boards/native/native_sim/doc/index.rst | 3 +-- cmake/emu/qemu.cmake | 2 +- doc/connectivity/networking/native_sim_setup.rst | 12 ++++++++---- doc/connectivity/networking/network_monitoring.rst | 8 ++++++-- .../networking_with_multiple_instances.rst | 7 +++++-- doc/connectivity/networking/qemu_802154_setup.rst | 4 ++-- doc/connectivity/networking/qemu_eth_setup.rst | 7 +++++-- doc/connectivity/networking/qemu_setup.rst | 11 +++++++---- doc/develop/west/basics.rst | 3 ++- samples/net/dns_resolve/README.rst | 7 ++++--- samples/net/sockets/http_client/README.rst | 9 +++++---- west.yml | 2 +- 12 files changed, 47 insertions(+), 28 deletions(-) diff --git a/boards/native/native_sim/doc/index.rst b/boards/native/native_sim/doc/index.rst index e8aea1ad4f0..3f6033884b3 100644 --- a/boards/native/native_sim/doc/index.rst +++ b/boards/native/native_sim/doc/index.rst @@ -376,8 +376,7 @@ The following peripherals are currently provided with this board: Note that this device can only be used with Linux hosts. -.. _net-tools: - https://github.com/zephyrproject-rtos/net-tools +.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools .. _nsim_per_offloaded_sockets: diff --git a/cmake/emu/qemu.cmake b/cmake/emu/qemu.cmake index f7ee1915a27..cc47f48d1ff 100644 --- a/cmake/emu/qemu.cmake +++ b/cmake/emu/qemu.cmake @@ -254,7 +254,7 @@ elseif(QEMU_NET_STACK) # NET_TOOLS has been set to the net-tools repo path # net-tools/monitor_15_4 has been built beforehand - set_ifndef(NET_TOOLS ${ZEPHYR_BASE}/../net-tools) # Default if not set + set_ifndef(NET_TOOLS ${ZEPHYR_BASE}/../tools/net-tools) # Default if not set list(APPEND PRE_QEMU_COMMANDS_FOR_server COMMAND diff --git a/doc/connectivity/networking/native_sim_setup.rst b/doc/connectivity/networking/native_sim_setup.rst index 06103dc63b5..70f6469abcb 100644 --- a/doc/connectivity/networking/native_sim_setup.rst +++ b/doc/connectivity/networking/native_sim_setup.rst @@ -21,8 +21,9 @@ which is modeled in Linux as an Ethernet network interface. Prerequisites ============= -On the Linux Host, fetch the Zephyr ``net-tools`` project, which is located -in a separate Git repository: +On the Linux Host, find the Zephyr `net-tools`_ project, which can either be +found in a Zephyr standard installation under the ``tools/net-tools`` directory +or installed stand alone from its own git repository: .. code-block:: console @@ -116,8 +117,9 @@ Build and start the ``echo_server`` sample application: Step 2 - run echo-client from net-tools ======================================= -On the Linux Host, fetch the Zephyr ``net-tools`` project, which is located -in a separate Git repository: +On the Linux Host, find the Zephyr `net-tools`_ project, which can either be +found in a Zephyr standard installation under the ``tools/net-tools`` directory +or installed stand alone from its own git repository: .. code-block:: console @@ -156,3 +158,5 @@ troublesome. .. code-block:: console ./zephyr.exe --eth-if=zeth2 + +.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools diff --git a/doc/connectivity/networking/network_monitoring.rst b/doc/connectivity/networking/network_monitoring.rst index a5f2dcfee71..6a41dafea40 100644 --- a/doc/connectivity/networking/network_monitoring.rst +++ b/doc/connectivity/networking/network_monitoring.rst @@ -22,8 +22,10 @@ Host Configuration The instructions here describe how to setup a Linux host to capture Zephyr network RX and TX traffic. Similar instructions should work also in other operating systems. -On the Linux Host, fetch the Zephyr ``net-tools`` project, which is located -in a separate Git repository: + +On the Linux Host, find the Zephyr `net-tools`_ project, which can either be +found in a Zephyr standard installation under the ``tools/net-tools`` directory +or installed stand alone from its own git repository: .. code-block:: console @@ -101,6 +103,8 @@ it depends on how the Zephyr is configured. Zephyr will send UDP packets containing the captured network packets to the configured IP tunnel, so we need to terminate the network connection like this. +.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools + Zephyr Configuration ******************** diff --git a/doc/connectivity/networking/networking_with_multiple_instances.rst b/doc/connectivity/networking/networking_with_multiple_instances.rst index 6489db45551..225d50ebb39 100644 --- a/doc/connectivity/networking/networking_with_multiple_instances.rst +++ b/doc/connectivity/networking/networking_with_multiple_instances.rst @@ -15,8 +15,9 @@ to route network traffic between these systems. Prerequisites ************* -On the Linux Host, fetch the Zephyr ``net-tools`` project, which is located -in a separate Git repository: +On the Linux Host, find the Zephyr `net-tools`_ project, which can either be +found in a Zephyr standard installation under the ``tools/net-tools`` directory +or installed stand alone from its own git repository: .. code-block:: console @@ -190,3 +191,5 @@ or if you want to use native_sim board, type this: Also if you have firewall enabled in your host, you need to allow traffic between ``zeth.1``, ``zeth.2`` and ``zeth-br`` interfaces. + +.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools diff --git a/doc/connectivity/networking/qemu_802154_setup.rst b/doc/connectivity/networking/qemu_802154_setup.rst index 12b0ef74de9..b14e14425c0 100644 --- a/doc/connectivity/networking/qemu_802154_setup.rst +++ b/doc/connectivity/networking/qemu_802154_setup.rst @@ -20,13 +20,13 @@ For the steps below, you will need two terminal windows: * Terminal #2 is terminal window with ``echo-client`` Zephyr sample application. If you want to capture the transferred network data, you must compile the -``monitor_15_4`` program in ``net-tools`` directory. +``monitor_15_4`` program in the ``tools/net-tools`` directory. Open a terminal window and type: .. code-block:: console - cd $ZEPHYR_BASE/../net-tools + cd $ZEPHYR_BASE/../tools/net-tools make monitor_15_4 diff --git a/doc/connectivity/networking/qemu_eth_setup.rst b/doc/connectivity/networking/qemu_eth_setup.rst index a0219e6126c..f8b7e710fb1 100644 --- a/doc/connectivity/networking/qemu_eth_setup.rst +++ b/doc/connectivity/networking/qemu_eth_setup.rst @@ -18,8 +18,9 @@ an Ethernet network interface. Prerequisites ************* -On the Linux Host, fetch the Zephyr ``net-tools`` project, which is located -in a separate Git repository: +On the Linux Host, find the Zephyr `net-tools`_ project, which can either be +found in a Zephyr standard installation under the ``tools/net-tools`` directory +or installed stand alone from its own git repository: .. code-block:: console @@ -85,3 +86,5 @@ In terminal #2, type: :compact: Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. + +.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools diff --git a/doc/connectivity/networking/qemu_setup.rst b/doc/connectivity/networking/qemu_setup.rst index e27ba72aa91..bb69653063e 100644 --- a/doc/connectivity/networking/qemu_setup.rst +++ b/doc/connectivity/networking/qemu_setup.rst @@ -22,8 +22,9 @@ virtual connections). Prerequisites ************* -On the Linux Host, fetch the Zephyr ``net-tools`` project, which is located -in a separate Git repository: +On the Linux Host, find the Zephyr `net-tools`_ project, which can either be +found in a Zephyr standard installation under the ``tools/net-tools`` directory +or installed stand alone from its own git repository: .. code-block:: console @@ -249,7 +250,7 @@ Terminal #1: .. code-block:: console socat PTY,link=/tmp/slip.devMAIN UNIX-LISTEN:/tmp/slip.sockMAIN & - sudo $ZEPHYR_BASE/../net-tools/tunslip6 -t tapMAIN -T -s /tmp/slip.devMAIN 2001:db8::1/64 & + sudo $ZEPHYR_BASE/../tools/net-tools/tunslip6 -t tapMAIN -T -s /tmp/slip.devMAIN 2001:db8::1/64 & # Now run Zephyr make -Cbuild run QEMU_INSTANCE=MAIN @@ -259,5 +260,7 @@ Terminal #2: .. code-block:: console socat PTY,link=/tmp/slip.devOTHER UNIX-LISTEN:/tmp/slip.sockOTHER & - sudo $ZEPHYR_BASE/../net-tools/tunslip6 -t tapOTHER -T -s /tmp/slip.devOTHER 2001:db8::1/64 & + sudo $ZEPHYR_BASE/../tools/net-tools/tunslip6 -t tapOTHER -T -s /tmp/slip.devOTHER 2001:db8::1/64 & make -Cbuild run QEMU_INSTANCE=OTHER + +.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools diff --git a/doc/develop/west/basics.rst b/doc/develop/west/basics.rst index afedb33f5c8..342df36b9ae 100644 --- a/doc/develop/west/basics.rst +++ b/doc/develop/west/basics.rst @@ -36,7 +36,8 @@ If you've followed the :ref:`getting_started`, your local ├── modules/ │ └── lib/ │ └── zcbor/ # .git/ project - ├── net-tools/ # .git/ project + ├── tools/ + │ └── net-tools/ # .git/ project └── [ ... other projects ...] .. _west-workspace: diff --git a/samples/net/dns_resolve/README.rst b/samples/net/dns_resolve/README.rst index 0296ce1e716..e566fa44bd1 100644 --- a/samples/net/dns_resolve/README.rst +++ b/samples/net/dns_resolve/README.rst @@ -58,9 +58,9 @@ respectively. DNS server ========== -The dnsmasq tool may be used for testing purposes. Sample dnsmasq start -script can be downloaded from the zephyrproject-rtos/net-tools project area: -https://github.com/zephyrproject-rtos/net-tools +The dnsmasq tool may be used for testing purposes. On a Zephyr project default +installation, the sample dnsmasq start script can be found in the `net-tools`_ +project or downloaded from https://github.com/zephyrproject-rtos/net-tools. Open a terminal window and type: @@ -106,6 +106,7 @@ For testing mDNS, use Avahi script in net-tools project: $ cd net-tools $ ./avahi-daemon.sh +.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools LLMNR Responder =============== diff --git a/samples/net/sockets/http_client/README.rst b/samples/net/sockets/http_client/README.rst index d360ae45edf..d2739ef5644 100644 --- a/samples/net/sockets/http_client/README.rst +++ b/samples/net/sockets/http_client/README.rst @@ -51,10 +51,9 @@ running ``west build`` or ``cmake``. The certificate and private key used by the sample can be found in the sample's :zephyr_file:`samples/net/sockets/http_client/src/` directory. -The default certificates used by Socket HTTP Client and -``https-server.py`` program found in the -`net-tools `_ project, enable -establishing a secure connection between the samples. +The default certificates used by Socket HTTP Client and ``https-server.py`` +program found in the `net-tools`_ project, enable establishing a secure +connection between the samples. Running http-server in Linux Host @@ -87,3 +86,5 @@ Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. You can verify TLS communication with a Linux host as well. Just use the ``https-server.py`` program in net-tools project. + +.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools diff --git a/west.yml b/west.yml index 0c537a6a82f..6661ebf267b 100644 --- a/west.yml +++ b/west.yml @@ -295,7 +295,7 @@ manifest: - debug revision: 71ace1f5caa03e56c8740a09863e685efb4b2360 - name: net-tools - revision: 7c7a856814d7f27509c8511fef14cec21f7d0c30 + revision: a1fb781b67c33e9a6868b0915b627315c5cac668 path: tools/net-tools groups: - tools