--- libaitrpc/inc/aitrpc.h 2012/05/16 07:37:37 1.8.2.7 +++ libaitrpc/inc/aitrpc.h 2012/05/16 07:54:49 1.8.2.8 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitrpc.h,v 1.8.2.7 2012/05/16 07:37:37 misho Exp $ +* $Id: aitrpc.h,v 1.8.2.8 2012/05/16 07:54:49 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -180,6 +180,17 @@ typedef struct tagRPCFunc { } rpc_func_t; +/* BLOB register element */ +typedef struct tagBLOB { + uint32_t blob_var; /* BLOB id */ + + size_t blob_len; /* size of allocated BLOB data */ + void *blob_data; /* mapped BLOB data */ + + TAILQ_ENTRY(tagBLOB) blob_node; +} rpc_blob_t; + + typedef struct { int cli_id; /* slot id */ int cli_sock; /* socket fd */ @@ -189,17 +200,6 @@ typedef struct { void *cli_parent; /* pointer to parent rpc_srv_t for server or to rpc_sess_t for client */ } rpc_cli_t; - -/* BLOB registration element! */ -typedef struct tagBLOB { - uint32_t blob_var; - - size_t blob_len; // size of allocated BLOB data - void *blob_data; // BLOB data - - struct tagBLOB *blob_next; -} rpc_blob_t; - typedef struct { rpc_sess_t srv_session; /* RPC session registration info */ int srv_netbuf; /* size of network buffer */ @@ -213,13 +213,13 @@ typedef struct { TAILQ_HEAD(, tagRPCFunc) srv_funcs; /* RPC functions list */ struct { - cmd_type_t state; /* BLOB server state: ==0 disable | !=0 enable */ - ait_val_t dir; /* BLOB states directory */ + cmd_type_t state; /* BLOB server state: ==0 disable | !=0 enable */ + ait_val_t dir; /* BLOB states directory */ - rpc_cli_t server; /* BLOB server socket */ - array_t *clients; /* connected blob client sockets */ + rpc_cli_t server; /* BLOB server socket */ + array_t *clients; /* connected blob client sockets */ - rpc_blob_t *blobs; /* registered blob variables list */ + TAILQ_HEAD(, tagBLOB) blobs; /* registered blob variables list */ } srv_blob; } rpc_srv_t;