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 n if USB_DEVICE_NETWORK || USBD_CDC_ECM_CLASS || USBD_CDC_NCM_CLASS 28 default y 29 help 30 If this option is set, then the networking system is automatically 31 initialized when the device is started. If you do not wish to do 32 this, then disable this and call net_config_init() in your application. 33 34if NET_CONFIG_AUTO_INIT 35 36config NET_CONFIG_INIT_PRIO 37 int "Startup priority for the network application init" 38 default 95 39 40config NET_CONFIG_NEED_IPV6 41 bool "This application wants IPv6 support" 42 select NET_IPV6 43 help 44 The network application needs IPv6 support to function properly. 45 This option makes sure the network application is initialized properly 46 in order to use IPv6. 47 48config NET_CONFIG_NEED_IPV6_ROUTER 49 bool "This application wants IPv6 router to exists" 50 depends on NET_IPV6 51 help 52 The network application needs IPv6 router to exists before continuing. 53 What this means that the application wants to wait until it receives 54 IPv6 router advertisement message before continuing. 55 56config NET_CONFIG_NEED_IPV4 57 bool "This application wants IPv4 support" 58 select NET_IPV4 59 help 60 The network application needs IPv4 support to function properly. 61 This option makes sure the network application is initialized properly 62 in order to use IPv4. 63 64endif # NET_CONFIG_AUTO_INIT 65 66config NET_CONFIG_INIT_TIMEOUT 67 int "How long to wait for networking to be ready and available" 68 default 30 69 help 70 The value is in seconds. If for example IPv4 address from DHCPv4 is not 71 received within this limit, then the net_config_init() call will fail 72 during the device startup. 73 74config NET_CONFIG_MY_VLAN_ID 75 int "My VLAN identifier" 76 default 0 77 depends on NET_VLAN 78 help 79 Use 0 here if uncertain. 80 81if NET_IPV6 82 83config NET_CONFIG_MY_IPV6_ADDR 84 string "My IPv6 address" 85 help 86 Use 2001:db8::1 here if uncertain. 87 88config NET_CONFIG_PEER_IPV6_ADDR 89 string "Peer IPv6 address" 90 help 91 This is only applicable in client side applications that try 92 to establish a connection to peer host. 93 Use 2001:db8::2 here if uncertain. 94 95endif # NET_IPV6 96 97if NET_IPV4 98 99config NET_CONFIG_MY_IPV4_ADDR 100 string "My IPv4 address" 101 help 102 Use 192.0.2.1 here if uncertain. 103 104config NET_CONFIG_MY_IPV4_NETMASK 105 string "My IPv4 netmask" 106 default "255.255.255.0" 107 help 108 Static netmask to use if not overridden by DHCP. Use empty value to 109 skip setting static value. 110 111config NET_CONFIG_MY_IPV4_GW 112 string "My IPv4 gateway" 113 help 114 Static gateway to use if not overridden by DHCP. Use empty value to 115 skip setting static value. 116 117config NET_CONFIG_PEER_IPV4_ADDR 118 string "Peer IPv4 address" 119 help 120 This is only applicable in client side applications that try 121 to establish a connection to peer host. 122 Use 192.0.2.2 here if uncertain. 123 124endif # NET_IPV4 125 126if NET_L2_IEEE802154 || IEEE802154_RAW_MODE 127 128config NET_CONFIG_IEEE802154_PAN_ID 129 hex "IEEE 802.15.4 PAN ID" 130 default 0xabcd 131 help 132 The PAN ID to use by default in the sample. 133 134config NET_CONFIG_IEEE802154_CHANNEL 135 int "IEEE 802.15.4 channel" 136 default 26 137 help 138 The channel to use by default in the sample application. 139 140config NET_CONFIG_IEEE802154_RADIO_TX_POWER 141 int "IEEE 802.15.4 TX power in dbm" 142 default 0 143 help 144 The TX power to use by default in the sample application. 145 See NET_L2_IEEE802154_RADIO_DFLT_TX_POWER for more info. 146 147config NET_CONFIG_IEEE802154_SECURITY_KEY 148 string "IEEE 802.15.4 security key" 149 default "moooh!" 150 depends on NET_L2_IEEE802154_SECURITY 151 help 152 The key string to use for the link-layer security part. 153 154config NET_CONFIG_IEEE802154_SECURITY_KEY_MODE 155 int "IEEE 802.15.4 security key mode" 156 default 0 157 range 0 0 158 depends on NET_L2_IEEE802154_SECURITY 159 help 160 The key mode to use for the link-layer security part. 161 Only implicit mode is supported, thus 0. 162 163config NET_CONFIG_IEEE802154_SECURITY_LEVEL 164 int "IEEE 802.15.4 security level (0-7)" 165 default 0 166 range 0 7 167 depends on NET_L2_IEEE802154_SECURITY 168 help 169 The security level to use for the link-layer security part. 170 0 means no security 171 1 authentication only with a 4 bytes length tag 172 2 authentication only with a 8 bytes length tag 173 3 authentication only with a 16 bytes length tag 174 4 deprecated since IEEE 802.15.4-2015 175 5 encryption/authentication with a 4 bytes length tag 176 6 encryption/authentication with a 8 bytes length tag 177 7 encryption/authentication with a 16 bytes length tag 178 179config NET_CONFIG_IEEE802154_ACK_REQUIRED 180 bool "IEEE 802.15.4 acknowledgment" 181 default y 182 help 183 Whether or not to request and require IEEE 802.15.4 acknowledgment 184 packets. 185 186endif # NET_L2_IEEE802154 || IEEE802154_RAW_MODE 187 188endif # NET_CONFIG_SETTINGS 189 190if NET_DHCPV6 191 192config NET_CONFIG_DHCPV6_REQUEST_ADDR 193 bool "Request IPv6 address when configuring DHCPv6 client" 194 default y 195 help 196 When DHCPv6 is enabled this will configure the DHCPv6 client to 197 request IPv6 address from the DHCPv6 server. 198 199config NET_CONFIG_DHCPV6_REQUEST_PREFIX 200 bool "Request IPv6 prefix when configuring DHCPv6 client" 201 help 202 When DHCPv6 is enabled this will configure the DHCPv6 client to 203 request IPv6 prefix from the DHCPv6 server. 204 205endif # NET_DHCPV6 206 207config NET_CONFIG_CLOCK_SNTP_INIT 208 bool "Initialize system clock using SNTP on application startup" 209 depends on SNTP && POSIX_TIMERS 210 help 211 Perform an SNTP request over networking to get and absolute 212 wall clock time, and initialize system time from it, so 213 functions like time(), gettimeofday(), etc. returned the 214 correct absolute time (no just time since system startup). 215 Requires networking. 216 217if NET_CONFIG_CLOCK_SNTP_INIT 218 219config NET_CONFIG_SNTP_INIT_SERVER 220 string "SNTP server to use for system clock init" 221 default "" 222 help 223 Zephyr does not provide default setting for this option. Each 224 application and vendor should choose a suitable setting based 225 on their locality, needs, and server's terms of service. See 226 e.g. server information at 227 https://support.ntp.org/bin/view/Servers/NTPPoolServers 228 229config NET_CONFIG_SNTP_INIT_SERVER_USE_DHCPV4_OPTION 230 bool "SNTP server to use for system clock init is set using DHCPv4 option" 231 default y 232 depends on NET_DHCPV4_OPTION_NTP_SERVER 233 help 234 If this option is set, then the SNTP server to use for system 235 clock init can be set using DHCPv4 option. 236 237config NET_CONFIG_SNTP_INIT_TIMEOUT 238 int "SNTP timeout to init system clock (ms)" 239 default 3000 240 241config NET_CONFIG_SNTP_INIT_RESYNC 242 bool "Resync system clock using SNTP periodically" 243 help 244 Perform an SNTP request over networking periodically to get and 245 absolute wall clock time, and resync system time from it. 246 247config NET_CONFIG_SNTP_INIT_RESYNC_INTERVAL 248 int "SNTP resync interval (sec)" 249 depends on NET_CONFIG_SNTP_INIT_RESYNC 250 default 3600 251 252endif # NET_CONFIG_CLOCK_SNTP_INIT 253