2018-03-19 17:26:01 +01:00
|
|
|
|
|
|
|
#include "capwap.h"
|
2018-03-12 11:22:06 +01:00
|
|
|
#include "msgset.h"
|
|
|
|
#include "ktv.h"
|
2018-03-07 13:13:58 +01:00
|
|
|
#include "log.h"
|
2018-03-06 03:08:14 +01:00
|
|
|
|
2018-03-09 07:44:17 +01:00
|
|
|
int cw_in_generic(struct cw_ElemHandler * handler, struct cw_ElemHandlerParams * params,
|
2018-03-19 17:26:01 +01:00
|
|
|
uint8_t * elem_data, int elem_len)
|
|
|
|
{
|
|
|
|
cw_KTV_t * result;
|
2018-03-07 13:13:58 +01:00
|
|
|
|
|
|
|
if (!handler->type){
|
|
|
|
cw_log(LOG_ERR,"Can't handle element: %s, no type defined",handler->name);
|
2018-03-19 17:26:01 +01:00
|
|
|
return CAPWAP_RESULT_UNRECOGNIZED_MESSAGE_ELEMENT;
|
2018-03-07 13:13:58 +01:00
|
|
|
}
|
2018-03-09 07:44:17 +01:00
|
|
|
|
2018-03-19 17:26:01 +01:00
|
|
|
result = cw_ktv_add(params->conn->remote_cfg, handler->key,
|
2018-04-25 10:43:27 +02:00
|
|
|
handler->type,NULL, elem_data,elem_len);
|
2018-03-07 13:13:58 +01:00
|
|
|
|
2018-03-19 17:26:01 +01:00
|
|
|
params->elem=result;
|
2018-03-06 03:08:14 +01:00
|
|
|
|
2018-03-19 17:26:01 +01:00
|
|
|
return CAPWAP_RESULT_SUCCESS;
|
2015-04-26 12:36:53 +02:00
|
|
|
}
|