X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Fsyscalls.h;h=21a9cb53037c4f86e88da93a181a95e8947b04bc;hb=590ae24e57553f79a92d6ef52c0468c07aa5de22;hp=b4d211c7a052b98614efd09c54acd8f8cd76a55a;hpb=9143c184873d0b55444dc1c1084f3e9f3f2614bf;p=tpg%2Facess2.git diff --git a/AcessNative/syscalls.h b/AcessNative/syscalls.h index b4d211c7..21a9cb53 100644 --- a/AcessNative/syscalls.h +++ b/AcessNative/syscalls.h @@ -14,16 +14,22 @@ * uint8_t paramData[SUM(params[].Lengh)]; */ +typedef struct { + uint32_t pid; + uint32_t key; +} tRequestAuthHdr; + typedef struct sRequestValue { /// \see eArgumentTypes uint16_t Type; - uint8_t Flags; - 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; tRequestValue Params[]; @@ -31,6 +37,9 @@ typedef struct sRequestHeader { enum eSyscalls { SYS_NULL, + + SYS_EXIT, + SYS_OPEN, SYS_CLOSE, SYS_READ, @@ -44,9 +53,69 @@ enum eSyscalls { SYS_GETACL, SYS_MOUNT, SYS_REOPEN, + SYS_CHDIR, + + SYS_WAITTID, + SYS_SETUID, + SYS_SETGID, + + SYS_GETTID, + SYS_GETPID, + SYS_GETUID, + SYS_GETGID, + + // IPC + SYS_SLEEP, + SYS_AN_FORK, + SYS_AN_SPAWN, + SYS_SENDMSG, + SYS_GETMSG, + SYS_SELECT, + SYS_WAITEVENT, + N_SYSCALLS }; +#ifndef DONT_INCLUDE_SYSCALL_NAMES +static const char * casSYSCALL_NAMES[] = { + "SYS_NULL", + + "SYS_EXIT", + + "SYS_OPEN", + "SYS_CLOSE", + "SYS_READ", + "SYS_WRITE", + "SYS_SEEK", + "SYS_TELL", + "SYS_IOCTL", + "SYS_FINFO", + "SYS_READDIR", + "SYS_OPENCHILD", + "SYS_GETACL", + "SYS_MOUNT", + "SYS_REOPEN", + "SYS_CHDIR", + + "SYS_WAITTID", + "SYS_SETUID", + "SYS_SETGID", + + "SYS_GETTID", + "SYS_GETPID", + "SYS_GETUID", + "SYS_GETGID", + + // IPC + "SYS_SLEEP", + "SYS_AN_FORK", + "SYS_SENDMSG", + "SYS_GETMSG", + "SYS_SELECT", + "SYS_WAITEVENT" +}; +#endif + enum eArgumentTypes { ARG_TYPE_VOID, ARG_TYPE_INT32,