From 06eed899486daeec8ad2718c74d70f91fa0dbb25 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sun, 2 Feb 2025 02:01:30 -0700 Subject: libhw_generic: net: Use libobj instead of vcall.h --- libhw/host_include/libhw/host_net.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'libhw/host_include') diff --git a/libhw/host_include/libhw/host_net.h b/libhw/host_include/libhw/host_net.h index bfef5c9..fced229 100644 --- a/libhw/host_include/libhw/host_net.h +++ b/libhw/host_include/libhw/host_net.h @@ -1,6 +1,6 @@ /* libhw/host_net.h - implementation for hosted glibc * - * Copyright (C) 2024 Luke T. Shumaker + * Copyright (C) 2024-2025 Luke T. Shumaker * SPDX-License-Identifier: AGPL-3.0-or-later */ @@ -14,33 +14,30 @@ #include struct _hostnet_tcp_conn { - implements_net_stream_conn; - BEGIN_PRIVATE(LIBHW_HOST_NET_H) int fd; uint64_t read_deadline_ns; END_PRIVATE(LIBHW_HOST_NET_H) }; +LO_IMPLEMENTATION_H(net_stream_conn, struct _hostnet_tcp_conn, hostnet_tcp) struct hostnet_tcp_listener { - implements_net_stream_listener; - BEGIN_PRIVATE(LIBHW_HOST_NET_H) int fd; struct _hostnet_tcp_conn active_conn; END_PRIVATE(LIBHW_HOST_NET_H) }; +LO_IMPLEMENTATION_H(net_stream_listener, struct hostnet_tcp_listener, hostnet_tcplist) void hostnet_tcp_listener_init(struct hostnet_tcp_listener *self, uint16_t port); struct hostnet_udp_conn { - implements_net_packet_conn; - BEGIN_PRIVATE(LIBHW_HOST_NET_H) int fd; uint64_t read_deadline_ns; END_PRIVATE(LIBHW_HOST_NET_H) }; +LO_IMPLEMENTATION_H(net_packet_conn, struct hostnet_udp_conn, hostnet_udp) void hostnet_udp_conn_init(struct hostnet_udp_conn *self, uint16_t port); -- cgit v1.2.3-2-g168b