13typedef struct _ipc_server_io
28 mos_panic(
"ipc_control_io_close: io->type != IO_IPC");
55 mos_panic(
"ipc_client_io_close: io->type != IO_IPC");
77 mos_panic(
"ipc_server_io_close: io->type != IO_IPC");
124 return ERR_PTR(-EBADF);
void io_init(io_t *io, io_type_t type, io_flags_t flags, const io_op_t *ops)
static slab_t * ipc_conn_io_slab
static const io_op_t ipc_control_io_op
ipc_conn_io_t * ipc_conn_io_create(ipc_t *ipc, bool is_server_side)
Create a new IPC connection io descriptor.
io_t * ipc_connect(const char *name, size_t buffer_size)
Connect to an IPC servers.
static slab_t * ipc_server_io_slab
static const io_op_t ipc_client_io_op
static size_t ipc_server_io_write(io_t *io, const void *buf, size_t size)
static const io_op_t ipc_server_io_op
static void ipc_control_io_close(io_t *io)
io_t * ipc_accept(io_t *server)
Accept a new connection on an IPC server.
io_t * ipc_create(const char *name, size_t max_pending_connections)
Create a new IPC server.
static size_t ipc_server_io_read(io_t *io, void *buf, size_t size)
static void ipc_server_io_close(io_t *io)
static size_t ipc_client_io_write(io_t *io, const void *buf, size_t size)
static void ipc_client_io_close(io_t *io)
static size_t ipc_client_io_read(io_t *io, void *buf, size_t size)
void ipc_client_close_channel(ipc_t *ipc)
size_t ipc_client_write(ipc_t *ipc, const void *buffer, size_t size)
size_t ipc_server_write(ipc_t *ipc, const void *buffer, size_t size)
void ipc_server_close(ipc_server_t *server)
void ipc_server_close_channel(ipc_t *ipc)
ipc_t * ipc_server_accept(ipc_server_t *server)
ipc_server_t * ipc_server_create(const char *name, size_t max_pending_connections)
size_t ipc_client_read(ipc_t *ipc, void *buffer, size_t size)
ipc_t * ipc_connect_to_server(const char *name, size_t buffer_size)
size_t ipc_server_read(ipc_t *ipc, void *buffer, size_t size)
#define container_of(ptr, type, member)
#define mos_panic(fmt,...)
#define SLAB_AUTOINIT(name, var, type)