Big changes to AcessNative
[tpg/acess2.git] / AcessNative / syscalls.h
index 2784fd0..e298c94 100644 (file)
@@ -3,6 +3,30 @@
 #ifndef _NATIVE_SYSCALLS_H_
 #define _NATIVE_SYSCALLS_H_
 
+/*
+ * Request format
+ * 
+ * tRequestHeader      header
+ * tRequestValue       params[header.NParams]
+ * tRequestValue       retvals[header.NReturn]
+ * uint8_t     paramData[SUM(params[].Lengh)];
+ */
+
+typedef struct sRequestValue {
+       /// \see eArgumentTypes
+       uint16_t        Type;
+       uint16_t        Length;
+}      tRequestValue;
+
+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
@@ -12,12 +36,7 @@ enum eArgumentTypes {
        ARG_TYPE_VOID,
        ARG_TYPE_INT32,
        ARG_TYPE_INT64,
-       ARG_TYPE_STRING,
        ARG_TYPE_DATA
 };
 
-#define ARG_DIR_TOSRV  0x10
-#define        ARG_DIR_TOCLI   0x20
-#define ARG_DIR_BOTH   0x30
-
 #endif

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