X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Fsyscalls.h;h=3c7bd85d9b5e2457900b203a3ed6fe7e924fe2bd;hb=43c4f4db78b98e0427a04dc4b281359580591915;hp=e298c94da4faadf7186fc6ab9d17710a4792a0a9;hpb=4726431cb7e0bada749b32f9e51dedadf882d50b;p=tpg%2Facess2.git diff --git a/AcessNative/syscalls.h b/AcessNative/syscalls.h index e298c94d..3c7bd85d 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 * @@ -15,6 +17,7 @@ typedef struct sRequestValue { /// \see eArgumentTypes uint16_t Type; + uint16_t Flags; uint16_t Length; } tRequestValue; @@ -22,21 +25,98 @@ typedef struct sRequestHeader { uint16_t ClientID; uint16_t CallID; //!< \see eSyscalls uint16_t NParams; - uint16_t NReturn; tRequestValue Params[]; } tRequestHeader; enum eSyscalls { SYS_NULL, - SYS_OPEN + + 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, + + 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" }; +#endif enum eArgumentTypes { ARG_TYPE_VOID, ARG_TYPE_INT32, ARG_TYPE_INT64, + 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