implemented provide_recommendation callback function

This commit is contained in:
Andreas Steffen
2010-11-09 20:43:51 +01:00
parent 1dc7b22c53
commit 213245cca9
5 changed files with 95 additions and 13 deletions
@@ -67,7 +67,8 @@ TNC_Result TNC_TNCS_ProvideRecommendation(TNC_IMVID imv_id,
TNC_IMV_Evaluation_Result evaluation)
{
DBG2(DBG_TNC,"TNCS_ProvideRecommendation %u %u", imv_id, connection_id);
return TNC_RESULT_SUCCESS;
return charon->tnccs->provide_recommendation(charon->tnccs, imv_id,
connection_id, recommendation, evaluation);
}
/**
+11 -2
View File
@@ -60,6 +60,14 @@ METHOD(tnccs_t, send_message, void,
this->batch = chunk_cat("mc", batch, msg);
}
METHOD(tnccs_t, provide_recommendation, void,
private_tnccs_20_t* this, TNC_IMVID imv_id,
TNC_IMV_Action_Recommendation recommendation,
TNC_IMV_Evaluation_Result evaluation)
{
DBG1(DBG_TNC, "TNCCS 2.0 provide recommendation");
}
METHOD(tls_t, process, status_t,
private_tnccs_20_t *this, void *buf, size_t buflen)
{
@@ -69,7 +77,8 @@ METHOD(tls_t, process, status_t,
if (this->is_server && !this->connection_id)
{
this->connection_id = charon->tnccs->create_connection(charon->tnccs,
(tnccs_t*)this, _send_message);
(tnccs_t*)this,
_send_message, _provide_recommendation);
charon->imvs->notify_connection_change(charon->imvs,
this->connection_id, TNC_CONNECTION_STATE_CREATE);
}
@@ -111,7 +120,7 @@ METHOD(tls_t, build, status_t,
if (!this->is_server && !this->connection_id)
{
this->connection_id = charon->tnccs->create_connection(charon->tnccs,
(tnccs_t*)this, _send_message);
(tnccs_t*)this, _send_message, NULL);
charon->imcs->notify_connection_change(charon->imcs,
this->connection_id, TNC_CONNECTION_STATE_CREATE);
charon->imcs->notify_connection_change(charon->imcs,