Add Kconfig option NET_HOSTNAME_UNIQUE_UPDATE to allow the unique
hostname - which is derived from the network interface's link
address - to be updated on both initial assignment and updates of
the link address.
Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
Add a macro in public header that represents maximum hostname string
length without terminating NULL character. This will allow other
modules, such as offloaded network drivers, to know how much space is
needed to allocate in order to fit whole hostname.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Following errors occuring after enabling debug logs:
log: argument 2 in source net_hostname log message "%s: (%s): \
Hostname set to %s" missinglog_strdup().
log: argument 2 in source net_hostname log message "%s: (%s): \
New hostname %s" missinglog_strdup().
Fix that by printing CONFIG_NET_HOSTNAME directly in the first case and
using log_strdup() in the second.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Remove network specific default and max log level setting
and start to use the zephyr logging values for those.
Remove LOG_MODULE_REGISTER() from net_core.h and place the
calls into .c files. This is done in order to avoid weird
compiler errors in some cases and to make the code look similar
as other subsystems.
Fixes#11343Fixes#11659
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of one global log level option and one on/off boolean
config option / module, this commit creates one log level option
for each module. This simplifies the logging as it is now possible
to enable different level of debugging output for each network
module individually.
The commit also converts the code to use the new logger
instead of the old sys_log.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
User can configure hostname of the device in Kconfig. This can
be used by mDNS responder to answer <hostname>.local queries.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>