X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Fsyscalls.h;h=b9661bcf580a569cef0df0bdbc440ab3b9579a8e;hb=8e1f78107cc9aa137de29e0c9df3a1fccb483b67;hp=5081a53d2430551ea80cfd7075601ee50ea69ebf;hpb=02cbaac1233be9c5228973a787431fa5e0aa178e;p=tpg%2Facess2.git diff --git a/AcessNative/syscalls.h b/AcessNative/syscalls.h index 5081a53d..b9661bcf 100644 --- a/AcessNative/syscalls.h +++ b/AcessNative/syscalls.h @@ -3,6 +3,8 @@ #ifndef _NATIVE_SYSCALLS_H_ #define _NATIVE_SYSCALLS_H_ +#define SERVER_PORT 0xACE + /* * Request format * @@ -12,38 +14,44 @@ * uint8_t paramData[SUM(params[].Lengh)]; */ +typedef struct { + uint32_t pid; + uint32_t key; +} tRequestAuthHdr; + typedef struct sRequestValue { /// \see eArgumentTypes uint16_t Type; - uint16_t Length; + uint16_t Flags; + uint32_t Length; } tRequestValue; typedef struct sRequestHeader { uint16_t ClientID; uint16_t CallID; //!< \see eSyscalls + uint32_t MessageLength; uint16_t NParams; - uint16_t NReturn; tRequestValue Params[]; } tRequestHeader; + enum eSyscalls { - SYS_NULL, - SYS_OPEN, - SYS_CLOSE, - SYS_READ, - SYS_WRITE, - SYS_SEEK, - SYS_TELL, - SYS_IOCTL, - SYS_FINFO, - SYS_READDIR, - SYS_OPENCHILD, - SYS_GETACL, - SYS_MOUNT, + #define _(n) n + #include "syscalls_list.h" + #undef _ N_SYSCALLS }; +#ifndef DONT_INCLUDE_SYSCALL_NAMES +static const char * casSYSCALL_NAMES[] = { + #define _(n) #n + #include "syscalls_list.h" + #undef _ + "-" +}; +#endif + enum eArgumentTypes { ARG_TYPE_VOID, ARG_TYPE_INT32, @@ -51,5 +59,9 @@ enum eArgumentTypes { ARG_TYPE_STRING, ARG_TYPE_DATA }; +enum eArgumentFlags { + ARG_FLAG_RETURN = 0x40, // Pass back in the return message + ARG_FLAG_ZEROED = 0x80 // Not present in the message, just fill with zero +}; #endif