XenevaOS
Loading...
Searching...
No Matches
XenevaOS
BaseHdr
auipc.h
Go to the documentation of this file.
1
20
#ifndef __AUIPC_H__
21
#define __AUIPC_H__
22
23
#include <
stdint.h
>
24
25
#define IPC_MAX_MSG 8192
26
#define IPC_NAME_MAX 24
27
28
#define IPC_IOC_CREATE 0x5601
/* IpcCreate -> handle */
29
#define IPC_IOC_DESTROY 0x5602
/* IpcHandle */
30
#define IPC_IOC_CONNECT 0x5603
/* IpcConnect -> handle */
31
#define IPC_IOC_CALL 0x5604
/* IpcCall (sleeps) */
32
#define IPC_IOC_FETCH 0x5605
/* IpcFetch */
33
#define IPC_IOC_WAIT 0x5606
/* IpcWait (sleeps) */
34
#define IPC_IOC_RECV 0x5607
/* IpcRecv */
35
#define IPC_IOC_REPLY 0x5608
/* IpcReply */
36
37
#define IPC_ACL_ANY 0
/* any process may call */
38
#define IPC_ACL_DAEMONS 1
/* only MISC_DAEMONS processes may call */
39
40
#define IPC_OK 0
41
#define IPC_E_PERM -1
42
#define IPC_E_INVAL -2
43
#define IPC_E_NOENT -3
44
#define IPC_E_BUSY -4
/* endpoint queue full / name taken */
45
#define IPC_E_TIMEOUT -5
46
#define IPC_E_DEAD -6
/* the server went away */
47
#define IPC_E_EMPTY -7
48
#define IPC_E_TOOBIG -8
49
50
typedef
struct
{
char
name
[
IPC_NAME_MAX
];
uint32_t
acl
;
int32_t
handle; }
IpcCreate
;
51
typedef
struct
{
char
name
[
IPC_NAME_MAX
];
int32_t
handle
;
uint32_t
reserved; }
IpcConnect
;
52
typedef
struct
{
int32_t
handle
;
uint32_t
reserved; }
IpcHandle
;
53
54
typedef
struct
{
55
int32_t
handle
;
56
uint32_t
timeout_ms
;
/* 1..5000 */
57
const
void
*
req
;
58
uint32_t
req_len
;
59
int32_t
status
;
/* IPC_OK once the reply is in; else IPC_E_* */
60
int32_t
call_id
;
/* out: pass to FETCH */
61
uint32_t
reserved
;
62
}
IpcCall
;
63
64
typedef
struct
{
65
int32_t
call_id
;
66
int32_t
status
;
/* out: IPC_OK, or why there is no reply */
67
void
*
resp
;
68
uint32_t
resp_cap
;
69
uint32_t
resp_len
;
/* out */
70
int32_t
server_status
;
/* out: the status the server put in its REPLY */
71
uint32_t
reserved
;
72
}
IpcFetch
;
73
74
typedef
struct
{
int32_t
handle
;
uint32_t
timeout_ms;
int32_t
status;
uint32_t
reserved; }
IpcWait
;
75
76
typedef
struct
{
77
int32_t
handle
;
78
int32_t
call_id
;
/* out */
79
void
*
buf
;
80
uint32_t
cap
;
81
uint32_t
len
;
/* out: request length */
82
int32_t
sender_pid, sender_uid,
sender_gid
;
/* out: from the kernel */
83
int32_t
status
;
/* out: IPC_OK / IPC_E_EMPTY / IPC_E_TOOBIG */
84
}
IpcRecv
;
85
86
typedef
struct
{
87
int32_t
handle
;
88
int32_t
call_id
;
89
const
void
*
resp
;
90
uint32_t
len
;
91
int32_t
server_status
;
/* delivered to the caller as IpcFetch.server_status */
92
uint32_t
reserved
;
93
}
IpcReply
;
94
95
#endif
stdint.h
int32_t
int int32_t
Definition
acefiex.h:160
uint32_t
unsigned int uint32_t
Definition
acefiex.h:163
IPC_NAME_MAX
#define IPC_NAME_MAX
Definition
auipc.h:26
name
struct drm_crtc struct drm_plane struct drm_plane const struct drm_crtc_funcs const char * name
Definition
drm_crtc.h:1242
IpcCall
Definition
auipc.h:54
IpcCall::status
int32_t status
Definition
auipc.h:59
IpcCall::handle
int32_t handle
Definition
auipc.h:55
IpcCall::timeout_ms
uint32_t timeout_ms
Definition
auipc.h:56
IpcCall::req
const void * req
Definition
auipc.h:57
IpcCall::req_len
uint32_t req_len
Definition
auipc.h:58
IpcCall::call_id
int32_t call_id
Definition
auipc.h:60
IpcCall::reserved
uint32_t reserved
Definition
auipc.h:61
IpcConnect
Definition
auipc.h:51
IpcConnect::handle
int32_t handle
Definition
auipc.h:51
IpcCreate
Definition
auipc.h:50
IpcCreate::acl
uint32_t acl
Definition
auipc.h:50
IpcFetch
Definition
auipc.h:64
IpcFetch::resp_cap
uint32_t resp_cap
Definition
auipc.h:68
IpcFetch::status
int32_t status
Definition
auipc.h:66
IpcFetch::resp
void * resp
Definition
auipc.h:67
IpcFetch::server_status
int32_t server_status
Definition
auipc.h:70
IpcFetch::reserved
uint32_t reserved
Definition
auipc.h:71
IpcFetch::call_id
int32_t call_id
Definition
auipc.h:65
IpcFetch::resp_len
uint32_t resp_len
Definition
auipc.h:69
IpcHandle
Definition
auipc.h:52
IpcHandle::handle
int32_t handle
Definition
auipc.h:52
IpcRecv
Definition
auipc.h:76
IpcRecv::call_id
int32_t call_id
Definition
auipc.h:78
IpcRecv::len
uint32_t len
Definition
auipc.h:81
IpcRecv::status
int32_t status
Definition
auipc.h:83
IpcRecv::cap
uint32_t cap
Definition
auipc.h:80
IpcRecv::handle
int32_t handle
Definition
auipc.h:77
IpcRecv::sender_gid
int32_t sender_gid
Definition
auipc.h:82
IpcRecv::buf
void * buf
Definition
auipc.h:79
IpcReply
Definition
auipc.h:86
IpcReply::reserved
uint32_t reserved
Definition
auipc.h:92
IpcReply::resp
const void * resp
Definition
auipc.h:89
IpcReply::call_id
int32_t call_id
Definition
auipc.h:88
IpcReply::server_status
int32_t server_status
Definition
auipc.h:91
IpcReply::len
uint32_t len
Definition
auipc.h:90
IpcReply::handle
int32_t handle
Definition
auipc.h:87
IpcWait
Definition
auipc.h:74
IpcWait::handle
int32_t handle
Definition
auipc.h:74
Generated by
1.9.8