1# Options for networking configuration
2
3# Copyright (c) 2017 Intel Corporation.
4# SPDX-License-Identifier: Apache-2.0
5
6config NET_CONFIG_AUTO_INIT
7	bool "Init networking support automatically during device startup"
8	default n if USB_DEVICE_NETWORK
9	default y
10	help
11	  If this option is set, then the networking system is automatically
12	  initialized when the device is started. If you do not wish to do
13	  this, then disable this and call net_config_init() in your application.
14
15config NET_CONFIG_INIT_PRIO
16	int "Startup priority for the network application init"
17	default 95
18	depends on NET_CONFIG_AUTO_INIT
19
20config NET_CONFIG_INIT_TIMEOUT
21	int "How long to wait for networking to be ready and available"
22	default 30
23	help
24	  The value is in seconds. If for example IPv4 address from DHCPv4 is not
25	  received within this limit, then the net_config_init() call will fail
26	  during the device startup.
27
28config NET_CONFIG_NEED_IPV6
29	bool "This application wants IPv6 support"
30	depends on NET_CONFIG_AUTO_INIT
31	select NET_IPV6
32	help
33	  The network application needs IPv6 support to function properly.
34	  This option makes sure the network application is initialized properly
35	  in order to use IPv6.
36
37config NET_CONFIG_NEED_IPV6_ROUTER
38	bool "This application wants IPv6 router to exists"
39	depends on NET_CONFIG_AUTO_INIT
40	depends on NET_IPV6
41	help
42	  The network application needs IPv6 router to exists before continuing.
43	  What this means that the application wants to wait until it receives
44	  IPv6 router advertisement message before continuing.
45
46config NET_CONFIG_NEED_IPV4
47	bool "This application wants IPv4 support"
48	depends on NET_CONFIG_AUTO_INIT
49	select NET_IPV4
50	help
51	  The network application needs IPv4 support to function properly.
52	  This option makes sure the network application is initialized properly
53	  in order to use IPv4.
54
55module = NET_CONFIG
56module-dep = NET_LOG
57module-str = Log level for network config library
58module-help = Enables net config library to output debug messages.
59source "subsys/net/Kconfig.template.log_config.net"
60
61menuconfig NET_CONFIG_SETTINGS
62	bool "Set network settings for applications"
63	select NET_MGMT
64	select NET_MGMT_EVENT
65	help
66	  Allow IP addresses to be set in config file for
67	  networking client/server sample applications, or
68	  some link-layer dedicated settings like the channel.
69	  Beware this is not meant to be used for proper
70	  provisioning but quick sampling/testing.
71
72if NET_CONFIG_SETTINGS
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
188config NET_CONFIG_BT_NODE
189	bool "Bluetooth node support"
190	depends on NET_L2_BT
191	select NET_L2_BT_MGMT
192	help
193	  Enables application to operate in node mode which requires GATT
194	  service to be registered and start advertising as peripheral.
195
196endif # NET_CONFIG_SETTINGS
197
198if NET_DHCPV6
199
200config NET_CONFIG_DHCPV6_REQUEST_ADDR
201	bool "Request IPv6 address when configuring DHCPv6 client"
202	default y
203	help
204	  When DHCPv6 is enabled this will configure the DHCPv6 client to
205	  request IPv6 address from the DHCPv6 server.
206
207config NET_CONFIG_DHCPV6_REQUEST_PREFIX
208	bool "Request IPv6 prefix when configuring DHCPv6 client"
209	help
210	  When DHCPv6 is enabled this will configure the DHCPv6 client to
211	  request IPv6 prefix from the DHCPv6 server.
212
213endif # NET_DHCPV6
214
215config NET_CONFIG_CLOCK_SNTP_INIT
216	bool "Initialize system clock using SNTP on application startup"
217	depends on SNTP && POSIX_CLOCK
218	help
219	  Perform an SNTP request over networking to get and absolute
220	  wall clock time, and initialize system time from it, so
221	  functions like time(), gettimeofday(), etc. returned the
222	  correct absolute time (no just time since system startup).
223	  Requires networking.
224
225if NET_CONFIG_CLOCK_SNTP_INIT
226
227config NET_CONFIG_SNTP_INIT_SERVER
228	string "SNTP server to use for system clock init"
229	default ""
230	help
231	  Zephyr does not provide default setting for this option. Each
232	  application and vendor should choose a suitable setting based
233	  on their locality, needs, and server's terms of service. See
234	  e.g. server information at
235	  https://support.ntp.org/bin/view/Servers/NTPPoolServers
236
237config NET_CONFIG_SNTP_INIT_TIMEOUT
238	int "SNTP timeout to init system clock (ms)"
239	default 3000
240
241endif # NET_CONFIG_CLOCK_SNTP_INIT
242