Debian Codegraph @

src/tun_emscripten.c

raw symbols SCIP
1 /* librist. Copyright © 2024 SipRadius LLC. All right reserved.
2 *
3 * SPDX-License-Identifier: BSD-2-Clause
4 *
5 * TUN device stubs for Emscripten/WASM — no network interfaces available.
6 */
7
8 #ifdef __EMSCRIPTEN__
9
10 #include "librist/tun.h"
11 #include <errno.h>
12
13 int rist_tun_open(const char *requested_name, char *actual_name, size_t name_len)
14 {
15 (void)requested_name;
16 (void)actual_name;
17 (void)name_len;
18 errno = ENOTSUP;
19 return -1;
20 }
21
22 int rist_tun_read(int fd, uint8_t *buf, size_t len)
23 {
24 (void)fd;
25 (void)buf;
26 (void)len;
27 errno = ENOTSUP;
28 return -1;
29 }
30
31 int rist_tun_write(int fd, const uint8_t *buf, size_t len)
32 {
33 (void)fd;
34 (void)buf;
35 (void)len;
36 errno = ENOTSUP;
37 return -1;
38 }
39
40 #endif /* __EMSCRIPTEN__ */