Add wormhole state check function
[ric-plt/lib/rmr.git] / src / rmr / common / include / rmr.h
index e3d08d9..cc2c0c8 100644 (file)
@@ -47,6 +47,7 @@ extern "C" {
 #define RMRFL_MTCALL           0x02    // set up multi-threaded call support (rmr_init)
 #define RMRFL_AUTO_ALLOC       0x03    // send auto allocates a zerocopy buffer
 #define RMRFL_NAME_ONLY                0x04    // only the hostname:ip is provided as source information for rts() calls
+#define RMRFL_NOLOCK           0x08    // disable receive ring locking (user app ensures single thread or provides collision protection)
 
 #define RMR_DEF_SIZE           0               // pass as size to have msg allocation use the default msg size
 
@@ -105,6 +106,8 @@ typedef struct {
 
        void*   ring;                           // ring this buffer should be queued back to
        int             rts_fd;                         // SI fd for return to sender
+
+       int             cookie;                         // cookie to detect user misuse of free'd msg
 } rmr_mbuf_t;
 
 
@@ -133,6 +136,7 @@ extern rmr_mbuf_t* rmr_torcv_msg( void* vctx, rmr_mbuf_t* old_msg, int ms_to );
 extern rmr_mbuf_t*  rmr_tralloc_msg( void* context, int msize, int trsize, unsigned const char* data );
 extern rmr_whid_t rmr_wh_open( void* vctx, char const* target );
 extern rmr_mbuf_t* rmr_wh_send_msg( void* vctx, rmr_whid_t whid, rmr_mbuf_t* msg );
+extern int rmr_wh_state( void* vctx, rmr_whid_t whid );
 extern void rmr_wh_close( void* vctx, int whid );
 
 // ----- mt call support --------------------------------------------------------------------------------
@@ -163,6 +167,8 @@ extern int rmr_set_trace( rmr_mbuf_t* msg, unsigned const char* data, int size )
 extern int rmr_rcv_to( void* vctx, int time );         // DEPRECATED -- replaced with set_rtimeout
 extern int rmr_send_to( void* vctx, int time );                // DEPRECATED -- replaced with set_stimeout
 
+// ---- misc user interface stuff ----------------------------------------------------------------------
+extern void rmr_set_vlevel( int new_level );
 
 // --- uta compatability defs if needed user should define UTA_COMPAT  ----------------------------------
 #ifdef UTA_COMPAT