imc-swima: Support subscriptions
This commit is contained in:
@@ -73,6 +73,11 @@ struct private_imc_agent_t {
|
||||
*/
|
||||
rwlock_t *connection_lock;
|
||||
|
||||
/**
|
||||
* Is the transport protocol PT-TLS?
|
||||
*/
|
||||
bool has_pt_tls;
|
||||
|
||||
/**
|
||||
* Inform a TNCC about the set of message types the IMC is able to receive
|
||||
*
|
||||
@@ -372,6 +377,8 @@ METHOD(imc_agent_t, create_state, TNC_Result,
|
||||
DBG2(DBG_IMC, " over %s %s with maximum PA-TNC message size of %u bytes",
|
||||
t_p ? t_p:"?", t_v ? t_v :"?", max_msg_len);
|
||||
|
||||
this->has_pt_tls = streq(t_p, "IF-T for TLS");
|
||||
|
||||
free(tnccs_p);
|
||||
free(tnccs_v);
|
||||
free(t_p);
|
||||
@@ -531,6 +538,12 @@ METHOD(imc_agent_t, get_non_fatal_attr_types, linked_list_t*,
|
||||
return this->non_fatal_attr_types;
|
||||
}
|
||||
|
||||
METHOD(imc_agent_t, has_pt_tls, bool,
|
||||
private_imc_agent_t *this)
|
||||
{
|
||||
return this->has_pt_tls;
|
||||
}
|
||||
|
||||
METHOD(imc_agent_t, destroy, void,
|
||||
private_imc_agent_t *this)
|
||||
{
|
||||
@@ -575,6 +588,7 @@ imc_agent_t *imc_agent_create(const char *name,
|
||||
.create_id_enumerator = _create_id_enumerator,
|
||||
.add_non_fatal_attr_type = _add_non_fatal_attr_type,
|
||||
.get_non_fatal_attr_types = _get_non_fatal_attr_types,
|
||||
.has_pt_tls = _has_pt_tls,
|
||||
.destroy = _destroy,
|
||||
},
|
||||
.name = name,
|
||||
|
||||
@@ -181,6 +181,13 @@ struct imc_agent_t {
|
||||
*/
|
||||
linked_list_t* (*get_non_fatal_attr_types)(imc_agent_t *this);
|
||||
|
||||
/**
|
||||
* Is the transport protocol PT-TLS?
|
||||
*
|
||||
* return TRUE if PT-TLS
|
||||
*/
|
||||
bool (*has_pt_tls)(imc_agent_t *this);
|
||||
|
||||
/**
|
||||
* Destroys an imc_agent_t object
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user