version 1.25.2.5, 2015/01/21 00:37:03
|
version 1.27, 2015/05/18 15:09:59
|
Line 62 SUCH DAMAGE.
|
Line 62 SUCH DAMAGE.
|
#include <aitsched.h> |
#include <aitsched.h> |
|
|
|
|
#define RPC_VERSION 8 | #define RPC_VERSION 9 |
#define RPC_DEFPORT 2611 |
#define RPC_DEFPORT 2611 |
|
|
/* Additional ELWIX RPC supporting protocols */ |
/* Additional ELWIX RPC supporting protocols */ |
Line 146 struct tagRPCCall {
|
Line 146 struct tagRPCCall {
|
rpc_sess_t call_session; |
rpc_sess_t call_session; |
|
|
uint32_t call_len; |
uint32_t call_len; |
|
uint32_t call_seq; |
uint16_t call_crc; |
uint16_t call_crc; |
|
|
union { |
union { |
Line 158 struct tagRPCCall {
|
Line 159 struct tagRPCCall {
|
} call_rep; |
} call_rep; |
}; |
}; |
|
|
uint16_t call_tag; |
|
uint8_t call_io; |
uint8_t call_io; |
|
uint16_t call_tag; |
uint8_t call_argc; |
uint8_t call_argc; |
ait_val_t call_argv[0]; |
ait_val_t call_argv[0]; |
} __packed; /* size == 20 bytes */ |
} __packed; /* size == 20 bytes */ |
Line 291 void rpc_SetErr(int eno, char *estr, ...);
|
Line 292 void rpc_SetErr(int eno, char *estr, ...);
|
* @type = type of socket |
* @type = type of socket |
* @flags = receive flags |
* @flags = receive flags |
* @sa = check client address, if you use udp protocol |
* @sa = check client address, if you use udp protocol |
* @buf = buffer | * @pkt = RPC packet |
* @blen = buffer length | |
* return: -1 error, 0 EOF or or >0 readed bytes into buffer |
* return: -1 error, 0 EOF or or >0 readed bytes into buffer |
*/ |
*/ |
ssize_t rpc_Read(int sock, int type, int flags, sockaddr_t * __restrict sa, |
ssize_t rpc_Read(int sock, int type, int flags, sockaddr_t * __restrict sa, |
unsigned char * __restrict buf, size_t blen); | ait_val_t * __restrict pkt); |
/* |
/* |
* rpc_Write() - RPC write operation |
* rpc_Write() - RPC write operation |
* |
* |
Line 304 ssize_t rpc_Read(int sock, int type, int flags, sockad
|
Line 304 ssize_t rpc_Read(int sock, int type, int flags, sockad
|
* @type = type of socket |
* @type = type of socket |
* @flags = send flags |
* @flags = send flags |
* @sa = send to client address, if you use udp protocol |
* @sa = send to client address, if you use udp protocol |
* @buf = buffer | * @pkt = RPC packet |
* @blen = buffer length | * @blen = write length |
* return: -1 error, 0 EOF or >0 written bytes into buffer |
* return: -1 error, 0 EOF or >0 written bytes into buffer |
*/ |
*/ |
ssize_t rpc_Write(int sock, int type, int flags, sockaddr_t * __restrict sa, |
ssize_t rpc_Write(int sock, int type, int flags, sockaddr_t * __restrict sa, |
unsigned char * __restrict buf, size_t blen); | ait_val_t * __restrict pkt, size_t blen); |
|
|
/* |
/* |
* rpc_chkPktSession() - Check RPC session |
* rpc_chkPktSession() - Check RPC session |
Line 649 int rpc_pkt_Send(int sock, int type, sockaddr_t * __re
|
Line 649 int rpc_pkt_Send(int sock, int type, sockaddr_t * __re
|
* @type = Type of socket |
* @type = Type of socket |
* @sa = Server address |
* @sa = Server address |
* @pkt = RPC packet |
* @pkt = RPC packet |
|
* @seq = Signed packet with seq.no |
* return: -1 error, 0 EOF or >0 received bytes |
* return: -1 error, 0 EOF or >0 received bytes |
*/ |
*/ |
int rpc_pkt_Receive(int sock, int type, sockaddr_t * __restrict sa, |
int rpc_pkt_Receive(int sock, int type, sockaddr_t * __restrict sa, |
ait_val_t * __restrict pkt); | ait_val_t * __restrict pkt, int seq); |
/* |
/* |
* rpc_pkt_Request() - Build RPC Request packet |
* rpc_pkt_Request() - Build RPC Request packet |
* |
* |
Line 662 int rpc_pkt_Receive(int sock, int type, sockaddr_t * _
|
Line 663 int rpc_pkt_Receive(int sock, int type, sockaddr_t * _
|
* @vars = Function argument array of values, may be NULL |
* @vars = Function argument array of values, may be NULL |
* @noreply = We not want RPC reply |
* @noreply = We not want RPC reply |
* @nocrc = Without CRC calculation |
* @nocrc = Without CRC calculation |
|
* @seq = Sign packet with seq.no |
* return: -1 error or != -1 prepared bytes into packet |
* return: -1 error or != -1 prepared bytes into packet |
*/ |
*/ |
int rpc_pkt_Request(ait_val_t * __restrict pkt, rpc_sess_t * __restrict sess, |
int rpc_pkt_Request(ait_val_t * __restrict pkt, rpc_sess_t * __restrict sess, |
unsigned short tag, array_t * __restrict vars, int noreply, int nocrc); | unsigned short tag, array_t * __restrict vars, int noreply, int nocrc, int seq); |
/* |
/* |
* rpc_pkt_Replay() - Decode RPC Replay packet |
* rpc_pkt_Replay() - Decode RPC Replay packet |
* |
* |
* @pkt = Packet buffer |
* @pkt = Packet buffer |
* @sess = RPC session info, if =NULL don't check session |
* @sess = RPC session info, if =NULL don't check session |
* @tag = Function tag | * @tag = Function tag, if =CALL_TAG_MAX don't check tag |
* @vars = Function argument array of values, may be NULL |
* @vars = Function argument array of values, may be NULL |
* @nocrc = Without CRC calculation |
* @nocrc = Without CRC calculation |
* return: -1 error or != -1 return value from function |
* return: -1 error or != -1 return value from function |