• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

boards/03-Aug-2024-32

src/03-Aug-2024-808611

CMakeLists.txtD03-Aug-2024258 106

KconfigD03-Aug-20242.9 KiB10588

README.rstD03-Aug-20241.5 KiB3729

overlay-e1000.confD03-Aug-2024101 73

overlay-vlan.confD03-Aug-2024892 2712

prj.confD03-Aug-20241.6 KiB6641

sample.yamlD03-Aug-2024391 2018

README.rst

1.. zephyr:code-sample:: so_txtime
2   :name: UDP sender using SO_TXTIME
3   :relevant-api: bsd_sockets ethernet
4
5   Control the transmission time of a packet using SO_TXTIME socket option.
6
7Overview
8********
9
10This sample is a simple UDP sender/receiver which will set the
11SO_TXTIME socket option and expects the Ethernet driver to send
12the data when the TX time is expected. The application requires
13that the board has PTP clock support. A simulated PTP clock is
14provided for qemu_x86 board. Also frdm_k64f and sam_e70_xplained/same70q21 boards
15are supported. Other mcux or gmac Ethernet driver based boards should
16work too.
17User can control how long the application should wait between packets sent by
18setting :kconfig:option:`CONFIG_NET_SAMPLE_PACKET_INTERVAL` option.
19Also the TXTIME value can be specified in the config file by setting the
20:kconfig:option:`CONFIG_NET_SAMPLE_PACKET_TXTIME` option. In this case the value is
21used as an offset from the current time.
22
23Building and Running
24********************
25
26When the application is run, it starts to send UDP packets. You can start
27``echo-server`` application from `net-tools`_ project to catch these and
28send the data back to this application. Optionally you can set
29:kconfig:option:`CONFIG_NET_SAMPLE_PACKET_SOCKET` option, which makes the application
30to create an ``AF_PACKET`` type socket. In this case, the ``echo-server``
31application cannot be used as a peer.
32
33This sample can be built and executed on qemu_x86 board as
34described in :ref:`networking_with_host`.
35
36.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools
37