2 * Copyright (C) 2010 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
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>.
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
16 #include "tnc_pdp_plugin.h"
21 typedef struct private_tnc_pdp_plugin_t private_tnc_pdp_plugin_t
;
24 * Default RADIUS port, when not configured
26 #define RADIUS_PORT 1812
29 * private data of tnc_pdp plugin
31 struct private_tnc_pdp_plugin_t
{
34 * implements plugin interface
36 tnc_pdp_plugin_t
public;
39 * Policy Decision Point object
45 METHOD(plugin_t
, get_name
, char*,
46 private_tnc_pdp_plugin_t
*this)
51 METHOD(plugin_t
, get_features
, int,
52 private_tnc_pdp_plugin_t
*this, plugin_feature_t
*features
[])
54 static plugin_feature_t f
[] = {
55 PLUGIN_PROVIDE(CUSTOM
, "tnc-pdp"),
56 PLUGIN_DEPENDS(CUSTOM
, "imv-manager"),
62 METHOD(plugin_t
, destroy
, void,
63 private_tnc_pdp_plugin_t
*this)
65 DESTROY_IF(this->pdp
);
72 plugin_t
*tnc_pdp_plugin_create()
74 private_tnc_pdp_plugin_t
*this;
77 port
= lib
->settings
->get_int(lib
->settings
,
78 "%s.plugins.tnc_pdp.port", RADIUS_PORT
, charon
->name
);
83 .get_name
= _get_name
,
84 .get_features
= _get_features
,
88 .pdp
= tnc_pdp_create(port
),
91 return &this->public.plugin
;