~ubuntu-branches/ubuntu/oneiric/strongswan/oneiric

« back to all changes in this revision

Viewing changes to src/charon/plugins/kernel_klips/kernel_klips_plugin.c

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2008-12-05 17:21:42 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20081205172142-9g77wgyzcj0blq7p
* New upstream release, fixes a MOBIKE issue.
  Closes: #507542: strongswan: endless loop
* Explicitly enable compilation with libcurl for CRL fetching
  Closes: #497756: strongswan: not compiled with curl support; crl 
                   fetching not available
* Enable compilation with SSH agent support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2008 Tobias Brunner
 
3
 * Hochschule fuer Technik Rapperswil
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or modify it
 
6
 * under the terms of the GNU General Public License as published by the
 
7
 * Free Software Foundation; either version 2 of the License, or (at your
 
8
 * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful, but
 
11
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
12
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 
13
 * for more details.
 
14
 *
 
15
 * $Id: kernel_klips_plugin.c 4617 2008-11-11 08:45:19Z tobias $
 
16
 */
 
17
 
 
18
 
 
19
#include "kernel_klips_plugin.h"
 
20
 
 
21
#include "kernel_klips_ipsec.h"
 
22
 
 
23
#include <daemon.h>
 
24
 
 
25
typedef struct private_kernel_klips_plugin_t private_kernel_klips_plugin_t;
 
26
 
 
27
/**
 
28
 * private data of kernel PF_KEY plugin
 
29
 */
 
30
struct private_kernel_klips_plugin_t {
 
31
        /**
 
32
         * implements plugin interface
 
33
         */
 
34
        kernel_klips_plugin_t public;
 
35
};
 
36
 
 
37
/**
 
38
 * Implementation of plugin_t.destroy
 
39
 */
 
40
static void destroy(private_kernel_klips_plugin_t *this)
 
41
{
 
42
        charon->kernel_interface->remove_ipsec_interface(charon->kernel_interface, (kernel_ipsec_constructor_t)kernel_klips_ipsec_create);
 
43
        free(this);
 
44
}
 
45
 
 
46
/*
 
47
 * see header file
 
48
 */
 
49
plugin_t *plugin_create()
 
50
{
 
51
        private_kernel_klips_plugin_t *this = malloc_thing(private_kernel_klips_plugin_t);
 
52
        
 
53
        this->public.plugin.destroy = (void(*)(plugin_t*))destroy;
 
54
        
 
55
        charon->kernel_interface->add_ipsec_interface(charon->kernel_interface, (kernel_ipsec_constructor_t)kernel_klips_ipsec_create);
 
56
        
 
57
        return &this->public.plugin;
 
58
}