/common/home/bel/bella/lnx/exports/build/current/all/sys-tools/rs-intf/i_rsintf.h

00001 #ifndef I_RSINTF_H
00002 #define I_RSINTF_H
00003 
00004 #include "sys/types.h"
00005 #include "ix_tools.h"
00006 
00007 
00009 #define RS_PROXY_ID 1
00010 
00012 #define RS_PROC_MAX 256
00013 
00015 #define NET_RS_HOST_ENV "NET_RS_HOST"
00016 
00018 #define NET_RS_PORT_ENV "NET_RS_PORT"
00019 
00021 #define RSRVR_TCP_PORT 5011
00022 
00023 #define RSRVR_UDP_PORT 5010
00024 
00025 
00026 typedef struct
00027 {
00028   int init_f;
00029   char host[64];
00030   struct in_addr hostip;
00031   int port;
00032   ix_thread_t *pt;
00033   ix_cs_t *pmut;
00034   ix_cs_t *phash;
00035   ix_hash_t *ph;
00036   int connected;
00037   int registered;
00038   rs_reg_t reg;
00039   ix_list_t *preglist;
00040   ix_event_t *pev;
00041 } rs_data_t;
00042 #define RS_CACHE_MAX_PROC  256
00043 #define RS_REGISTER    1
00044 #define RS_SCAN        2
00045 #define RS_UNREGISTER  3
00046 #define RS_VERBOSE     4
00047 
00048 #define RS_REREGISTER_TIMEOUT 5000  // ms timeout to  re-registration after disconnect
00049 #define RS_TRIGGER_TIMEOUT 60000    // ms timeout to trigger registration server
00050 
00051 int rs_request_decode( unsigned char *reqbuf, int buflen, int *preqid);
00052 
00053 int rs_request_register_encode( rs_reg_t *preg, unsigned char *reqbuf,int buflen);
00054 int rs_request_register_decode( unsigned char *reqbuf, int buflen, rs_reg_t *preg );
00055 int rs_reply_register_encode( int status, unsigned char *replybuf, int buflen);
00056 int rs_reply_register_decode( unsigned char *replybuf, size_t buflen, int *status );
00057 
00058 int rs_request_verbose_encode( int level, unsigned char *reqbuf,int buflen);
00059 int rs_request_verbose_decode( unsigned char *reqbuf, int buflen, int *plevel );
00060 int rs_reply_verbose_encode( int status, unsigned char *replybuf, int buflen);
00061 int rs_reply_verbose_decode( unsigned char *replybuf, size_t buflen, int *status );
00062 
00063 
00064 int rs_request_unregister_encode( rs_reg_t *preg, unsigned char *reqbuf,int buflen);
00065 int rs_request_unregister_decode( unsigned char *reqbuf, int buflen, rs_reg_t *preg );
00066 int rs_reply_unregister_encode( int status, unsigned char *replybuf, int buflen);
00067 int rs_reply_unregister_decode( unsigned char *replybuf, size_t buflen, int *status );
00068 
00069 int rs_request_scan_encode( rs_reg_t *preg, unsigned char *reqbuf,int buflen);
00070 int rs_request_scan_decode( unsigned char *reqbuf, int buflen, rs_reg_t *preg );
00071 int rs_reply_scan_encode( int status, rs_reg_t **pret, int nret, 
00072     unsigned char *replybuf, int buflen);
00073 int rs_reply_scan_decode( unsigned char *replybuf, size_t buflen,  int *status, 
00074     rs_reg_t *pret, int *nret );
00075 
00076 int rs_init(void);
00077 
00078 
00079 #endif

Generated on 4 Mar 2014 for rsintf by  doxygen 1.4.7