Zephyr Project API 4.2.99
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
13#ifndef ZEPHYR_LOG_BACKEND_NET_H_
14#define ZEPHYR_LOG_BACKEND_NET_H_
15
23#include <stdbool.h>
24#include <zephyr/net/net_ip.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
42bool log_backend_net_set_addr(const char *addr);
43
56bool log_backend_net_set_ip(const struct sockaddr *addr);
57
67#if defined(CONFIG_NET_HOSTNAME_ENABLE)
68void log_backend_net_hostname_set(char *hostname, size_t len);
69#else
70static inline void log_backend_net_hostname_set(const char *hostname, size_t len)
71{
72 ARG_UNUSED(hostname);
73 ARG_UNUSED(len);
74}
75#endif
76
84const struct log_backend *log_backend_net_get(void);
85
92
93#ifdef __cplusplus
94}
95#endif
96
99#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:70
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:95
Generic sockaddr struct.
Definition net_ip.h:410