Skip to content

Commit 93caed4

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 9b2d2e7 commit 93caed4

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
@@ -27,6 +27,13 @@ config HEAP_MEM_POOL_ADD_SIZE_NET_CONFIG
2727
default 1024
2828
depends on SETTINGS
2929

30+
config NET_CONFIG_SETTINGS_SHELL_ACCESS
31+
bool "Configure options via shell"
32+
select SETTINGS
33+
help
34+
If this is set, then user is able to use "net config" shell to
35+
update the default options. This requires settings db.
36+
3037
config NET_CONFIG_AUTO_INIT
3138
bool "Init networking support automatically during device startup"
3239
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)