Merge pull request #148 from majestrate/dev

make llarp.h pure C compatable
pull/150/head
Jeff 6 years ago committed by GitHub
commit 03927e6a5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,12 +1,9 @@
#ifndef LLARP_H_
#define LLARP_H_
#include <dht.h>
#ifdef __cplusplus
#include <ev.h>
#include <mem.h>
#ifdef __cplusplus
#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…
Cancel
Save