Not needed enymore.
FossilOrigin-Name: 44d99f6b5621f2df10c43da750b0e312c38b9e08d7aa54c73f22fa0cbb792531
This commit is contained in:
parent
25c43831d6
commit
db4f08a2f0
@ -1,69 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "capwap.h"
|
||||
#include "capwap_cisco.h"
|
||||
|
||||
#include "conn.h"
|
||||
#include "cwmsg.h"
|
||||
#include "sock.h"
|
||||
|
||||
#include "cw_log.h"
|
||||
|
||||
void cwsend_discovery_response(struct conn *conn, int seqnum, struct radioinfo *radioinfo,
|
||||
struct ac_info *acinfo, struct wtpinfo *wtpinfo)
|
||||
{
|
||||
cw_dbg(DBG_MSG, "Sending discovery response to %s, seq = %d", sock_addr2str(&conn->addr),
|
||||
seqnum);
|
||||
|
||||
struct cwmsg *cwmsg = &conn->resp_msg;
|
||||
cwmsg_init(cwmsg, conn->resp_buffer, CW_MSG_DISCOVERY_RESPONSE, seqnum, NULL);
|
||||
cwmsg->capwap_mode = conn->capwap_mode;
|
||||
|
||||
|
||||
cwmsg_addelem_ac_descriptor(cwmsg, acinfo,wtpinfo);
|
||||
cwmsg_addelem(cwmsg, CW_ELEM_AC_NAME, (uint8_t *) acinfo->ac_name,
|
||||
strlen((char *) acinfo->ac_name));
|
||||
|
||||
cwmsg_addelem_wtp_radio_infos(cwmsg, acinfo->radioinfos);
|
||||
cwmsg_addelem_ctrl_ip_addrs(cwmsg, acinfo);
|
||||
|
||||
|
||||
/* Send Cisco-specific message elements if needed */
|
||||
switch (cwmsg->capwap_mode) {
|
||||
case CWMODE_CISCO:
|
||||
case CWMODE_CIPWAP:
|
||||
{
|
||||
cwmsg_addelem_cisco_ap_timesync(cwmsg,time(NULL),0);
|
||||
//uint8_t mwtype=1;
|
||||
//cwmsg_addelem_vendor_s_payload(cwmsg,CW_VENDOR_ID_CISCO,CW_CISCO_MWAR_TYPE,&mwtype,1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
conn_send_response(conn, cwmsg, seqnum);
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "capwap.h"
|
||||
#include "conn.h"
|
||||
#include "cwmsg.h"
|
||||
|
||||
|
||||
int cwsend_echo_request(struct conn * conn,struct radioinfo * radioinfo) //,struct wtpinfo * wtpinfo)
|
||||
{
|
||||
uint8_t buffer[CWMSG_MAX_SIZE];
|
||||
struct cwmsg cwmsg;
|
||||
|
||||
// cwmsg_init(&cwmsg,buffer,CWMSG_ECHO_REQUEST,conn_get_next_seqnum(conn),radioinfo);
|
||||
cwmsg_init_echo_request(&cwmsg,buffer,conn,radioinfo);
|
||||
return conn_send_cwmsg(conn,&cwmsg);
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
/*
|
||||
This file is part of libcapwap.
|
||||
|
||||
libcapwap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
libcapwap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
#include "capwap.h"
|
||||
|
||||
void cwmsg_addelem_image_data(struct cwmsg *cwmsg, struct image_data *data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int cwsend_image_data_request(struct conn * conn, struct image_data * data, struct image_identifier *id )
|
||||
{
|
||||
// uint8_t buffer[CWMSG_MAX_SIZE];
|
||||
struct cwmsg * cwmsg = &conn->req_msg;
|
||||
cwmsg_init(cwmsg,conn->req_buffer,CWMSG_IMAGE_DATA_REQUEST,conn_get_next_seqnum(conn),0);
|
||||
|
||||
if (data){
|
||||
// cwmsg_addelem(&cwmsg,CWMSGELEM_IMAGE_DATA,(uint8_t*)&data->type,sizeof(data->type));
|
||||
|
||||
|
||||
uint8_t type=3;
|
||||
uint16_t checksum=0;
|
||||
cwmsg_vaddelem(cwmsg,CWMSGELEM_IMAGE_DATA,
|
||||
&type, 1,
|
||||
&checksum,2,
|
||||
data->data, data->len,
|
||||
NULL
|
||||
);
|
||||
|
||||
|
||||
/* cwmsg_vaddelem(cwmsg,CWMSGELEM_IMAGE_DATA, 2,
|
||||
&data->type, sizeof(data->type),
|
||||
data->data, data->len
|
||||
);
|
||||
*/
|
||||
|
||||
}
|
||||
return conn_send_cwmsg(conn,cwmsg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user