git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/libnet - Starting work on DNS resolver
[tpg/acess2.git]
/
AcessNative
/
syscalls.h
diff --git
a/AcessNative/syscalls.h
b/AcessNative/syscalls.h
index
d7ee2d5
..
a9768c4
100644
(file)
--- a/
AcessNative/syscalls.h
+++ b/
AcessNative/syscalls.h
@@
-5,6
+5,14
@@
#define SERVER_PORT 0xACE
#define SERVER_PORT 0xACE
+#define SYSCALL_TRACE 1
+
+#if SYSCALL_TRACE
+#define SYSTRACE(str, x...) do{ if(gbSyscallDebugEnabled)Debug(str, x); }while(0)
+#else
+#define SYSTRACE(...) do{}while(0)
+#endif
+
/*
* Request format
*
/*
* Request format
*
@@
-27,91
+35,28
@@
typedef struct sRequestValue {
} tRequestValue;
typedef struct sRequestHeader {
} tRequestValue;
typedef struct sRequestHeader {
- uint16_t ClientID;
- uint16_t CallID; //!< \see eSyscalls
+ uint32_t ClientID;
uint32_t MessageLength;
uint32_t MessageLength;
+ uint16_t CallID; //!< \see eSyscalls
uint16_t NParams;
tRequestValue Params[];
uint16_t NParams;
tRequestValue Params[];
-} tRequestHeader;
+}
__attribute__((packed))
tRequestHeader;
-enum eSyscalls {
- 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,
-
+enum eSyscalls {
+ #define _(n) n
+ #include "syscalls_list.h"
+ #undef _
N_SYSCALLS
};
#ifndef DONT_INCLUDE_SYSCALL_NAMES
static const char * casSYSCALL_NAMES[] = {
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"
+ #define _(n) #n
+ #include "syscalls_list.h"
+ #undef _
+ "-"
};
#endif
};
#endif
UCC
git Repository :: git.ucc.asn.au