aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/tnc_pdp/tnc_pdp.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2013-08-08 19:43:43 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2013-08-15 23:34:22 +0200
commit12b3db500606bcbd6fd2986463a4b1f37586bdbb (patch)
tree1c88258c3c8230dd65cca43448b6858a14f58af6 /src/libcharon/plugins/tnc_pdp/tnc_pdp.c
parent9d8c28e2f5b23e3f1008e8ba064403834683e35a (diff)
downloadstrongswan-12b3db500606bcbd6fd2986463a4b1f37586bdbb.tar.bz2
strongswan-12b3db500606bcbd6fd2986463a4b1f37586bdbb.tar.xz
moved tnc_imv plugin to libtnccs thanks to recommendation callback function
Diffstat (limited to 'src/libcharon/plugins/tnc_pdp/tnc_pdp.c')
-rw-r--r--src/libcharon/plugins/tnc_pdp/tnc_pdp.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/libcharon/plugins/tnc_pdp/tnc_pdp.c b/src/libcharon/plugins/tnc_pdp/tnc_pdp.c
index 686df15c7..707b113e4 100644
--- a/src/libcharon/plugins/tnc_pdp/tnc_pdp.c
+++ b/src/libcharon/plugins/tnc_pdp/tnc_pdp.c
@@ -26,6 +26,9 @@
#include <tnc/tnc.h>
+#include <tncifimv.h>
+#include <tncif_names.h>
+
#include <daemon.h>
#include <utils/debug.h>
#include <pen/pen.h>
@@ -563,6 +566,19 @@ end:
}
/**
+ * Callback function to get recommendation from TNCCS connection
+ */
+static bool get_recommendation(TNC_IMV_Action_Recommendation rec,
+ TNC_IMV_Evaluation_Result eval)
+{
+ DBG1(DBG_TNC, "final recommendation is '%N' and evaluation is '%N'",
+ TNC_IMV_Action_Recommendation_names, rec,
+ TNC_IMV_Evaluation_Result_names, eval);
+
+ return TRUE;
+}
+
+/**
* Get more data on a PT-TLS connection
*/
static bool pt_tls_receive_more(pt_tls_server_t *this, int fd,
@@ -607,7 +623,8 @@ static bool pt_tls_receive(private_tnc_pdp_t *this, int fd, watcher_event_t even
peer = identification_create_from_encoding(ID_ANY, chunk_empty),
tnccs = tnc->tnccs->create_instance(tnc->tnccs, TNCCS_2_0, TRUE,
- this->server, peer, TNC_IFT_TLS_2_0);
+ this->server, peer, TNC_IFT_TLS_2_0,
+ (tnccs_cb_t)get_recommendation);
peer->destroy(peer);
if (!tnccs)