mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
Merge pull request #148 from majestrate/dev
make llarp.h pure C compatable
This commit is contained in:
commit
03927e6a5b
@ -1,12 +1,9 @@
|
|||||||
#ifndef LLARP_H_
|
#ifndef LLARP_H_
|
||||||
#define LLARP_H_
|
#define LLARP_H_
|
||||||
|
|
||||||
#include <dht.h>
|
|
||||||
#include <ev.h>
|
|
||||||
|
|
||||||
#include <mem.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
#include <ev.h>
|
||||||
|
#include <mem.h>
|
||||||
#include <logic.hpp>
|
#include <logic.hpp>
|
||||||
#include <version.hpp>
|
#include <version.hpp>
|
||||||
#include <handlers/tun.hpp> // for handlers
|
#include <handlers/tun.hpp> // for handlers
|
||||||
@ -41,17 +38,26 @@ extern "C"
|
|||||||
void
|
void
|
||||||
llarp_main_inject_vpn_fd(struct llarp_main *m, int fd);
|
llarp_main_inject_vpn_fd(struct llarp_main *m, int fd);
|
||||||
|
|
||||||
/// setup main context
|
/// setup main context, returns 0 on success
|
||||||
int
|
int
|
||||||
llarp_main_setup(struct llarp_main *ptr);
|
llarp_main_setup(struct llarp_main *ptr);
|
||||||
|
|
||||||
/// run main context
|
/// run main context, returns 0 on success, blocks until program end
|
||||||
int
|
int
|
||||||
llarp_main_run(struct llarp_main *ptr);
|
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
|
void
|
||||||
llarp_main_abort(struct llarp_main *ptr);
|
llarp_main_abort(struct llarp_main *ptr);
|
||||||
|
|
||||||
|
const char *
|
||||||
|
handleBaseCmdLineArgs(int argc, char *argv[]);
|
||||||
|
|
||||||
/// load nodeDB into memory
|
/// load nodeDB into memory
|
||||||
int
|
int
|
||||||
llarp_main_loadDatabase(struct llarp_main *ptr);
|
llarp_main_loadDatabase(struct llarp_main *ptr);
|
||||||
@ -104,15 +110,6 @@ extern "C"
|
|||||||
|
|
||||||
llarp::RouterContact *
|
llarp::RouterContact *
|
||||||
llarp_main_getLocalRC(struct llarp_main *ptr);
|
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
|
/// get RC from nodeDB
|
||||||
llarp::RouterContact *
|
llarp::RouterContact *
|
||||||
llarp_main_getDatabase(struct llarp_main *ptr, byte_t *pk);
|
llarp_main_getDatabase(struct llarp_main *ptr, byte_t *pk);
|
||||||
|
Loading…
Reference in New Issue
Block a user