Usermode/DHCP Client - Slight change to timeout message
[tpg/acess2.git] / AcessNative / syscalls.h
1 /**
2  */
3 #ifndef _NATIVE_SYSCALLS_H_
4 #define _NATIVE_SYSCALLS_H_
5
6 #define SERVER_PORT     0xACE
7
8 /*
9  * Request format
10  * 
11  * tRequestHeader       header
12  * tRequestValue        params[header.NParams]
13  * tRequestValue        retvals[header.NReturn]
14  * uint8_t      paramData[SUM(params[].Lengh)];
15  */
16
17 typedef struct {
18         uint32_t        pid;
19         uint32_t        key;
20 } tRequestAuthHdr;
21
22 typedef struct sRequestValue {
23         /// \see eArgumentTypes
24         uint16_t        Type;
25         uint16_t        Flags;
26         uint32_t        Length;
27 }       tRequestValue;
28
29 typedef struct sRequestHeader {
30         uint32_t        ClientID;
31         uint32_t        MessageLength;
32         uint16_t        CallID; //!< \see eSyscalls
33         uint16_t        NParams;
34         
35         tRequestValue   Params[];
36 } __attribute__((packed))       tRequestHeader;
37
38
39 enum eSyscalls {
40         #define _(n) n
41         #include "syscalls_list.h"
42         #undef _
43         N_SYSCALLS
44 };
45
46 #ifndef DONT_INCLUDE_SYSCALL_NAMES
47 static const char * casSYSCALL_NAMES[] = {
48         #define _(n) #n
49         #include "syscalls_list.h"
50         #undef _
51         "-"
52 };
53 #endif
54
55 enum eArgumentTypes {
56         ARG_TYPE_VOID,
57         ARG_TYPE_INT32,
58         ARG_TYPE_INT64,
59         ARG_TYPE_STRING,
60         ARG_TYPE_DATA
61 };
62 enum eArgumentFlags {
63         ARG_FLAG_RETURN = 0x40, // Pass back in the return message
64         ARG_FLAG_ZEROED = 0x80  // Not present in the message, just fill with zero
65 };
66
67 #endif

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