Diff for /libaitrpc/inc/aitrpc.h between versions 1.8.2.1 and 1.8.2.2

version 1.8.2.1, 2012/05/15 16:06:13 version 1.8.2.2, 2012/05/15 20:49:24
Line 58  SUCH DAMAGE. Line 58  SUCH DAMAGE.
 #endif  #endif
 #include <sys/socket.h>  #include <sys/socket.h>
 #include <sys/queue.h>  #include <sys/queue.h>
   #include <sys/time.h>
 #include <aitio.h>  #include <aitio.h>
 #include <aitsched.h>  #include <aitsched.h>
   
Line 114  typedef enum { Line 115  typedef enum {
   
 typedef struct {  typedef struct {
         uint8_t         sess_version;          uint8_t         sess_version;
         uint8_t         sess_timeout;  
         uint32_t        sess_program;          uint32_t        sess_program;
        uint16_t        sess_process;        uint8_t             sess_process;
} __packed rpc_sess_t;          /* size == 8 bytes */} __packed rpc_sess_t;          /* size == 6 bytes */
   
   
 /* Server managment RPC functions ... */  /* Server managment RPC functions ... */
   
 /* RPC function registration element! */  
 typedef struct tagRPCFunc {  
         uint16_t                func_tag;  
         uint32_t                func_hash;  
         ait_val_t               func_file;  
         ait_val_t               func_name;  
   
         array_t                 *func_vars;  
   
         void                    *func_parent;  
         TAILQ_ENTRY(tagRPCFunc) func_node;  
 } rpc_func_t;  
   
   
 /* Network RPC packet - Client request */  /* Network RPC packet - Client request */
   
 struct tagRPCCall {  struct tagRPCCall {
         rpc_sess_t      call_session;          rpc_sess_t      call_session;
   
           uint16_t        call_seq;
         uint16_t        call_len;          uint16_t        call_len;
           uint16_t        call_crc;
   
         uint16_t        call_tag;  
         uint32_t        call_hash;  
         uint16_t        call_argc;  
   
         union {          union {
                 struct {                  struct {
                         uint64_t        flags;                          uint64_t        flags;
Line 157  struct tagRPCCall { Line 141  struct tagRPCCall {
                 }       call_rep;                  }       call_rep;
         };          };
   
        uint16_t        call_crc;        uint16_t        call_tag;
} __packed;             /* size == 28 bytes */        uint16_t        call_argc;
         ait_val_t       call_argv[0];
 } __packed;             /* size == 24 bytes */
   
 /* Network BLOB packet - Header */  /* Network BLOB packet - Header */
   
Line 174  struct tagBLOBHdr { Line 160  struct tagBLOBHdr {
   
 /* Network RPC client & server elements */  /* Network RPC client & server elements */
   
   /* RPC function registration element! */
   typedef struct tagRPCFunc {
           ait_val_t               func_name;
   
           array_t                 *func_vars;
   
           void                    *func_parent;
           TAILQ_ENTRY(tagRPCFunc) func_node;
   } rpc_func_t;
   
   
 typedef struct {  typedef struct {
         int             cli_id;         /* slot id */          int             cli_id;         /* slot id */
         int             cli_sock;       /* socket fd */          int             cli_sock;       /* socket fd */
Line 277  int rpc_register_srvServices(rpc_srv_t * __restrict sr Line 274  int rpc_register_srvServices(rpc_srv_t * __restrict sr
  * @Port = Port for bind server, if Port == 0 default port is selected   * @Port = Port for bind server, if Port == 0 default port is selected
  * return: NULL == error or !=NULL bind and created RPC server instance   * return: NULL == error or !=NULL bind and created RPC server instance
  */   */
rpc_srv_t *rpc_srv_initServer(u_int regProgID, u_int regProcID, int concurentClients, rpc_srv_t *rpc_srv_initServer(unsigned int regProgID, unsigned char regProcID, 
                int netBuf, const char *csHost, u_short Port);                int concurentClients, int netBuf, 
                 const char *csHost, unsigned short Port);
 /*  /*
  * rpc_srv_endServer() - Destroy RPC server, close all opened sockets and free resources   * rpc_srv_endServer() - Destroy RPC server, close all opened sockets and free resources
  *   *
Line 368  rpc_func_t *rpc_srv_getFunc(rpc_srv_t * __restrict srv Line 366  rpc_func_t *rpc_srv_getFunc(rpc_srv_t * __restrict srv
  *   *
  * @srv = RPC Server instance   * @srv = RPC Server instance
  * @tag = tag for function   * @tag = tag for function
  * @hash = hash for function  
  * return: NULL not found call, !=NULL return call   * return: NULL not found call, !=NULL return call
  */   */
inline rpc_func_t *rpc_srv_getCall(rpc_srv_t * __restrict srv, uint16_t tag, uint32_t hash);inline rpc_func_t *rpc_srv_getCall(rpc_srv_t * __restrict srv, uint16_t tag);
 /*  /*
  * rpc_srv_execCall() - Execute registered call from RPC server   * rpc_srv_execCall() - Execute registered call from RPC server
  *   *

Removed from v.1.8.2.1  
changed lines
  Added in v.1.8.2.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>