11#ifndef ZEPHYR_INCLUDE_NET_HOSTNAME_H_
12#define ZEPHYR_INCLUDE_NET_HOSTNAME_H_
25#if defined(CONFIG_NET_HOSTNAME_MAX_LEN)
26#define NET_HOSTNAME_MAX_LEN \
27 MAX(CONFIG_NET_HOSTNAME_MAX_LEN, \
28 (sizeof(CONFIG_NET_HOSTNAME) - 1 + \
29 (IS_ENABLED(CONFIG_NET_HOSTNAME_UNIQUE) ? sizeof("0011223344556677") - 1 : 0)))
32#define NET_HOSTNAME_MAX_LEN \
33 (sizeof(CONFIG_NET_HOSTNAME) - 1 + \
34 (IS_ENABLED(CONFIG_NET_HOSTNAME_UNIQUE) ? sizeof("0011223344556677") - 1 : 0))
39#if defined(CONFIG_NET_HOSTNAME_ENABLE)
40#define NET_HOSTNAME_SIZE NET_HOSTNAME_MAX_LEN + 1
42#define NET_HOSTNAME_SIZE 1
54#if defined(CONFIG_NET_HOSTNAME_ENABLE)
71#if defined(CONFIG_NET_HOSTNAME_DYNAMIC)
84#if defined(CONFIG_NET_HOSTNAME_ENABLE)
104#if defined(CONFIG_NET_HOSTNAME_UNIQUE)
111 ARG_UNUSED(hostname_postfix);
112 ARG_UNUSED(postfix_len);
static int net_hostname_set(char *host, size_t len)
Set the device hostname.
Definition: hostname.h:74
static int net_hostname_set_postfix(const uint8_t *hostname_postfix, int postfix_len)
Set the device hostname postfix.
Definition: hostname.h:108
static const char * net_hostname_get(void)
Get the device hostname.
Definition: hostname.h:57
static void net_hostname_init(void)
Initialize and set the device hostname.
Definition: hostname.h:87
#define ENOTSUP
Unsupported value.
Definition: errno.h:114
#define EMSGSIZE
Message size.
Definition: errno.h:106
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88