2 * Copyright (C) 2010 Tobias Brunner
3 * Copyright (C) 2010 Martin Willi
5 * Copyright (C) secunet Security Networks AG
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 #include "socket_default_plugin.h"
20 #include "socket_default_socket.h"
24 typedef struct private_socket_default_plugin_t private_socket_default_plugin_t
;
27 * Private data of socket plugin
29 struct private_socket_default_plugin_t
{
32 * Implements plugin interface
34 socket_default_plugin_t
public;
37 METHOD(plugin_t
, get_name
, char*,
38 private_socket_default_plugin_t
*this)
40 return "socket-default";
43 METHOD(plugin_t
, destroy
, void,
44 private_socket_default_plugin_t
*this)
49 METHOD(plugin_t
, get_features
, int,
50 private_socket_default_plugin_t
*this, plugin_feature_t
*features
[])
52 static plugin_feature_t f
[] = {
53 PLUGIN_CALLBACK(socket_register
, socket_default_socket_create
),
54 PLUGIN_PROVIDE(CUSTOM
, "socket"),
55 PLUGIN_SDEPEND(CUSTOM
, "kernel-ipsec"),
64 plugin_t
*socket_default_plugin_create()
66 private_socket_default_plugin_t
*this;
71 .get_name
= _get_name
,
72 .get_features
= _get_features
,
78 return &this->public.plugin
;