From e963edb4ce6b6b0ec36ed4879472138c05d0603a Mon Sep 17 00:00:00 2001
From: "7u83@mail.ru" <7u83@mail.ru@noemail.net>
Date: Sat, 18 Apr 2015 09:20:13 +0000
Subject: [PATCH] Removed
FossilOrigin-Name: 00c99b3aac8c7b9fdd8b77551198dcba71d03fa19b17b6e8d9ba325e1f932c69
---
src/capwap/cwsend_join_request.c | 154 ----------------------------
src/capwap/cwsend_unknow_response.c | 24 -----
2 files changed, 178 deletions(-)
delete mode 100644 src/capwap/cwsend_join_request.c
delete mode 100644 src/capwap/cwsend_unknow_response.c
diff --git a/src/capwap/cwsend_join_request.c b/src/capwap/cwsend_join_request.c
deleted file mode 100644
index d8f8a9a8..00000000
--- a/src/capwap/cwsend_join_request.c
+++ /dev/null
@@ -1,154 +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 .
-
-*/
-
-#include
-
-#include "capwap.h"
-#include "capwap_cisco.h"
-
-#include "lwapp_cisco.h"
-
-#include "conn.h"
-#include "cwmsg.h"
-
-#include "sock.h"
-
-#include "acinfo.h" //Tube
-
-extern int pmu;
-
-int cwsend_join_request(struct conn *conn, struct radioinfo *radioinfo, struct wtpinfo *wtpinfo)
-{
- uint8_t buffer[CWMSG_MAX_SIZE];
- struct cwmsg cwmsg;
-
-
-
- //radioinfo->rmac=0;
-
- cwmsg_init(&cwmsg, buffer, CW_MSG_JOIN_REQUEST, conn_get_next_seqnum(conn), radioinfo);
- cwmsg.capwap_mode = conn->capwap_mode;
-
-// printf("Rad info rmac %s\n",sock_hwaddr2str(bstr_data(radioinfo->rmac),bstr_len(radioinfo->rmac)));
-
- /* Mandatory elements */
-
- /* location data */
- cwmsg_addelem(&cwmsg, CWMSGELEM_LOCATION_DATA, wtpinfo->location,
- strlen((char *) wtpinfo->location));
-
- /* wtp board data */
- cwmsg_addelem_wtp_board_data(&cwmsg, wtpinfo);
-
- /* wtp descriptor */
- cwmsg_addelem_wtp_descriptor(&cwmsg, wtpinfo);
-
- /* wtp name */
- cwmsg_addelem(&cwmsg, CW_ELEM_WTP_NAME, wtpinfo->name, strlen((char *) wtpinfo->name));
-
- /* session id */
- cwmsg_addelem_session_id(&cwmsg, wtpinfo->session_id);
-
- /* frame tunnel mode */
- cwmsg_addelem(&cwmsg, CW_ELEM_WTP_FRAME_TUNNEL_MODE, &wtpinfo->frame_tunnel_mode,
- sizeof(uint8_t));
-
- /* WTP MAC type */
- cwmsg_addelem(&cwmsg, CW_ELEM_WTP_MAC_TYPE, &wtpinfo->mac_type, sizeof(uint8_t));
-
-
- /* local ip address */
- cwmsg_addelem_cw_local_ip_addr(&cwmsg, conn);
-
- /* maximum message length */
- uint16_t l = htons(wtpinfo->max_msg_len);
- cwmsg_addelem(&cwmsg, CWMSGELEM_MAXIMUM_MESSAGE_LENGTH, (uint8_t *) & l, sizeof(l));
-
-
-
-
- switch (conn->capwap_mode) {
- case CWMODE_CISCO:
- cwmsg_addelem_vendor_cisco_mwar_addr(&cwmsg,conn);
-
- uint8_t data207[4] = {1,1,0,1};
-
- cwmsg_addelem_vendor_specific_payload(&cwmsg,CW_VENDOR_ID_CISCO,
- CW_CISCO_BOARD_DATA_OPTIONS,data207,4);
-
-
-
-// cwmsg_ae(cw_addelem_vendor_specific_payload(&cwmsg,CW_VENDOR_ID_CISCO,
- // CWVENDOR_CISCO_BOARD_DATA_OPTIONS,data207,4);
-
-/* cwmsg_addelem_vendor_specific_payload(&cwmsg,CW_VENDOR_ID_CISCO,
- CWVENDOR_CISCO_AP_GROUP_NAME,(uint8_t*)"Tobias",strlen("Tobias"));
-*/
-
-
- cwmsg_addelem_vendor_specific_payload(&cwmsg, CW_VENDOR_ID_CISCO,
- CW_CISCO_AP_GROUP_NAME,(uint8_t *)"default-group",strlen("default-group"));
-
-
- break;
- default:
- /* ECN support */
- cwmsg_addelem(&cwmsg, CWMSGELEM_ECN_SUPPORT, &wtpinfo->ecn_support,
- sizeof(uint8_t));
- }
-
- /* WTP radio information elements */
- cwmsg_addelem_wtp_radio_infos(&cwmsg, wtpinfo->radioinfo);
-
-
- /* Non-mandatory elements */
-
- switch (conn->capwap_mode) {
- case CWMODE_CISCO:
- {
- uint8_t mtu[2048];
- if(pmu) {
- int l = lw_put_cisco_path_mtu(mtu,1485,11);
- }
-
- //cwmsg_addelem_cisco_certificate(&cwmsg,mtu,10);
-
- // printf("Len = %d\n",l);
-
- // cwmsg_addelem_vendor_specific_payload(&cwmsg,LW_VENDOR_CISCO,
- // LW_ELEM_VENDOR_SPECIFIC,mtu,l);
-
-
- // (&cwmsg)->pos+=4;
-printf("Adding mwar\n");
- extern struct ac_info wtp_acinfo;
- // cwmsg_addelem_cisco_mwar(&cwmsg,&wtp_acinfo);
-
-// memset(&acinfo,0,sizeof(struct ac_info));
-// cwmsg_addelem_ac_descriptor(&cwmsg,&wtp_acinfo,wtpinfo);
-
- }
-
-
-
- }
-
-
- printf("MTU %d\n",conn->mtu);
- return conn_send_cwmsg(conn, &cwmsg);
-}
diff --git a/src/capwap/cwsend_unknow_response.c b/src/capwap/cwsend_unknow_response.c
deleted file mode 100644
index 831e6789..00000000
--- a/src/capwap/cwsend_unknow_response.c
+++ /dev/null
@@ -1,24 +0,0 @@
-
-/**
- * @file
- * @brief Hndlr for unknown request messages
- */
-
-#include "capwap.h"
-#include "conn.h"
-
-/**
- * Send response to a unknown or missplaced request message
- * @param conn connection object
- * @param seqnum sequence number of unknown request message
- * @param unknown_request the unknownrequest received
- */
-void cwsend_unknown_response(struct conn * conn,int seqnum, int unknown_request)
-{
-
- struct cwmsg * cwmsg = &conn->resp_msg;
- cwmsg_init(cwmsg,conn->resp_buffer,unknown_request+1,seqnum,NULL);
- cwmsg_addelem_result_code(cwmsg,19);
- conn_send_response(conn,cwmsg,seqnum);
-}
-