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-15 16:31:26 +02:00
|
|
|
const char * ipstr;
|
|
|
|
int rc;
|
|
|
|
cw_Val_t ip;
|
|
|
|
ipstr = cw_cfg_get_l(params->cfg_list,eh->key,NULL);
|
|
|
|
if (ipstr==NULL){
|
2018-04-07 19:26:22 +02:00
|
|
|
return 0;
|
|
|
|
}
|
2022-08-15 16:31:26 +02:00
|
|
|
CW_TYPE_IPADDRESS->from_str(&ip,ipstr);
|
|
|
|
rc= cw_put_local_ip_address(dst,eh->id,
|
2018-04-07 19:26:22 +02:00
|
|
|
CAPWAP_ELEM_WTP_IPV4_IP_ADDRESS,
|
|
|
|
CAPWAP_ELEM_WTP_IPV6_IP_ADDRESS,
|
2022-08-15 16:31:26 +02:00
|
|
|
ip.type->data(&ip),ip.type->len(&ip));
|
|
|
|
ip.type->del(&ip);
|
|
|
|
return rc;
|
2018-04-07 19:26:22 +02:00
|
|
|
}
|