Eliminate the SI receive buffer length requirement
[ric-plt/lib/rmr.git] / src / rmr / si / include / rmr_si_private.h
index 99b5b20..6c6f74a 100644 (file)
@@ -34,8 +34,8 @@
 #define _uta_private_h
 
 // if pmode is off we don't compile in some checks in hopes of speeding things up
-#ifndef PARINOID_CHECKS
-#      define PARINOID_CHECKS 0
+#ifndef PARANOID_CHECKS
+#      define PARANOID_CHECKS 0
 #endif
 
 
 #define RF_NOTIFIED    0x01    // notification made about river issue
 #define RF_DROP                0x02    // this message is large and being dropped
 
+#define        TP_SZFIELD_LEN  ((sizeof(uint32_t)*2)+1)        // number of bytes needed for msg size in transport header
+#define        TP_SZ_MARKER    '$'                                                     // marker indicating net byte order used
+
+
 #define SI_MAX_ADDR_LEN                512
 
 /*
@@ -150,7 +154,8 @@ struct uta_ctx {
        river_t*        rivers;                 // inbound flows (index is the socket fd)
        int                     max_ibm;                // max size of an inbound message (river accum alloc size)
        void*           zcb_mring;              // zero copy buffer mbuf ring
-       void*           fd2ep;                  // the symtab mapping file des to endpoints for cleanup on disconnect
+       void*           fd2ep;                          // the symtab mapping file des to endpoints for cleanup on disconnect
+       pthread_mutex_t *fd2ep_gate;    // we must gate add/deletes to the fd2 symtab
 };
 
 typedef uta_ctx_t uta_ctx;
@@ -167,7 +172,8 @@ static void free_ctx( uta_ctx_t* ctx );
 
 // --- rt table things ---------------------------
 static void uta_ep_failed( endpoint_t* ep );
-static int uta_link2( si_ctx_t* si_ctx, endpoint_t* ep );
+static int uta_link2( uta_ctx_t *ctx, endpoint_t* ep );
+
 static int rt_link2_ep( void* vctx, endpoint_t* ep );
 static rtable_ent_t* uta_get_rte( route_table_t *rt, int sid, int mtype, int try_alt );
 static inline int xlate_si_state( int state, int def_state );