9ec91f006354707c45227d147a0072d902833ed9
[strongswan.git] / src / libcharon / plugins / tnccs_11 / tnccs_11_plugin.c
1 /*
2 * Copyright (C) 2010 Andreas Steffen
3 * HSR 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
16 #include "tnccs_11_plugin.h"
17 #include "tnccs_11.h"
18
19 #include <daemon.h>
20
21 METHOD(plugin_t, get_name, char*,
22 tnccs_11_plugin_t *this)
23 {
24 return "tnccs-11";
25 }
26
27 METHOD(plugin_t, destroy, void,
28 tnccs_11_plugin_t *this)
29 {
30 charon->tnccs->remove_method(charon->tnccs,
31 (tnccs_constructor_t)tnccs_11_create);
32 free(this);
33 }
34
35 /*
36 * see header file
37 */
38 plugin_t *tnccs_11_plugin_create()
39 {
40 tnccs_11_plugin_t *this;
41
42 INIT(this,
43 .plugin = {
44 .get_name = _get_name,
45 .reload = (void*)return_false,
46 .destroy = _destroy,
47 },
48 );
49
50 charon->tnccs->add_method(charon->tnccs, TNCCS_1_1,
51 (tnccs_constructor_t)tnccs_11_create);
52
53 return &this->plugin;
54 }
55