Not needed anymore

FossilOrigin-Name: b5db41a7e4a76a8748c735aaea4d57b6b4422f1f1f8330e683dcf777e5236b58
This commit is contained in:
7u83@mail.ru 2016-03-26 08:45:54 +00:00
parent 779c168fff
commit 9d3b3cadee
3 changed files with 0 additions and 124 deletions

View File

@ -1,34 +0,0 @@
#include "capwap.h"
#include "conn.h"
void cwmsg_addelem_capwap_timers(struct cwmsg *msg,int discovery,int echo_request)
{
uint8_t timers[2];
timers[0]=discovery;
timers[1]=echo_request;
cwmsg_addelem(msg,CW_ELEM_CAPWAP_TIMERS,timers,sizeof(timers));
}
void cwsend_conf_status_response(struct conn * conn,int seqnum, int rc, struct radioinfo * radioinfo, struct ac_info * acinfo, struct wtpinfo * wtpinfo)
{
struct cwmsg * cwmsg = &conn->resp_msg;
cwmsg_init(cwmsg,conn->resp_buffer,CW_MSG_CONFIGURATION_STATUS_RESPONSE,seqnum,NULL);
cwmsg_addelem_capwap_timers(cwmsg,120,15);
/*
cwmsg_addelem_result_code(cwmsg,rc);
cwmsg_addelem_ac_descriptor(cwmsg,acinfo);
cwmsg_addelem(cwmsg,CWMSGELEM_AC_NAME,acinfo->ac_name,strlen((char*)acinfo->ac_name));
cwmsg_addelem(cwmsg,CWMSGELEM_ECN_SUPPORT,&acinfo->ecn_support,sizeof(uint8_t));
cwmsg_addelem_ctrl_ip_addrs(cwmsg,acinfo);
cwmsg_addelem_cw_local_ip_addr(cwmsg,conn);
*/
conn_send_response(conn,cwmsg,seqnum);
}

View File

@ -1,39 +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_configuration_status_request(struct conn * conn,struct radioinfo * radioinfo,struct wtpinfo * wtpinfo)
{
uint8_t buffer[CWMSG_MAX_SIZE];
struct cwmsg cwmsg;
cwmsg_init(&cwmsg,buffer,CWMSG_DISCOVERY_REQUEST,conn_get_next_seqnum(conn),radioinfo);
cwmsg_addelem(&cwmsg,CWMSGELEM_DISCOVERY_TYPE,&wtpinfo->discovery_type,sizeof(uint8_t));
cwmsg_addelem_wtp_board_data(&cwmsg,wtpinfo);
cwmsg_addelem_wtp_descriptor(&cwmsg,wtpinfo);
cwmsg_addelem(&cwmsg,CWMSGELEM_WTP_FRAME_TUNNEL_MODE,&wtpinfo->frame_tunnel_mode,sizeof(uint8_t));
cwmsg_addelem(&cwmsg,CWMSGELEM_WTP_MAC_TYPE,&wtpinfo->mac_type,sizeof(uint8_t));
cwmsg_addelem_wtp_radio_infos(&cwmsg,wtpinfo);
cwmsg_addelem_mtu_discovery_padding(&cwmsg,conn);
return conn_send_cwmsg(conn,&cwmsg);
}

View File

@ -1,51 +0,0 @@
#include <string.h>
#include "capwap.h"
#include "capwap_cisco.h"
#include "conn.h"
void cwsend_join_response(struct conn *conn, int seqnum, int rc, struct radioinfo *radioinfo,
struct ac_info *acinfo, struct wtpinfo *wtpinfo)
{
struct cwmsg *cwmsg = &conn->resp_msg;
cwmsg_init(cwmsg, conn->resp_buffer, CW_MSG_JOIN_RESPONSE, seqnum, NULL);
cwmsg->capwap_mode = conn->capwap_mode;
/* mandatory messagesg elements */
cwmsg_addelem_result_code(cwmsg, rc);
cwmsg_addelem_ac_descriptor(cwmsg, acinfo,wtpinfo);
cwmsg_addelem(cwmsg, CW_ELEM_AC_NAME, acinfo->ac_name, strlen((char *) acinfo->ac_name));
cwmsg_addelem(cwmsg, CWMSGELEM_ECN_SUPPORT, &acinfo->ecn_support, sizeof(uint8_t));
// cwmsg_addelem_ctrl_ip_addrs(cwmsg, acinfo);
// cwmsg_addelem_cw_local_ip_addr(cwmsg,conn);
/* */
// cwmsg_addelem_image_identifier(cwmsg,CW_VENDOR_ID_CISCO,(uint8_t*)"/tobias",strlen("/tobias"));
uint8_t buffer[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
buffer[0] = 0; /* Mwar Type */
buffer[1] = 1; /* h/w version */
buffer[2] = 2; /* h/w Release */
buffer[3] = 0; /* h/w Maint */
buffer[4] = 3; /* h/w Build */
buffer[5] = 5; /* s/w version */
buffer[6] = 0; /* s/w Release */
buffer[7] = 19; /* s/w Maint */
buffer[8] = 2; /* s/w Build */
*((uint16_t *) (buffer + 9)) = htons(13); /* Active MS */
*((uint16_t *) (buffer + 9 + 2)) = htons(23); /* Supported MS */
*((uint16_t *) (buffer + 9 + 4)) = htons(5); /* Active RAD's */
*((uint16_t *) (buffer + 9 + 6)) = htons(15); /* Supported RAD's */
// cwmsg_addelem_vendor_specific_payload(cwmsg,CW_VENDOR_ID_CISCO, CWVENDOR_CISCO_MWAR, buffer,34);
conn_send_response(conn, cwmsg, seqnum);
}