Skip to content

Commit 86ef791

Browse files
committed
net: shell: config: Add a way to see / modify configuration
Add "net config" command to view the current configuration and modify or remove the configuration data. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent ca2fe43 commit 86ef791

File tree

4 files changed

+710
-0
lines changed

4 files changed

+710
-0
lines changed

subsys/net/lib/config/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ config HEAP_MEM_POOL_ADD_SIZE_NET_CONFIG
3030
default 1024
3131
depends on SETTINGS
3232

33+
config NET_CONFIG_SETTINGS_SHELL_ACCESS
34+
bool "Configure options via shell"
35+
select SETTINGS
36+
help
37+
If this is set, then user is able to use "net config" shell to
38+
update the default options. This requires settings db.
39+
3340
config NET_CONFIG_AUTO_INIT
3441
bool "Init networking support automatically during device startup"
3542
default y if !(USB_DEVICE_NETWORK || USBD_CDC_ECM_CLASS || USBD_CDC_NCM_CLASS)

subsys/net/lib/shell/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS mbedTLS)
99
zephyr_library_sources_ifdef(CONFIG_NET_SHELL_PKT_ALLOC_SUPPORTED allocs.c)
1010
zephyr_library_sources_ifdef(CONFIG_NET_SHELL_ETHERNET_SUPPORTED arp.c)
1111
zephyr_library_sources_ifdef(CONFIG_NET_SHELL_CAPTURE_SUPPORTED capture.c)
12+
zephyr_library_sources_ifdef(CONFIG_NET_SHELL_CONFIG_SETTINGS_SUPPORTED config.c)
1213
zephyr_library_sources(conn.c)
1314
zephyr_library_sources_ifdef(CONFIG_NET_SHELL_DHCPV4_SUPPORTED dhcpv4.c)
1415
zephyr_library_sources_ifdef(CONFIG_NET_SHELL_DHCPV6_SUPPORTED dhcpv6.c)

subsys/net/lib/shell/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ config NET_SHELL_CAPTURE_SUPPORTED
3535
default y
3636
depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_CAPTURE
3737

38+
config NET_SHELL_CONFIG_SETTINGS_SUPPORTED
39+
bool "Network stack configuration"
40+
default y
41+
depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_CONFIG_SETTINGS
42+
3843
config NET_SHELL_DHCPV4_SUPPORTED
3944
bool "DHCPv4 start / stop"
4045
default y

0 commit comments

Comments
 (0)