From 29ecd74a120f5d0c538c1e8594f28f3421db0836 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Sat, 28 Mar 2015 17:31:16 +0000 Subject: [PATCH] Inital commit. FossilOrigin-Name: 575be4bc9e38e61873a38c925a44985ec2700ca4d995f4561d5f05d1ff0e2905 --- src/capwap/cw_cisco_id_to_str.c | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/capwap/cw_cisco_id_to_str.c diff --git a/src/capwap/cw_cisco_id_to_str.c b/src/capwap/cw_cisco_id_to_str.c new file mode 100644 index 00000000..32ea302f --- /dev/null +++ b/src/capwap/cw_cisco_id_to_str.c @@ -0,0 +1,61 @@ +/* + 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 . + +*/ + + +/** + * @file + * @brief Implements cw_cisco_id_to_str + */ + +#include "capwap_cisco.h" + +/** + * Get a text representation of a Cisco vendor specific message element + * @param elem_id vendor specific message element + * @return pointer printable string + */ +const char * cw_cisco_id_to_str(int elem_id) +{ + switch (elem_id) { + case CW_CISCO_AP_GROUP_NAME: + return "AP Group Name"; + + case CW_CISCO_RAD_NAME: + return "RAD Name"; + + case CW_CISCO_AP_TIMESYNC: + return "AP Timesync"; + + case CW_CISCO_MWAR_TYPE: + return "MWAR Type"; + + case CW_CISCO_SPAM_VENDOR_SPECIFIC: + return "LWAPP Vendor Specific"; + case CW_CISCO_STATION_CFG: + return "Station CFG"; + case CW_CISCO_AP_REGULATORY_DOMAIN: + return "AP Regulatory Domain"; + case CW_CISCO_WTP_BOARD_DATA: + return "WTP Board Data"; + + default: + return "Unknown"; + + } +} +