Skip to content

Commit 6596c30

Browse files
Tomasz Bursztykajukkar
authored andcommitted
test/net: Quick sample explaining/testing the new net_pkt buffer API
This goes through basic allocation, atomic read/write, data getter/setter and cloning/copying. Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent 0550b8e commit 6596c30

File tree

4 files changed

+642
-0
lines changed

4 files changed

+642
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
cmake_minimum_required(VERSION 3.13.1)
2+
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
3+
project(NONE)
4+
5+
FILE(GLOB app_sources src/*.c)
6+
target_sources(app PRIVATE ${app_sources})

tests/net/net_pkt_new/prj.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CONFIG_NET_TEST=y
2+
CONFIG_ZTEST=y
3+
4+
CONFIG_NETWORKING=y
5+
CONFIG_NET_L2_ETHERNET=y
6+
CONFIG_NET_IPV4=y
7+
CONFIG_NET_IPV6=n
8+
CONFIG_NET_ARP=y
9+
CONFIG_NET_UDP=y
10+
CONFIG_NET_BUF_LOG=y
11+
CONFIG_NET_LOG=y
12+
13+
CONFIG_ENTROPY_GENERATOR=y
14+
CONFIG_TEST_RANDOM_GENERATOR=y

0 commit comments

Comments
 (0)