oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
hal_net.h
1/*
2 * Copyright (C) 2026 Kamil Lulko <kamil.lulko@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 *
6 * This file is part of oveRTOS.
7 */
8
9#ifndef OVE_HAL_NET_H
10#define OVE_HAL_NET_H
11
21#include "ove/types.h"
22#include "ove_config.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#ifdef CONFIG_OVE_NET
29
31int ove_hal_socket_open(ove_socket_t sock, int af, int type);
32
34void ove_hal_socket_close(ove_socket_t sock);
35
37int ove_hal_socket_connect(ove_socket_t sock, const void *addr,
38 uint32_t timeout_ms);
39
41int ove_hal_socket_bind(ove_socket_t sock, const void *addr);
42
44int ove_hal_socket_listen(ove_socket_t sock, int backlog);
45
47int ove_hal_socket_accept(ove_socket_t sock, ove_socket_t client,
48 uint32_t timeout_ms);
49
51int ove_hal_socket_send(ove_socket_t sock, const void *data,
52 size_t len, size_t *sent);
53
55int ove_hal_socket_recv(ove_socket_t sock, void *buf, size_t len,
56 size_t *received, uint32_t timeout_ms);
57
59int ove_hal_socket_sendto(ove_socket_t sock, const void *data,
60 size_t len, size_t *sent, const void *dest);
61
63int ove_hal_socket_recvfrom(ove_socket_t sock, void *buf, size_t len,
64 size_t *received, void *src,
65 uint32_t timeout_ms);
66
68int ove_hal_dns_resolve(const char *hostname, void *addr,
69 uint32_t timeout_ms);
70
72int ove_hal_netif_init(ove_netif_t netif);
73
75void ove_hal_netif_deinit(ove_netif_t netif);
76
78int ove_hal_netif_up(ove_netif_t netif, const void *cfg);
79
81void ove_hal_netif_down(ove_netif_t netif);
82
83#endif /* CONFIG_OVE_NET */
84
85#ifdef __cplusplus
86}
87#endif
88
91#endif /* OVE_HAL_NET_H */
struct ove_netif * ove_netif_t
Opaque handle for a network interface.
Definition types.h:124
struct ove_socket * ove_socket_t
Opaque handle for a network socket.
Definition types.h:121