Add a lookip plugin stub to lookup connections by virtual IP
[strongswan.git] / src / libcharon / plugins / lookip / lookip_plugin.c
1 /*
2 * Copyright (C) 2012 Martin Willi
3 * Copyright (C) 2012 revosec AG
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 "lookip_plugin.h"
17
18 #include <daemon.h>
19
20 typedef struct private_lookip_plugin_t private_lookip_plugin_t;
21
22 /**
23 * private data of lookip plugin
24 */
25 struct private_lookip_plugin_t {
26
27 /**
28 * implements plugin interface
29 */
30 lookip_plugin_t public;
31 };
32
33 METHOD(plugin_t, get_name, char*,
34 private_lookip_plugin_t *this)
35 {
36 return "lookip";
37 }
38
39 METHOD(plugin_t, destroy, void,
40 private_lookip_plugin_t *this)
41 {
42 free(this);
43 }
44
45 /**
46 * Plugin constructor
47 */
48 plugin_t *lookip_plugin_create()
49 {
50 private_lookip_plugin_t *this;
51
52 INIT(this,
53 .public = {
54 .plugin = {
55 .get_name = _get_name,
56 .reload = (void*)return_false,
57 .destroy = _destroy,
58 },
59 },
60 );
61
62 return &this->public.plugin;
63 }