Diff for /libaitrpc/inc/aitrpc.h between versions 1.25.2.3 and 1.27

version 1.25.2.3, 2015/01/18 00:03:01 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             7#define RPC_VERSION             9
 #define RPC_DEFPORT             2611  #define RPC_DEFPORT             2611
   
 /* Additional ELWIX RPC supporting protocols */  /* Additional ELWIX RPC supporting protocols */
Line 83  SUCH DAMAGE. Line 83  SUCH DAMAGE.
 #define RPC_REPLY               0x0  #define RPC_REPLY               0x0
 #define RPC_NOREPLY             0x1  #define RPC_NOREPLY             0x1
   
   /* RPC call I/O direction */
   
   #define RPC_REQ                 0x0
   #define RPC_ACK                 0x1
   
 /* RPC builtin registed calls */  /* RPC builtin registed calls */
   
 #define CALL_TAG_MAX            65535  #define CALL_TAG_MAX            65535
Line 141  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 153  struct tagRPCCall { Line 159  struct tagRPCCall {
                 }       call_rep;                  }       call_rep;
         };          };
   
           uint8_t         call_io;
         uint16_t        call_tag;          uint16_t        call_tag;
        uint16_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 */
 #define RPC_CHK_NOREPLY(x)      (ntohl((u_long) (x)->call_req.flags) & RPC_NOREPLY)  #define RPC_CHK_NOREPLY(x)      (ntohl((u_long) (x)->call_req.flags) & RPC_NOREPLY)
Line 285  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 298  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 643  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 656  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
Line 735  rpc_cli_t *rpc_cli_openClient2(u_char InstID, int netB Line 743  rpc_cli_t *rpc_cli_openClient2(u_char InstID, int netB
  * return: none   * return: none
  */   */
 void rpc_cli_closeClient2(rpc_cli_t ** __restrict cli);  void rpc_cli_closeClient2(rpc_cli_t ** __restrict cli);
   
   
   /*
    * rpc_cli_openClientExt() - Connect to pipe RPC Server
    *
    * @InstID = InstID for RPC session request
    * @netBuf = Network buffer length (min:512 bytes), if =0 == BUFSIZ (also meaning max RPC packet)
    * @fd = File descriptor
    * return: NULL == error or !=NULL connection to RPC server established
    */
   rpc_cli_t *rpc_cli_openClientExt(u_char InstID, int netBuf, int fd);
   /*
    * rpc_cli_closeClientExt() - Close pipe connection to RPC server and free resources
    *
    * @cli = RPC Client session
    * return: none
    */
   void rpc_cli_closeClientExt(rpc_cli_t ** __restrict cli);
   
   
 #endif  #endif

Removed from v.1.25.2.3  
changed lines
  Added in v.1.27


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