11#ifndef ZEPHYR_INCLUDE_NET_HOSTNAME_H_
12#define ZEPHYR_INCLUDE_NET_HOSTNAME_H_
27#if defined(CONFIG_NET_HOSTNAME_MAX_LEN)
28#define NET_HOSTNAME_MAX_LEN \
29 MAX(CONFIG_NET_HOSTNAME_MAX_LEN, \
30 (sizeof(CONFIG_NET_HOSTNAME) - 1 + \
31 (IS_ENABLED(CONFIG_NET_HOSTNAME_UNIQUE) ? sizeof("0011223344556677") - 1 : 0)))
34#define NET_HOSTNAME_MAX_LEN \
35 (sizeof(CONFIG_NET_HOSTNAME) - 1 + \
36 (IS_ENABLED(CONFIG_NET_HOSTNAME_UNIQUE) ? sizeof("0011223344556677") - 1 : 0))
41#if defined(CONFIG_NET_HOSTNAME_ENABLE)
42#define NET_HOSTNAME_SIZE NET_HOSTNAME_MAX_LEN + 1
44#define NET_HOSTNAME_SIZE 1
56#if defined(CONFIG_NET_HOSTNAME_ENABLE)
73#if defined(CONFIG_NET_HOSTNAME_DYNAMIC)
86#if defined(CONFIG_NET_HOSTNAME_ENABLE)
107#if defined(CONFIG_NET_HOSTNAME_UNIQUE)
114 ARG_UNUSED(hostname_postfix);
115 ARG_UNUSED(postfix_len);
134#if defined(CONFIG_NET_HOSTNAME_UNIQUE)
141 ARG_UNUSED(hostname_postfix);
142 ARG_UNUSED(postfix_len);
static int net_hostname_set(char *host, size_t len)
Set the device hostname.
Definition hostname.h:76
static int net_hostname_set_postfix_str(const uint8_t *hostname_postfix, int postfix_len)
Set the postfix string for the network hostname.
Definition hostname.h:138
static int net_hostname_set_postfix(const uint8_t *hostname_postfix, int postfix_len)
Set the device hostname postfix.
Definition hostname.h:111
static const char * net_hostname_get(void)
Get the device hostname.
Definition hostname.h:59
static void net_hostname_init(void)
Initialize and set the device hostname.
Definition hostname.h:89
#define ENOTSUP
Unsupported value.
Definition errno.h:114
#define EMSGSIZE
Message size.
Definition errno.h:106
__UINT8_TYPE__ uint8_t
Definition stdint.h:88