Added Delete Station Message Element into Station Configuration Message.

This commit is contained in:
vemax78
2014-04-15 22:26:31 +02:00
parent 21661277a0
commit fbd717b779
5 changed files with 67 additions and 5 deletions

View File

@ -720,7 +720,27 @@ uint32_t wtp_radio_add_station(struct capwap_parsed_packet* packet) {
/* */
uint32_t wtp_radio_delete_station(struct capwap_parsed_packet* packet) {
/* TODO */
struct wtp_radio* radio;
struct station_delete_params stationparams;
struct capwap_deletestation_element* deletestation;
/* Get message elements */
deletestation = (struct capwap_deletestation_element*)capwap_get_message_element_data(packet, CAPWAP_ELEMENT_DELETESTATION);
/* Get physical radio */
radio = wtp_radio_get_phy(deletestation->radioid);
if (!radio) {
return CAPWAP_RESULTCODE_FAILURE;
}
/* Authorize station */
memset(&stationparams, 0, sizeof(struct station_delete_params));
stationparams.address = deletestation->address;
if (wifi_station_delete(radio->devicehandle, &stationparams)) {
return CAPWAP_RESULTCODE_FAILURE;
}
return CAPWAP_RESULTCODE_SUCCESS;
}