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)))
31#define NET_HOSTNAME_MAX_LEN \
32 (sizeof(CONFIG_NET_HOSTNAME) - 1 + \
33 (IS_ENABLED(CONFIG_NET_HOSTNAME_UNIQUE) ? sizeof("0011223344556677") - 1 : 0))
36#if defined(CONFIG_NET_HOSTNAME_ENABLE)
37#define NET_HOSTNAME_SIZE NET_HOSTNAME_MAX_LEN + 1
39#define NET_HOSTNAME_SIZE 1
49#if defined(CONFIG_NET_HOSTNAME_ENABLE)
66#if defined(CONFIG_NET_HOSTNAME_DYNAMIC)
79#if defined(CONFIG_NET_HOSTNAME_ENABLE)
99#if defined(CONFIG_NET_HOSTNAME_UNIQUE)
static int net_hostname_set(char *host, size_t len)
Set the device hostname.
Definition: hostname.h:69
static int net_hostname_set_postfix(const uint8_t *hostname_postfix, int postfix_len)
Set the device hostname postfix.
Definition: hostname.h:103
static const char * net_hostname_get(void)
Get the device hostname.
Definition: hostname.h:52
static void net_hostname_init(void)
Initialize and set the device hostname.
Definition: hostname.h:82
#define ENOTSUP
Unsupported value.
Definition: errno.h:115
#define EMSGSIZE
Message size.
Definition: errno.h:107
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88