2014-07-27 00:59:44 +02:00
|
|
|
/*
|
|
|
|
This file is part of libcapwap.
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-07-27 00:59:44 +02:00
|
|
|
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.
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-07-27 00:59:44 +02:00
|
|
|
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.
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-07-27 00:59:44 +02:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-07-27 00:59:44 +02:00
|
|
|
*/
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
|
2014-07-27 00:59:44 +02:00
|
|
|
#include "capwap.h"
|
2015-03-19 21:51:28 +01:00
|
|
|
#include "capwap_80211.h"
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-07-27 00:59:44 +02:00
|
|
|
|
|
|
|
const char * cw_msgelemtostr(int elem)
|
2014-07-11 22:12:11 +02:00
|
|
|
{
|
2014-07-27 00:59:44 +02:00
|
|
|
switch (elem){
|
2015-03-23 07:48:27 +01:00
|
|
|
case CW_ELEM_AC_DESCRIPTOR:
|
2015-03-28 12:51:34 +01:00
|
|
|
return "AC Descriptor";
|
|
|
|
case CW_ELEM_AC_IPV4_LIST:
|
|
|
|
return "AC IPv4 List";
|
|
|
|
case CW_ELEM_AC_IPV6_LIST:
|
|
|
|
return "AC IPv6 List";
|
2015-03-23 07:48:27 +01:00
|
|
|
case CW_ELEM_AC_NAME:
|
2015-03-28 12:51:34 +01:00
|
|
|
return "AC Name";
|
2014-07-27 00:59:44 +02:00
|
|
|
/*
|
|
|
|
AC Name with Priority 5
|
|
|
|
AC Timestamp 6
|
|
|
|
Add MAC ACL Entry 7
|
|
|
|
Add Station 8
|
|
|
|
Reserved 9
|
|
|
|
*/
|
|
|
|
case CWMSGELEM_CONTROL_IPV4_ADDRESS:
|
2015-03-23 07:48:27 +01:00
|
|
|
return "Ctrl IPv4 addr";
|
2014-07-27 00:59:44 +02:00
|
|
|
case CWMSGELEM_CONTROL_IPV6_ADDRESS:
|
2015-03-23 07:48:27 +01:00
|
|
|
return "ctrl IPv6 addr";
|
2014-07-27 00:59:44 +02:00
|
|
|
|
|
|
|
case CWMSGELEM_CAPWAP_LOCAL_IPV4_ADDRESS:
|
2015-03-23 07:48:27 +01:00
|
|
|
return "CAPWAP local IPv4 addr";
|
2014-07-27 00:59:44 +02:00
|
|
|
case CWMSGELEM_CAPWAP_LOCAL_IPV6_ADDRESS:
|
2015-03-23 07:48:27 +01:00
|
|
|
return "CAPWAP local IPv6 addr";
|
2015-03-28 12:51:34 +01:00
|
|
|
|
|
|
|
case CW_ELEM_CAPWAP_TIMERS:
|
|
|
|
return "CAWPAP Timers";
|
|
|
|
/* CAPWAP Transport Protocol 51
|
2014-07-27 00:59:44 +02:00
|
|
|
Data Transfer Data 13
|
|
|
|
Data Transfer Mode 14
|
|
|
|
Decryption Error Report 15
|
2015-03-28 12:51:34 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
case CW_ELEM_DECRYPTION_ERROR_REPORT_PERIOD:
|
|
|
|
return "Decryption Error Report Period";
|
|
|
|
/*
|
2014-07-27 00:59:44 +02:00
|
|
|
Decryption Error Report Period 16
|
|
|
|
Delete MAC ACL Entry 17
|
|
|
|
Delete Station 18
|
|
|
|
Reserved 19
|
|
|
|
*/
|
|
|
|
case CWMSGELEM_DISCOVERY_TYPE:
|
|
|
|
return "discovery type";
|
|
|
|
/*
|
|
|
|
Duplicate IPv4 Address 21
|
|
|
|
Duplicate IPv6 Address 22
|
|
|
|
*/
|
|
|
|
case CWMSGELEM_ECN_SUPPORT:
|
2015-03-23 07:48:27 +01:00
|
|
|
return "ECN support";
|
2015-03-28 12:51:34 +01:00
|
|
|
|
|
|
|
case CW_ELEM_IDLE_TIMEOUT:
|
|
|
|
return "Idle Timeout";
|
|
|
|
|
2014-08-17 11:39:43 +02:00
|
|
|
case CWMSGELEM_IMAGE_DATA:
|
|
|
|
return "image data";
|
|
|
|
|
2014-08-16 19:31:08 +02:00
|
|
|
case CWMSGELEM_IMAGE_IDENTIFIER:
|
|
|
|
return "image identifier";
|
|
|
|
|
|
|
|
|
|
|
|
/* Image Information 26
|
2014-07-27 00:59:44 +02:00
|
|
|
Initiate Download 27
|
|
|
|
*/
|
|
|
|
case CWMSGELEM_LOCATION_DATA:
|
|
|
|
return "location data";
|
|
|
|
|
|
|
|
case CWMSGELEM_MAXIMUM_MESSAGE_LENGTH:
|
|
|
|
return "max msg len";
|
|
|
|
case CWMSGELEM_MTU_DISCOVERY_PADDING:
|
|
|
|
return "mtu discovery padding";
|
|
|
|
|
2014-08-14 21:18:07 +02:00
|
|
|
case CWMSGELEM_RADIO_ADMINISTRATIVE_STATE:
|
|
|
|
return "radio administrative state";
|
|
|
|
|
2014-08-21 21:17:22 +02:00
|
|
|
case CWMSGELEM_RADIO_OPERATIONAL_STATE:
|
2015-03-28 12:51:34 +01:00
|
|
|
return "Radio Operational State";
|
2014-08-21 21:17:22 +02:00
|
|
|
|
2014-08-14 21:18:07 +02:00
|
|
|
/* Radio Operational State 32
|
2014-07-27 00:59:44 +02:00
|
|
|
*/
|
|
|
|
case CWMSGELEM_RESULT_CODE:
|
2015-03-28 12:51:34 +01:00
|
|
|
return "Result Code";
|
2014-07-27 00:59:44 +02:00
|
|
|
|
|
|
|
/* Returned Message Element 34
|
|
|
|
*/
|
2015-03-23 07:48:27 +01:00
|
|
|
case CW_ELEM_SESSION_ID:
|
2015-03-28 12:51:34 +01:00
|
|
|
return "Session ID";
|
2014-08-14 21:18:07 +02:00
|
|
|
|
|
|
|
case CWMSGELEM_STATISTICS_TIMER:
|
2015-03-23 07:48:27 +01:00
|
|
|
return "Statistics Timer";
|
2014-08-14 21:18:07 +02:00
|
|
|
|
2015-03-23 07:48:27 +01:00
|
|
|
case CW_ELEM_VENDOR_SPECIFIC_PAYLOAD:
|
|
|
|
return "Vendor Specific Payload";
|
2014-07-27 00:59:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
case CWMSGELEM_WTP_BOARD_DATA:
|
2015-03-23 07:48:27 +01:00
|
|
|
return "WTP Board Data";
|
2014-07-27 00:59:44 +02:00
|
|
|
|
|
|
|
case CWMSGELEM_WTP_DESCRIPTOR:
|
|
|
|
return "wtp descriptor";
|
2015-03-28 12:51:34 +01:00
|
|
|
|
|
|
|
case CW_ELEM_WTP_FALLBACK:
|
|
|
|
return "WTP Fallback";
|
2014-07-27 00:59:44 +02:00
|
|
|
case CWMSGELEM_WTP_FRAME_TUNNEL_MODE:
|
2015-03-28 12:51:34 +01:00
|
|
|
return "Frame Tunnel Mode";
|
2014-07-27 00:59:44 +02:00
|
|
|
|
2015-03-12 23:21:57 +01:00
|
|
|
/* case CWMSGELEM_RESERVED_1:
|
2014-08-13 10:30:27 +02:00
|
|
|
return "reserved (42)";
|
2015-03-12 23:21:57 +01:00
|
|
|
*/
|
2015-03-23 07:48:27 +01:00
|
|
|
case CW_ELEM_WTP_IPV4_IP_ADDRESS:
|
|
|
|
return "WTP IPv4 IP Address";
|
2015-03-12 23:21:57 +01:00
|
|
|
|
2014-07-27 00:59:44 +02:00
|
|
|
/*
|
|
|
|
Reserved 43
|
|
|
|
*/
|
|
|
|
case CWMSGELEM_WTP_MAC_TYPE:
|
|
|
|
return "mac type";
|
|
|
|
|
|
|
|
case CWMSGELEM_WTP_NAME:
|
|
|
|
return "wtp name";
|
|
|
|
/*
|
|
|
|
Unused/Reserved 46
|
|
|
|
WTP Radio Statistics 47
|
2014-08-14 21:18:07 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
case CWMSGELEM_WTP_REBOOT_STATISTICS:
|
|
|
|
return "wtp reboot statistics";
|
|
|
|
|
|
|
|
/* WTP Static IP Address Information 49
|
2014-07-27 00:59:44 +02:00
|
|
|
*/
|
2014-08-10 21:33:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-19 21:51:28 +01:00
|
|
|
case CWMSGELEM_80211_WTP_RADIO_INFO:
|
2014-08-10 21:33:29 +02:00
|
|
|
return "802.11: wtp radio info";
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-06 00:39:21 +01:00
|
|
|
case XCWMSGELEM_CAPWAP_LOCAL_IP_ADDRESS:
|
|
|
|
return "local ip v4/v6 address";
|
|
|
|
|
|
|
|
case XCWMSGELEM_CAPWAP_RADIO_INFO:
|
|
|
|
return "radio info";
|
2014-08-10 21:33:29 +02:00
|
|
|
|
|
|
|
|
2014-07-27 00:59:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return "unknown";
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
}
|