From 2f57577134d0410839c9fa0a82231882ec6045a0 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 22 May 2026 07:37:22 -0700 Subject: [PATCH] ethernet: add Unix packet backend hooks Add shared Ethernet enumeration hooks for Unix packet backends and keep the existing Windows backend path unchanged. --- ethernet.cpp | 4 ++-- include/uaenet.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 include/uaenet.h diff --git a/ethernet.cpp b/ethernet.cpp index f4078b6a..55f6e618 100644 --- a/ethernet.cpp +++ b/ethernet.cpp @@ -3,8 +3,8 @@ #include "sysdeps.h" #include "ethernet.h" -#ifdef _WIN32 -#include "win32_uaenet.h" +#ifdef WITH_UAENET_PCAP +#include "uaenet.h" #endif #include "threaddep/thread.h" #include "options.h" diff --git a/include/uaenet.h b/include/uaenet.h new file mode 100644 index 00000000..1a72a792 --- /dev/null +++ b/include/uaenet.h @@ -0,0 +1,18 @@ +#ifndef UAE_UAENET_H +#define UAE_UAENET_H + +#include "ethernet.h" + +typedef void (uaenet_gotfunc)(void *dev, const uae_u8 *data, int len); +typedef int (uaenet_getfunc)(void *dev, uae_u8 *d, int *len); + +extern struct netdriverdata *uaenet_enumerate(const TCHAR *name); +extern void uaenet_enumerate_free(void); +extern void uaenet_close_driver(struct netdriverdata *tc); + +extern int uaenet_getdatalenght(void); +extern int uaenet_open(void*, struct netdriverdata*, void*, uaenet_gotfunc*, uaenet_getfunc*, int, const uae_u8*); +extern void uaenet_close(void*); +extern void uaenet_trigger(void*); + +#endif /* UAE_UAENET_H */ -- 2.47.3