fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
1/*****************************************************************************
2 * pce *
3 *****************************************************************************/
4
5/*****************************************************************************
6 * File name: src/lib/vmnet.h *
7 * Created: 2022-09-18 by joshua stein <jcs@jcs.org> *
8 * Copyright: (C) 2022 joshua stein <jcs@jcs.org> *
9 *****************************************************************************/
10
11/*****************************************************************************
12 * This program is free software. You can redistribute it and / or modify it *
13 * under the terms of the GNU General Public License version 2 as published *
14 * by the Free Software Foundation. *
15 * *
16 * This program is distributed in the hope that it will be useful, but *
17 * WITHOUT ANY WARRANTY, without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
19 * Public License for more details. *
20 *****************************************************************************/
21
22#ifndef PCE_LIB_VMNET_H
23#define PCE_LIB_VMNET_H 1
24
25#include <sys/uio.h>
26#include <vmnet/vmnet.h>
27
28struct pce_vmnet_interface {
29 interface_ref interface;
30 dispatch_queue_t if_queue;
31 unsigned int packets_available;
32};
33
34struct pce_vmnet_interface * pce_vmnet_start (char *bridged_if);
35void pce_vmnet_stop (struct pce_vmnet_interface *vi);
36int pce_vmnet_write (struct pce_vmnet_interface *vi, void *buf, size_t size);
37size_t pce_vmnet_read (struct pce_vmnet_interface *vi, void *buf, size_t size);
38
39#endif