Inital commit.
FossilOrigin-Name: 9bd95d5f71fe913decda9950ede7fdf4c4b6ffe85f09e9ff1cfe814cba838807
This commit is contained in:
parent
4c95cf2751
commit
d938a2383c
40
src/capwap/cw_readelem_wtp_reboot_statistics.c
Normal file
40
src/capwap/cw_readelem_wtp_reboot_statistics.c
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
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 "wtpinfo.h"
|
||||
|
||||
|
||||
int cw_readelem_wtp_reboot_statistics(struct wtp_reboot_statistics *s, int type,uint8_t *msgelem, int len)
|
||||
{
|
||||
if (type != CWMSGELEM_WTP_REBOOT_STATISTICS)
|
||||
return 0;
|
||||
|
||||
s->reboot_count=ntohs(*((uint16_t*)(msgelem+0)));
|
||||
s->ac_initiated_count=ntohs(*((uint16_t*)(msgelem+2)));
|
||||
s->link_failure_count=ntohs(*((uint16_t*)(msgelem+4)));
|
||||
s->sw_failure_count=ntohs(*((uint16_t*)(msgelem+6)));
|
||||
s->hw_failure_count=ntohs(*((uint16_t*)(msgelem+8)));
|
||||
s->other_failure_count=ntohs(*((uint16_t*)(msgelem+10)));
|
||||
s->unknown_failure_count=ntohs(*((uint16_t*)(msgelem+12)));
|
||||
s->last_failure_type=*(msgelem+14);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user