1# Options for networking configuration 2 3# Copyright (c) 2017 Intel Corporation. 4# SPDX-License-Identifier: Apache-2.0 5 6module = NET_CONFIG 7module-dep = NET_LOG 8module-str = Log level for network config library 9module-help = Enables net config library to output debug messages. 10source "subsys/net/Kconfig.template.log_config.net" 11 12menuconfig NET_CONFIG_SETTINGS 13 bool "Set network settings for applications" 14 select NET_MGMT 15 select NET_MGMT_EVENT 16 help 17 Allow IP addresses to be set in config file for 18 networking client/server sample applications, or 19 some link-layer dedicated settings like the channel. 20 Beware this is not meant to be used for proper 21 provisioning but quick sampling/testing. 22 23if NET_CONFIG_SETTINGS 24 25config NET_CONFIG_AUTO_INIT 26 bool "Init networking support automatically during device startup" 27 default y if !(USB_DEVICE_NETWORK || USBD_CDC_ECM_CLASS || USBD_CDC_NCM_CLASS) 28 help 29 If this option is set, then the networking system is automatically 30 initialized when the device is started. If you do not wish to do 31 this, then disable this and call net_config_init() in your application. 32 33if NET_CONFIG_AUTO_INIT 34 35config NET_CONFIG_INIT_PRIO 36 int "Startup priority for the network application init" 37 default 95 38 39config NET_CONFIG_NEED_IPV6 40 bool "This application wants IPv6 support" 41 select NET_IPV6 42 help 43 The network application needs IPv6 support to function properly. 44 This option makes sure the network application is initialized properly 45 in order to use IPv6. 46 47config NET_CONFIG_NEED_IPV6_ROUTER 48 bool "This application wants IPv6 router to exists" 49 depends on NET_IPV6 50 help 51 The network application needs IPv6 router to exists before continuing. 52 What this means that the application wants to wait until it receives 53 IPv6 router advertisement message before continuing. 54 55config NET_CONFIG_NEED_IPV4 56 bool "This application wants IPv4 support" 57 select NET_IPV4 58 help 59 The network application needs IPv4 support to function properly. 60 This option makes sure the network application is initialized properly 61 in order to use IPv4. 62 63endif # NET_CONFIG_AUTO_INIT 64 65config NET_CONFIG_INIT_TIMEOUT 66 int "How long to wait for networking to be ready and available" 67 default 30 68 help 69 The value is in seconds. If for example IPv4 address from DHCPv4 is not 70 received within this limit, then the net_config_init() call will fail 71 during the device startup. 72 73config NET_CONFIG_MY_VLAN_ID 74 int "My VLAN identifier" 75 default 0 76 depends on NET_VLAN 77 help 78 Use 0 here if uncertain. 79 80if NET_IPV6 81 82config NET_CONFIG_MY_IPV6_ADDR 83 string "My IPv6 address" 84 help 85 Use 2001:db8::1 here if uncertain. 86 87config NET_CONFIG_PEER_IPV6_ADDR 88 string "Peer IPv6 address" 89 help 90 This is only applicable in client side applications that try 91 to establish a connection to peer host. 92 Use 2001:db8::2 here if uncertain. 93 94endif # NET_IPV6 95 96if NET_IPV4 97 98config NET_CONFIG_MY_IPV4_ADDR 99 string "My IPv4 address" 100 help 101 Use 192.0.2.1 here if uncertain. 102 103config NET_CONFIG_MY_IPV4_NETMASK 104 string "My IPv4 netmask" 105 default "255.255.255.0" 106 help 107 Static netmask to use if not overridden by DHCP. Use empty value to 108 skip setting static value. 109 110config NET_CONFIG_MY_IPV4_GW 111 string "My IPv4 gateway" 112 help 113 Static gateway to use if not overridden by DHCP. Use empty value to 114 skip setting static value. 115 116config NET_CONFIG_PEER_IPV4_ADDR 117 string "Peer IPv4 address" 118 help 119 This is only applicable in client side applications that try 120 to establish a connection to peer host. 121 Use 192.0.2.2 here if uncertain. 122 123endif # NET_IPV4 124 125if NET_L2_IEEE802154 || IEEE802154_RAW_MODE 126 127config NET_CONFIG_IEEE802154_PAN_ID 128 hex "IEEE 802.15.4 PAN ID" 129 default 0xabcd 130 help 131 The PAN ID to use by default in the sample. 132 133config NET_CONFIG_IEEE802154_CHANNEL 134 int "IEEE 802.15.4 channel" 135 default 26 136 help 137 The channel to use by default in the sample application. 138 139config NET_CONFIG_IEEE802154_RADIO_TX_POWER 140 int "IEEE 802.15.4 TX power in dbm" 141 default 0 142 help 143 The TX power to use by default in the sample application. 144 See NET_L2_IEEE802154_RADIO_DFLT_TX_POWER for more info. 145 146config NET_CONFIG_IEEE802154_SECURITY_KEY 147 string "IEEE 802.15.4 security key" 148 default "moooh!" 149 depends on NET_L2_IEEE802154_SECURITY 150 help 151 The key string to use for the link-layer security part. 152 153config NET_CONFIG_IEEE802154_SECURITY_KEY_MODE 154 int "IEEE 802.15.4 security key mode" 155 default 0 156 range 0 0 157 depends on NET_L2_IEEE802154_SECURITY 158 help 159 The key mode to use for the link-layer security part. 160 Only implicit mode is supported, thus 0. 161 162config NET_CONFIG_IEEE802154_SECURITY_LEVEL 163 int "IEEE 802.15.4 security level (0-7)" 164 default 0 165 range 0 7 166 depends on NET_L2_IEEE802154_SECURITY 167 help 168 The security level to use for the link-layer security part. 169 0 means no security 170 1 authentication only with a 4 bytes length tag 171 2 authentication only with a 8 bytes length tag 172 3 authentication only with a 16 bytes length tag 173 4 deprecated since IEEE 802.15.4-2015 174 5 encryption/authentication with a 4 bytes length tag 175 6 encryption/authentication with a 8 bytes length tag 176 7 encryption/authentication with a 16 bytes length tag 177 178config NET_CONFIG_IEEE802154_ACK_REQUIRED 179 bool "IEEE 802.15.4 acknowledgment" 180 default y 181 help 182 Whether or not to request and require IEEE 802.15.4 acknowledgment 183 packets. 184 185endif # NET_L2_IEEE802154 || IEEE802154_RAW_MODE 186 187endif # NET_CONFIG_SETTINGS 188 189if NET_DHCPV6 190 191config NET_CONFIG_DHCPV6_REQUEST_ADDR 192 bool "Request IPv6 address when configuring DHCPv6 client" 193 default y 194 help 195 When DHCPv6 is enabled this will configure the DHCPv6 client to 196 request IPv6 address from the DHCPv6 server. 197 198config NET_CONFIG_DHCPV6_REQUEST_PREFIX 199 bool "Request IPv6 prefix when configuring DHCPv6 client" 200 help 201 When DHCPv6 is enabled this will configure the DHCPv6 client to 202 request IPv6 prefix from the DHCPv6 server. 203 204endif # NET_DHCPV6 205 206config NET_CONFIG_CLOCK_SNTP_INIT 207 bool "Initialize system clock using SNTP on application startup" 208 depends on SNTP 209 help 210 Perform an SNTP request over networking to get and absolute 211 wall clock time, and initialize system time from it, so 212 functions like time(), gettimeofday(), etc. returned the 213 correct absolute time (no just time since system startup). 214 Requires networking. 215 216if NET_CONFIG_CLOCK_SNTP_INIT 217 218ZEPHYR_RTC := zephyr,rtc 219 220config NET_CONFIG_CLOCK_SNTP_SET_RTC 221 bool "Set RTC on SNTP response" 222 depends on RTC 223 depends on $(dt_chosen_enabled,$(ZEPHYR_RTC)) 224 help 225 Set RTC when an SNTP response is received. 226 Requires `zephyr,rtc` chosen. 227 228config NET_CONFIG_SNTP_INIT_SERVER 229 string "SNTP server to use for system clock init" 230 default "" 231 help 232 Zephyr does not provide default setting for this option. Each 233 application and vendor should choose a suitable setting based 234 on their locality, needs, and server's terms of service. See 235 e.g. server information at 236 https://support.ntp.org/bin/view/Servers/NTPPoolServers 237 238config NET_CONFIG_SNTP_INIT_SERVER_USE_DHCPV4_OPTION 239 bool "SNTP server to use for system clock init is set using DHCPv4 option" 240 default y 241 depends on NET_DHCPV4_OPTION_NTP_SERVER 242 help 243 If this option is set, then the SNTP server to use for system 244 clock init can be set using DHCPv4 option. 245 246config NET_CONFIG_SNTP_INIT_TIMEOUT 247 int "SNTP timeout to init system clock (ms)" 248 default 3000 249 250config NET_CONFIG_SNTP_INIT_RESYNC 251 bool "Resync system clock using SNTP periodically" 252 depends on NET_SOCKETS_SERVICE 253 help 254 Perform an SNTP request over networking periodically to get and 255 absolute wall clock time, and resync system time from it. 256 257if NET_CONFIG_SNTP_INIT_RESYNC 258 259config NET_CONFIG_SNTP_INIT_RESYNC_INTERVAL 260 int "SNTP resync interval (sec)" 261 default 3600 262 range 15 $(UINT32_MAX) 263 264config NET_CONFIG_SNTP_INIT_RESYNC_ON_FAILURE_INTERVAL 265 int "SNTP resync interval (sec) on failure" 266 default NET_CONFIG_SNTP_INIT_RESYNC_INTERVAL 267 range 15 $(UINT32_MAX) 268 help 269 If the SNTP request fails, then this is the interval to wait 270 before trying again. 271 272config NET_CONFIG_SNTP_INIT_USE_CONNECTION_MANAGER 273 bool "Use connection manager to start and stop SNTP client" 274 default y 275 depends on NET_CONNECTION_MANAGER 276 help 277 If this option is set, then the connection manager is used to 278 start and stop the SNTP server. This way an SNTP request is 279 also sent everytime when the network connection is established. 280 281endif # NET_CONFIG_SNTP_INIT_RESYNC 282endif # NET_CONFIG_CLOCK_SNTP_INIT 283