e298c94da4faadf7186fc6ab9d17710a4792a0a9
[tpg/acess2.git] / AcessNative / syscalls.h
1 /**
2  */
3 #ifndef _NATIVE_SYSCALLS_H_
4 #define _NATIVE_SYSCALLS_H_
5
6 /*
7  * Request format
8  * 
9  * tRequestHeader       header
10  * tRequestValue        params[header.NParams]
11  * tRequestValue        retvals[header.NReturn]
12  * uint8_t      paramData[SUM(params[].Lengh)];
13  */
14
15 typedef struct sRequestValue {
16         /// \see eArgumentTypes
17         uint16_t        Type;
18         uint16_t        Length;
19 }       tRequestValue;
20
21 typedef struct sRequestHeader {
22         uint16_t        ClientID;
23         uint16_t        CallID; //!< \see eSyscalls
24         uint16_t        NParams;
25         uint16_t        NReturn;
26         
27         tRequestValue   Params[];
28 }       tRequestHeader;
29
30 enum eSyscalls {
31         SYS_NULL,
32         SYS_OPEN
33 };
34
35 enum eArgumentTypes {
36         ARG_TYPE_VOID,
37         ARG_TYPE_INT32,
38         ARG_TYPE_INT64,
39         ARG_TYPE_DATA
40 };
41
42 #endif

UCC git Repository :: git.ucc.asn.au