Implement kernel_ipsec_t.bypass_socket() via JNI and VpnService.protect()

This commit is contained in:
Tobias Brunner
2012-08-13 11:00:27 +02:00
parent 03de55ad98
commit d4f7675199
3 changed files with 43 additions and 1 deletions
@@ -28,6 +28,8 @@
#ifndef CHARONSERVICE_H_
#define CHARONSERVICE_H_
#include <library.h>
typedef struct charonservice_t charonservice_t;
/**
@@ -37,6 +39,16 @@ typedef struct charonservice_t charonservice_t;
*/
struct charonservice_t {
/**
* Install a bypass policy for the given socket using the protect() Method
* of the Android VpnService interface
*
* @param fd socket file descriptor
* @param family socket protocol family
* @return TRUE if operation successful
*/
bool (*bypass_socket)(charonservice_t *this, int fd, int family);
};
/**