// : vi ts=4 sw=4 noet :
/*
==================================================================================
- Copyright (c) 2019 Nokia
+ Copyright (c) 2019 Nokia
Copyright (c) 2018-2019 AT&T Intellectual Property.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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 epe; // event definition for event to listen to
+ struct epoll_event events[1]; // wait on 10 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
} epoll_stuff_t;
/*
- Context describing our world. Should be returned to user programme on
+ Context describing our world. Should be returned to user programme on
call to initialise, and passed as first parm on all calls to other
visible functions.
route_table_t* new_rtable; // route table under construction
if_addrs_t* ip_list; // list manager of the IP addresses that are on our known interfaces
void* mring; // ring where msgs are queued while waiting for a call response msg
-
+
char* rtg_addr; // addr/port of the route table generation publisher
int rtg_port; // the port that the rtg listens on
-
+
wh_mgt_t* wormholes; // management of user opened wormholes
epoll_stuff_t* eps; // epoll information needed for the rcv with timeout call
/*
- Static prototypes for functions located here. All common protos are in the
+ Static prototypes for functions located here. All common protos are in the
agnostic header file.
*/
static int uta_link2( char* target, nng_socket* nn_sock, nng_dialer* dialer );
static int rt_link2_ep( endpoint_t* ep );
static int uta_epsock_byname( route_table_t* rt, char* ep_name, nng_socket* nn_sock );
-static int uta_epsock_rr( route_table_t *rt, int mtype, int group, int* more, nng_socket* nn_sock );
+static int uta_epsock_rr( route_table_t *rt, uint64_t key, int group, int* more, nng_socket* nn_sock );
static inline int xlate_nng_state( int state, int def_state );
// --- msg ---------------------------------------
-static rmr_mbuf_t* alloc_zcmsg( uta_ctx_t* ctx, rmr_mbuf_t* msg, int size, int state );
+static rmr_mbuf_t* alloc_zcmsg( uta_ctx_t* ctx, rmr_mbuf_t* msg, int size, int state, int trlo );
static rmr_mbuf_t* alloc_mbuf( uta_ctx_t* ctx, int state );
static void ref_tpbuf( rmr_mbuf_t* msg, size_t alen ) ;
static inline rmr_mbuf_t* clone_msg( rmr_mbuf_t* old_msg );
static rmr_mbuf_t* rcv_msg( uta_ctx_t* ctx, rmr_mbuf_t* old_msg );
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 );