1
1
Fork 0
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:
Jeff Becker 2018-12-13 16:46:55 -05:00
parent 312ccdf478
commit c3ac2811f6
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05

View file

@ -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);