X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fcommon%2Finclude%2Frmr_agnostic.h;h=86f46608b4198f7512093cb5738eea8929b00d6b;hb=ec88d3c0563eeb6ae5f73427edb0b3c4d7acf299;hp=8694574d8e9b11e5d087a6ee337a78b1e5bcddf5;hpb=c06c626ddf4f45a28a3db3f1afbb7ac87160045f;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/common/include/rmr_agnostic.h b/src/rmr/common/include/rmr_agnostic.h index 8694574..86f4660 100644 --- a/src/rmr/common/include/rmr_agnostic.h +++ b/src/rmr/common/include/rmr_agnostic.h @@ -44,12 +44,19 @@ typedef struct uta_ctx uta_ctx_t; #define QUOTE_DEF(a) QUOTE(a) // allow a #define value to be quoted (e.g. QUOTE(MAJOR_VERSION) ) +#define RT_SIZE 10009 // primary entries in route table (prime) meids hash through this so larger than expected # meids + // space deginations in the hash table +#define RT_MT_SPACE 0 // (integer) message type as the key +#define RT_NAME_SPACE 1 // enpoint name/address is the key +#define RT_ME_SPACE 2 // message id is the key + #define RMR_MSG_VER 3 // message version this code was designed to handle // environment variable names we'll suss out #define ENV_BIND_IF "RMR_BIND_IF" // the interface to bind to for both normal comma and RTG (0.0.0.0 if missing) #define ENV_RTG_PORT "RMR_RTG_SVC" // the port we'll listen on for rtg connections #define ENV_SEED_RT "RMR_SEED_RT" // where we expect to find the name of the seed route table +#define ENV_SEED_MEMAP "RMR_SEED_MEMAP" // where we expect to find the name of the seed route table #define ENV_RTG_RAW "RMR_RTG_ISRAW" // if > 0 we expect route table gen messages as raw (not sent from an RMr application) #define ENV_VERBOSE_FILE "RMR_VCTL_FILE" // file where vlevel may be managed for some (non-time critical) functions #define ENV_NAME_ONLY "RMR_SRC_NAMEONLY" // src in message is name only @@ -146,7 +153,7 @@ typedef struct uta_ctx uta_ctx_t; */ typedef struct { int32_t mtype; // message type ("long" network integer) - int32_t plen; // payload length + int32_t plen; // payload length (sender data length in payload) int32_t rmr_ver; // our internal message version number unsigned char xid[RMR_MAX_XID]; // space for user transaction id or somesuch unsigned char sid[RMR_MAX_SID]; // sender ID for return to sender needs @@ -197,7 +204,7 @@ typedef struct { uint64_t key; // key used to reinsert this entry into a new symtab int refs; // number of symtabs which reference the entry int mtype; // the message type for this list - int nrrgroups; // number of rr groups to send to + int nrrgroups; // number of rr groups to send to (if 0, the meid in a message determines endpoint) rrgroup_t** rrgroups; // one or more set of endpoints to round robin messages to } rtable_ent_t; @@ -207,6 +214,7 @@ typedef struct { typedef struct { void* hash; // hash table. int updates; // counter of update records received + int mupdates; // counter of meid update records received } route_table_t; /* @@ -235,6 +243,7 @@ typedef struct ring { uint16_t tail; // index of the tail (extract point) uint16_t nelements; // number of elements in the ring void** data; // the ring data (pointers to blobs of stuff) + int pfd; // event fd for the ring for epoll } ring_t;