X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fsi%2Finclude%2Frmr_si_private.h;h=9816c16c8a9134166314d2c8660eac1508c02e57;hb=b4ed359628db76a6afe4758599dc9b6b32c6f34a;hp=ddc9c3f06ac2a5dda8d5cda74b042c6695f21ef5;hpb=009378503e4621ab53f0839a409563b4a03e100f;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/si/include/rmr_si_private.h b/src/rmr/si/include/rmr_si_private.h index ddc9c3f..9816c16 100644 --- a/src/rmr/si/include/rmr_si_private.h +++ b/src/rmr/si/include/rmr_si_private.h @@ -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 @@ -51,7 +51,12 @@ #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 +#define MAX_RIVERS 1024 // max number of directly mapped rivers /* Manages a river of inbound bytes. @@ -124,6 +129,7 @@ struct uta_ctx { int d1_len; // extra header data 1 length int d2_len; // extra header data 2 length (future) int nn_sock; // our general listen socket + int rtable_ready; // set to true when rt is received or loaded route_table_t* rtable; // the active route table route_table_t* old_rtable; // the previously used rt, sits here to allow for draining route_table_t* new_rtable; // route table under construction @@ -148,10 +154,14 @@ struct uta_ctx { si_ctx_t* si_ctx; // the socket context int nrivers; // allocated rivers river_t* rivers; // inbound flows (index is the socket fd) + void* river_hash; // flows with fd values > nrivers must be mapped through the hash 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* ephash; // hash host:port or ip:port to endpoint struct + pthread_mutex_t *fd2ep_gate; // we must gate add/deletes to the fd2 symtab + pthread_mutex_t *rtgate; // master gate for accessing/moving route tables }; typedef uta_ctx_t uta_ctx;