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"
19 typedef struct private_tnc_pdp_plugin_t private_tnc_pdp_plugin_t
;
22 * Default RADIUS port, when not configured
24 #define RADIUS_PORT 1812
27 * private data of tnc_pdp plugin
29 struct private_tnc_pdp_plugin_t
{
32 * implements plugin interface
34 tnc_pdp_plugin_t
public;
37 * Policy Decision Point object
43 METHOD(plugin_t
, get_name
, char*,
44 private_tnc_pdp_plugin_t
*this)
49 METHOD(plugin_t
, get_features
, int,
50 private_tnc_pdp_plugin_t
*this, plugin_feature_t
*features
[])
52 static plugin_feature_t f
[] = {
53 PLUGIN_PROVIDE(CUSTOM
, "tnc-pdp"),
54 PLUGIN_DEPENDS(CUSTOM
, "imv-manager"),
60 METHOD(plugin_t
, destroy
, void,
61 private_tnc_pdp_plugin_t
*this)
63 DESTROY_IF(this->pdp
);
70 plugin_t
*tnc_pdp_plugin_create()
72 private_tnc_pdp_plugin_t
*this;
75 port
= lib
->settings
->get_int(lib
->settings
,
76 "charon.plugins.tnc_pdp.radius_port", RADIUS_PORT
);
81 .get_name
= _get_name
,
82 .get_features
= _get_features
,
86 .pdp
= tnc_pdp_create(port
),
89 return &this->public.plugin
;