11#ifndef __MUTEKI_DEVIO_H__
12#define __MUTEKI_DEVIO_H__
24#define DEVIO_DESC_MAGIC (0x48435842u)
87typedef char device_service_t[0x4c];
93#define DEVIO_DESC_INVALID ((devio_descriptor_t *) 0xffffffff)
111 const char *pathname,
115 unsigned int on_noentry,
Common include file for all muteki-shims headers.
devio_descriptor_t * CreateFile(const char *pathname, unsigned int access, unsigned int shmode, void *secattr, unsigned int on_noentry, unsigned int flags, void *template_file)
Open or create a file/device by its pathname.
bool DeviceIoControl(devio_descriptor_t *devfd, int request, const void *in, int inlen, void *out, int outlen, int *retlen, void *overlapped)
Send an IOCTL request to a device IO descriptor devfd.
bool ReadFile(devio_descriptor_t *devfd, void *buf, size_t size, size_t *actual_size, void *overlapped)
Read/receive data from a device IO descriptor.
void devio_backend_t
Catchall device IO backend type.
Definition devio.h:30
bool WriteFile(devio_descriptor_t *devfd, const void *buf, size_t size, size_t *actual_size, void *overlapped)
Write/send data to a device IO descriptor.
bool CloseHandle(devio_descriptor_t *devfd)
Close a device IO descriptor.
The device IO descriptor.
Definition devio.h:35
int on_noentry
Behavior on no entry.
Definition devio.h:67
int unk_0x78
Unknown.
Definition devio.h:83
devio_backend_t * backend
Backend of this descriptor. Can be a file descriptor or a service.
Definition devio.h:43
int refcount
Reference counter.
Definition devio.h:55
unsigned int magic
Descriptor magic. Always BXCH.
Definition devio.h:79
unsigned int flags_upper
Upper 16-bit of the flags.
Definition devio.h:71
unsigned int device_id
Device ID if this descriptor is device-backed.
Definition devio.h:51
int unk_0x54
Unknown.
Definition devio.h:47
unsigned int flags_lower
Lower 16-bit of the flags.
Definition devio.h:75
int shmode
Sharing mode.
Definition devio.h:63
int access
Access mode.
Definition devio.h:59