X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=src%2Frmr%2Fnng%2Finclude%2Frmr_nng_private.h;h=878742c5585e6d95385f74eb59e2b5b922617c59;hb=ec88d3c0563eeb6ae5f73427edb0b3c4d7acf299;hp=efb2daabc3356a66f3194d24e5d98dc8d5fe9bdf;hpb=c06c626ddf4f45a28a3db3f1afbb7ac87160045f;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/nng/include/rmr_nng_private.h b/src/rmr/nng/include/rmr_nng_private.h index efb2daa..878742c 100644 --- a/src/rmr/nng/include/rmr_nng_private.h +++ b/src/rmr/nng/include/rmr_nng_private.h @@ -44,6 +44,7 @@ struct endpoint { nng_dialer dialer; // the connection specific information (retry timout etc) int open; // set to true if we've connected as socket cannot be checked directly) pthread_mutex_t gate; // we must serialise when we open/link to the endpoint + int notify; // when set we can write connect failure msgs to stderr long long scounts[EPSC_SIZE]; // send counts (indexed by EPSCOUNT_* constants }; @@ -51,7 +52,7 @@ struct endpoint { Epoll information needed for the rmr_torcv_msg() funciton */ typedef struct epoll_stuff { - struct epoll_event events[1]; // wait on 10 possible events + struct epoll_event events[1]; // wait on 1 possible events struct epoll_event epe; // event definition for event to listen to int ep_fd; // file des from nng int nng_fd; // fd from nng @@ -107,7 +108,7 @@ static void free_ctx( uta_ctx_t* ctx ); // --- rt table things --------------------------- static int uta_link2( endpoint_t* ep ); -static int rt_link2_ep( endpoint_t* ep ); +static int rt_link2_ep( void* vctx, endpoint_t* ep ); static int uta_epsock_byname( route_table_t* rt, char* ep_name, nng_socket* nn_sock, endpoint_t** uepp ); static int uta_epsock_rr( rtable_ent_t* rte, int group, int* more, nng_socket* nn_sock, endpoint_t** uepp ); static rtable_ent_t* uta_get_rte( route_table_t *rt, int sid, int mtype, int try_alt ); @@ -124,6 +125,7 @@ static void* rcv_payload( uta_ctx_t* ctx, rmr_mbuf_t* old_msg ); static inline rmr_mbuf_t* realloc_msg( rmr_mbuf_t* old_msg, int tr_len ); static rmr_mbuf_t* send_msg( uta_ctx_t* ctx, rmr_mbuf_t* msg, nng_socket nn_sock, int retries ); static rmr_mbuf_t* send2ep( uta_ctx_t* ctx, endpoint_t* ep, rmr_mbuf_t* msg ); +static rmr_mbuf_t* realloc_payload( rmr_mbuf_t* mbuf, int new_len, int copy, int clone );