Sweep for expired routes. Sweeps every two seconds for now, not yet configurable.
[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 *sweep_ev;
16 } TR_TRPS_EVENTS;
17
18 /* prototypes */
19 TR_TRPS_EVENTS *tr_trps_events_new(TALLOC_CTX *mem_ctx);
20 TRP_RC tr_trps_event_init(struct event_base *base, TRPS_INSTANCE *trps, TR_CFG_MGR *cfg_mgr,
21                        TR_TRPS_EVENTS *trps_ev);
22 TRPC_INSTANCE *tr_trpc_initiate(TRPS_INSTANCE *trps, const char *server, unsigned int port);
23 #endif /* TR_TRP_H */