2022-07-28 01:36:16 +02:00
|
|
|
#include "cw/conn.h"
|
|
|
|
|
2018-04-07 19:26:22 +02:00
|
|
|
#include "mod_cisco.h"
|
|
|
|
#include "cw/cw.h"
|
2022-08-13 09:47:12 +02:00
|
|
|
#include "cw/dbg.h"
|
|
|
|
|
2018-04-07 19:26:22 +02:00
|
|
|
|
|
|
|
int cisco_out_capwap_local_ip_address(struct cw_ElemHandler * eh,
|
|
|
|
struct cw_ElemHandlerParams * params, uint8_t * dst)
|
|
|
|
{
|
2022-08-13 09:47:12 +02:00
|
|
|
stop();
|
|
|
|
|
2022-07-31 17:15:32 +02:00
|
|
|
cw_Val_t * ip;
|
2022-08-13 09:47:12 +02:00
|
|
|
ip = cw_ktv_get(params->cfg,eh->key,CW_TYPE_IPADDRESS);
|
2018-04-07 19:26:22 +02:00
|
|
|
if (ip==NULL){
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return cw_put_local_ip_address(dst,eh->id,
|
|
|
|
CAPWAP_ELEM_WTP_IPV4_IP_ADDRESS,
|
|
|
|
CAPWAP_ELEM_WTP_IPV6_IP_ADDRESS,
|
|
|
|
ip->type->data(ip),ip->type->len(ip));
|
|
|
|
}
|