Connect to hard-coded peer and exchange route info. Buggy and incomplete.
[trust_router.git] / include / tr_trp.h
1 #ifndef TR_TRP_H
2 #define TR_TRP_H
3
4 #include <event2/event.h>
5 #include <talloc.h>
6 #include <pthread.h>
7
8 #include <trp_internal.h>
9 #include <tr_config.h>
10 #include <tr_event.h>
11
12 typedef struct tr_trps_events {
13   struct tr_socket_event *listen_ev;
14   struct event *mq_ev;
15   struct event *connect_ev;
16   struct event *update_ev;
17   struct event *sweep_ev;
18 } TR_TRPS_EVENTS;
19
20 /* prototypes */
21 TR_TRPS_EVENTS *tr_trps_events_new(TALLOC_CTX *mem_ctx);
22 TRP_RC tr_trps_event_init(struct event_base *base, TRPS_INSTANCE *trps, TR_CFG_MGR *cfg_mgr,
23                        TR_TRPS_EVENTS *trps_ev);
24 TRPC_INSTANCE *tr_trpc_initiate(TRPS_INSTANCE *trps, TRP_PEER *peer);
25 void tr_config_changed(TR_CFG *new_cfg, void *cookie);
26 TRP_RC tr_connect_to_peers(TRPS_INSTANCE *trps);
27 #endif /* TR_TRP_H */