--- libaitrpc/inc/aitrpc.h 2012/03/12 16:28:09 1.5.2.3 +++ libaitrpc/inc/aitrpc.h 2012/03/13 17:10:13 1.5.2.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitrpc.h,v 1.5.2.3 2012/03/12 16:28:09 misho Exp $ +* $Id: aitrpc.h,v 1.5.2.4 2012/03/13 17:10:13 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -64,7 +64,11 @@ SUCH DAMAGE. #define RPC_VERSION 3 #define RPC_DEFPORT 2611 +/* RPC call request flags */ +#define RPC_REPLY 0x0 +#define RPC_NOREPLY 0x1 + /* RPC builtin registed calls */ #define CALL_BLOBSHUTDOWN "rpcBLOBServerShutdown" @@ -121,8 +125,8 @@ typedef struct { typedef struct tagRPCFunc { uint16_t func_tag; uint32_t func_hash; - char *func_file; - char *func_name; + ait_val_t func_file; + ait_val_t func_name; array_t *func_vars; @@ -135,20 +139,22 @@ typedef struct tagRPCFunc { struct tagRPCCall { rpc_sess_t call_session; + uint16_t call_tag; uint32_t call_hash; uint16_t call_argc; -} __packed; -/* Network RPC packet - Server response */ + union { + struct { + uint64_t flags; + } call_req; + struct { + int32_t ret; + int32_t eno; + } call_rep; + }; -struct tagRPCRet { - rpc_sess_t ret_session; - uint16_t ret_tag; - uint32_t ret_hash; - int32_t ret_retcode; - int32_t ret_errno; - uint16_t ret_argc; + uint16_t call_crc; } __packed; /* Network BLOB packet - Header */ @@ -207,8 +213,6 @@ typedef struct { pthread_mutex_t mtx; } srv_blob; - - sched_root_task_t *srv_sched; } rpc_srv_t;