Network Management Socket

Overview

The net-mgmt-socket sample application for Zephyr implements a listener for network management events that the networking subsystem is sending.

The source code for this sample application can be found at: samples/net/sockets/net_mgmt.

Building and Running

There are multiple ways to use this application. One of the most common usage scenario is to run echo-server application inside QEMU. This is described in Networking with QEMU.

Build net-mgmt socket sample application like this:

Using west:

west build -b <board to use> samples/net/sockets/net_mgmt -- -DCONF_FILE=<config file to use>

Using CMake and ninja:

cmake -B build -GNinja -DBOARD=<board to use> -DCONF_FILE=<config file to use> samples/net/sockets/net_mgmt
ninja -C build

Example building for the native_posix board:

Using west:

west build -t run

Using CMake and ninja:

cmake -B build -GNinja -DBOARD=native_posix -DCONF_FILE=prj.conf samples/net/sockets/net_mgmt
ninja -C build run