Zephyr Project API 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
log_backend_net.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 David Corbeil
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_LOG_BACKEND_NET_H_
8#define ZEPHYR_LOG_BACKEND_NET_H_
9
10#include <stdbool.h>
11#include <zephyr/net/net_ip.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
29bool log_backend_net_set_addr(const char *addr);
30
43bool log_backend_net_set_ip(const struct sockaddr *addr);
44
54#if defined(CONFIG_NET_HOSTNAME_ENABLE)
55void log_backend_net_hostname_set(char *hostname, size_t len);
56#else
57static inline void log_backend_net_hostname_set(const char *hostname, size_t len)
58{
59 ARG_UNUSED(hostname);
60 ARG_UNUSED(len);
61}
62#endif
63
71const struct log_backend *log_backend_net_get(void);
72
79
80#ifdef __cplusplus
81}
82#endif
83
84#endif /* ZEPHYR_LOG_BACKEND_NET_H_ */
bool log_backend_net_set_addr(const char *addr)
Allows user to set a server IP address, provided as string, at runtime.
static void log_backend_net_hostname_set(const char *hostname, size_t len)
update the hostname
Definition log_backend_net.h:57
const struct log_backend * log_backend_net_get(void)
Get the net logger backend.
void log_backend_net_start(void)
Start the net logger backend.
bool log_backend_net_set_ip(const struct sockaddr *addr)
Allows user to set a server IP address, provided as sockaddr structure, at runtime.
IPv6 and IPv4 definitions.
Logger backend structure.
Definition log_backend.h:94
Generic sockaddr struct.
Definition net_ip.h:388