mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
make llarp.h pure C compatable
This commit is contained in:
parent
312ccdf478
commit
c3ac2811f6
1 changed files with 13 additions and 16 deletions
|
@ -1,12 +1,9 @@
|
|||
#ifndef LLARP_H_
|
||||
#define LLARP_H_
|
||||
|
||||
#include <dht.h>
|
||||
#include <ev.h>
|
||||
|
||||
#include <mem.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <ev.h>
|
||||
#include <mem.h>
|
||||
#include <logic.hpp>
|
||||
#include <version.hpp>
|
||||
#include <handlers/tun.hpp> // for handlers
|
||||
|
@ -41,17 +38,26 @@ extern "C"
|
|||
void
|
||||
llarp_main_inject_vpn_fd(struct llarp_main *m, int fd);
|
||||
|
||||
/// setup main context
|
||||
/// setup main context, returns 0 on success
|
||||
int
|
||||
llarp_main_setup(struct llarp_main *ptr);
|
||||
|
||||
/// run main context
|
||||
/// run main context, returns 0 on success, blocks until program end
|
||||
int
|
||||
llarp_main_run(struct llarp_main *ptr);
|
||||
|
||||
/// free main context and end all operations
|
||||
void
|
||||
llarp_main_free(struct llarp_main *ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
void
|
||||
llarp_main_abort(struct llarp_main *ptr);
|
||||
|
||||
const char *
|
||||
handleBaseCmdLineArgs(int argc, char *argv[]);
|
||||
|
||||
/// load nodeDB into memory
|
||||
int
|
||||
llarp_main_loadDatabase(struct llarp_main *ptr);
|
||||
|
@ -104,15 +110,6 @@ extern "C"
|
|||
|
||||
llarp::RouterContact *
|
||||
llarp_main_getLocalRC(struct llarp_main *ptr);
|
||||
|
||||
void
|
||||
llarp_main_free(struct llarp_main *ptr);
|
||||
|
||||
const char *
|
||||
handleBaseCmdLineArgs(int argc, char *argv[]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
/// get RC from nodeDB
|
||||
llarp::RouterContact *
|
||||
llarp_main_getDatabase(struct llarp_main *ptr, byte_t *pk);
|
||||
|
|
Loading…
Reference in a new issue