2018-01-25 16:24:33 +00:00
|
|
|
#ifndef LLARP_H_
|
|
|
|
#define LLARP_H_
|
2018-06-01 14:08:54 +00:00
|
|
|
#include <llarp/dht.h>
|
2018-01-25 16:24:33 +00:00
|
|
|
#include <llarp/ev.h>
|
2018-04-30 18:18:18 +00:00
|
|
|
#include <llarp/logic.h>
|
2018-05-22 15:54:19 +00:00
|
|
|
#include <llarp/mem.h>
|
2018-05-10 23:32:46 +00:00
|
|
|
#include <llarp/nodedb.h>
|
2018-05-22 15:54:19 +00:00
|
|
|
#include <llarp/router.h>
|
|
|
|
#include <llarp/version.h>
|
2018-05-27 18:03:10 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** llarp application context for C api */
|
|
|
|
struct llarp_main;
|
|
|
|
|
|
|
|
/** initialize application context and load config */
|
2018-05-27 19:13:25 +00:00
|
|
|
struct llarp_main *
|
|
|
|
llarp_main_init(const char *fname);
|
2018-05-27 18:03:10 +00:00
|
|
|
|
|
|
|
/** handle signal for main context */
|
|
|
|
void
|
|
|
|
llarp_main_signal(struct llarp_main *ptr, int sig);
|
|
|
|
|
2018-06-01 14:08:54 +00:00
|
|
|
/** set custom dht message handler function */
|
|
|
|
void
|
|
|
|
llarp_main_set_dht_handler(struct llarp_main *ptr, llarp_dht_msg_handler h);
|
|
|
|
|
2018-05-27 18:03:10 +00:00
|
|
|
/** run main context */
|
|
|
|
int
|
|
|
|
llarp_main_run(struct llarp_main *ptr);
|
|
|
|
|
|
|
|
void
|
2018-05-27 19:13:25 +00:00
|
|
|
llarp_main_free(struct llarp_main *ptr);
|
2018-05-27 18:03:10 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2018-01-25 16:24:33 +00:00
|
|
|
#endif
|