1.. zephyr:code-sample:: packet-socket
2   :name: Packet socket
3   :relevant-api: bsd_sockets ethernet
4
5   Use raw packet sockets over Ethernet.
6
7Overview
8********
9
10This sample is a simple packet socket application showing usage
11of packet sockets over Ethernet. The sample prints every packet
12received, and sends a dummy packet every 5 seconds.
13The Zephyr network subsystem does not touch any of the headers
14(L2, L3, etc.).
15
16Building and Running
17********************
18
19When the application is run, it opens a packet socket and prints
20the length of the packet it receives. After that it sends a dummy
21packet every 5 seconds. You can use Wireshark to observe these
22sent and received packets.
23
24See the `net-tools`_ project for more details.
25
26This sample can be built and executed on QEMU or native_sim board as
27described in :ref:`networking_with_host`.
28
29.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools
30