Add an Android specific kernel_net_t implementation

This currently provides only no-ops and is just added because a
kernel-net implementation is required and kernel-netlink can't be used
at the moment.
This commit is contained in:
Tobias Brunner
2012-08-13 11:00:27 +02:00
parent 6e04147743
commit 24447cf49f
5 changed files with 126 additions and 1 deletions
@@ -21,6 +21,7 @@
#include "charonservice.h"
#include "android_jni.h"
#include "kernel/android_net.h"
#include <daemon.h>
#include <hydra.h>
@@ -94,6 +95,10 @@ static void dbg_android(debug_t group, level_t level, char *fmt, ...)
static void charonservice_init(JNIEnv *env, jobject service)
{
private_charonservice_t *this;
static plugin_feature_t features[] = {
PLUGIN_CALLBACK(kernel_net_register, kernel_android_net_create),
PLUGIN_PROVIDE(CUSTOM, "kernel-net"),
};
INIT(this,
.public = {
@@ -102,6 +107,9 @@ static void charonservice_init(JNIEnv *env, jobject service)
);
charonservice = &this->public;
lib->plugins->add_static_features(lib->plugins, "androidbridge", features,
countof(features), TRUE);
lib->settings->set_int(lib->settings,
"charon.plugins.android_log.loglevel", ANDROID_DEBUG_LEVEL);
}