1# Hostname config
2
3# Copyright (c) 2017 Intel Corporation.
4# SPDX-License-Identifier: Apache-2.0
5
6config NET_HOSTNAME_ENABLE
7	bool "Add hostname to the device"
8	help
9	  This is used for example in mDNS to respond to <hostname>.local
10	  mDNS queries.
11
12if NET_HOSTNAME_ENABLE
13
14config NET_HOSTNAME
15	string "The hostname of this device"
16	default "zephyr"
17	help
18	  The string should be a valid hostname.
19
20config NET_HOSTNAME_DYNAMIC
21	bool "Allow the hostname to be set by the application"
22	depends on !NET_HOSTNAME_UNIQUE_UPDATE
23	help
24	  This will enable the net_hostname_set() function. NET_HOSTNAME
25	  will be used as default hostname.
26
27config NET_HOSTNAME_MAX_LEN
28	int "The maximum allowed hostname length"
29	depends on NET_HOSTNAME_DYNAMIC
30	range 1 63
31	default 63
32	help
33	  This will set the number of bytes allocateed for the hostname.
34
35config NET_HOSTNAME_UNIQUE
36	bool "Make hostname unique"
37	help
38	  This will append link address to NET_HOSTNAME to create a unique
39	  hostname. For example, zephyr00005e005357 could be the hostname
40	  if this setting is enabled.
41
42config NET_HOSTNAME_UNIQUE_UPDATE
43	bool "Update unique hostname"
44	depends on NET_HOSTNAME_UNIQUE
45	help
46	  This will update the unique hostname on link address changes. By
47	  default, this option is disabled, which means the unique hostname
48	  is set once at start-up and is not updated afterwards.
49
50module = NET_HOSTNAME
51module-dep = NET_LOG
52module-str = Log level for hostname configuration
53module-help = Enables hostname configuration code to output debug messages.
54source "subsys/net/Kconfig.template.log_config.net"
55
56endif
57