added get_count() method to IMC/IMV managers
This commit is contained in:
@@ -93,6 +93,12 @@ METHOD(imc_manager_t, remove_, imc_t*,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
METHOD(imc_manager_t, get_count, int,
|
||||||
|
private_tnc_imc_manager_t *this)
|
||||||
|
{
|
||||||
|
return this->imcs->get_count(this->imcs);
|
||||||
|
}
|
||||||
|
|
||||||
METHOD(imc_manager_t, notify_connection_change, void,
|
METHOD(imc_manager_t, notify_connection_change, void,
|
||||||
private_tnc_imc_manager_t *this, TNC_ConnectionID id,
|
private_tnc_imc_manager_t *this, TNC_ConnectionID id,
|
||||||
TNC_ConnectionState state)
|
TNC_ConnectionState state)
|
||||||
@@ -199,6 +205,7 @@ imc_manager_t* tnc_imc_manager_create(void)
|
|||||||
.public = {
|
.public = {
|
||||||
.add = _add,
|
.add = _add,
|
||||||
.remove = _remove_, /* avoid name conflict with stdio.h */
|
.remove = _remove_, /* avoid name conflict with stdio.h */
|
||||||
|
.get_count = _get_count,
|
||||||
.notify_connection_change = _notify_connection_change,
|
.notify_connection_change = _notify_connection_change,
|
||||||
.begin_handshake = _begin_handshake,
|
.begin_handshake = _begin_handshake,
|
||||||
.set_message_types = _set_message_types,
|
.set_message_types = _set_message_types,
|
||||||
|
|||||||
@@ -93,6 +93,12 @@ METHOD(imv_manager_t, remove_, imv_t*,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
METHOD(imv_manager_t, get_count, int,
|
||||||
|
private_tnc_imv_manager_t *this)
|
||||||
|
{
|
||||||
|
return this->imvs->get_count(this->imvs);
|
||||||
|
}
|
||||||
|
|
||||||
METHOD(imv_manager_t, notify_connection_change, void,
|
METHOD(imv_manager_t, notify_connection_change, void,
|
||||||
private_tnc_imv_manager_t *this, TNC_ConnectionID id,
|
private_tnc_imv_manager_t *this, TNC_ConnectionID id,
|
||||||
TNC_ConnectionState state)
|
TNC_ConnectionState state)
|
||||||
@@ -185,6 +191,7 @@ imv_manager_t* tnc_imv_manager_create(void)
|
|||||||
.public = {
|
.public = {
|
||||||
.add = _add,
|
.add = _add,
|
||||||
.remove = _remove_, /* avoid name conflict with stdio.h */
|
.remove = _remove_, /* avoid name conflict with stdio.h */
|
||||||
|
.get_count = _get_count,
|
||||||
.notify_connection_change = _notify_connection_change,
|
.notify_connection_change = _notify_connection_change,
|
||||||
.set_message_types = _set_message_types,
|
.set_message_types = _set_message_types,
|
||||||
.receive_message = _receive_message,
|
.receive_message = _receive_message,
|
||||||
|
|||||||
@@ -48,6 +48,13 @@ struct imc_manager_t {
|
|||||||
*/
|
*/
|
||||||
imc_t* (*remove)(imc_manager_t *this, TNC_IMCID id);
|
imc_t* (*remove)(imc_manager_t *this, TNC_IMCID id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the number of registered IMCs
|
||||||
|
*
|
||||||
|
* @return number of IMCs
|
||||||
|
*/
|
||||||
|
int (*get_count)(imc_manager_t *this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify all IMC instances
|
* Notify all IMC instances
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,6 +48,13 @@ struct imv_manager_t {
|
|||||||
*/
|
*/
|
||||||
imv_t* (*remove)(imv_manager_t *this, TNC_IMVID id);
|
imv_t* (*remove)(imv_manager_t *this, TNC_IMVID id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the number of registered IMVs
|
||||||
|
*
|
||||||
|
* @return number of IMVs
|
||||||
|
*/
|
||||||
|
int (*get_count)(imv_manager_t *this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify all IMV instances
|
* Notify all IMV instances
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user