diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-08-13 12:07:52 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-08-13 12:07:52 +0200 |
commit | 09ae3d79ca0f1143736a0de45678915a3ebe5a3f (patch) | |
tree | d304e8e618450d0e4867dfc72e14ed575a442c20 /src/libipsec/ipsec.c | |
parent | e4ef4c9877d5ccb773ace0edf655351428c39572 (diff) | |
parent | efbb5e8c57330ec730825aa31ac5153f1d1c5913 (diff) | |
download | strongswan-09ae3d79ca0f1143736a0de45678915a3ebe5a3f.tar.bz2 strongswan-09ae3d79ca0f1143736a0de45678915a3ebe5a3f.tar.xz |
Merge branch 'android-app'
This branch introduces a userland IPsec implementation (libipsec) and an
Android App which targets the VpnService API that is provided by Android 4+.
The implementation is based on the bachelor thesis 'Userland IPsec for
Android 4' by Giuliano Grassi and Ralf Sager.
Diffstat (limited to 'src/libipsec/ipsec.c')
-rw-r--r-- | src/libipsec/ipsec.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/libipsec/ipsec.c b/src/libipsec/ipsec.c index add3b463a..50d9163ea 100644 --- a/src/libipsec/ipsec.c +++ b/src/libipsec/ipsec.c @@ -1,4 +1,6 @@ /* + * Copyright (C) 2012 Giuliano Grassi + * Copyright (C) 2012 Ralf Sager * Copyright (C) 2012 Tobias Brunner * Hochschule fuer Technik Rapperswil * @@ -41,6 +43,10 @@ ipsec_t *ipsec; void libipsec_deinit() { private_ipsec_t *this = (private_ipsec_t*)ipsec; + DESTROY_IF(this->public.processor); + DESTROY_IF(this->public.events); + DESTROY_IF(this->public.policies); + DESTROY_IF(this->public.sas); free(this); ipsec = NULL; } @@ -52,10 +58,7 @@ bool libipsec_init() { private_ipsec_t *this; - INIT(this, - .public = { - }, - ); + INIT(this); ipsec = &this->public; if (lib->integrity && @@ -64,6 +67,11 @@ bool libipsec_init() DBG1(DBG_LIB, "integrity check of libipsec failed"); return FALSE; } + + this->public.sas = ipsec_sa_mgr_create(); + this->public.policies = ipsec_policy_mgr_create(); + this->public.events = ipsec_event_relay_create(); + this->public.processor = ipsec_processor_create(); return TRUE; } |