Skip to content
Commit 5d3bc8b3 authored by Daniel Egger's avatar Daniel Egger Committed by Jukka Rissanen
Browse files

net: pkt: Added new function net_pkt_append_memset() to prefill packet



Some locations like DHCPv4 client create a prefilled packet by appending
new fragments in a loop with one byte each via net_pkt_append_u8() which
is wasteful and noisy. This patch adds the new functions
net_pkt_append_memset() which creates fragments as needed in the desired
size and initialises it to the specified value.

This change also adds a unittest for the new function.

Prerequisite for #9287

Signed-off-by: default avatarDaniel Egger <daniel@eggers-club.de>
parent afa0e002
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment