-
Notifications
You must be signed in to change notification settings - Fork 24
/
Command.cc
42 lines (36 loc) · 867 Bytes
/
Command.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Copyright (C) 2017 Rahul Jadhav <[email protected]>
*
* This file is subject to the terms and conditions of the GNU
* General Public License v2. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup airline
* @{
*
* @file
* @brief OAM/Monitor command handler for Airline
*
* @author Rahul Jadhav <[email protected]>
*
* @}
*/
#define _COMMAND_CC_
#include "Command.h"
#include "mac_stats.h"
int cmd_mac_stats(uint16_t nodeid, char *buf, int buflen)
{
return wf::Macstats::get_summary(nodeid, buf, buflen);
}
void al_handle_cmd(msg_buf_t *mbuf)
{
if(0) { }
HANDLE_CMD(mbuf, cmd_mac_stats)
else {
char tmpbuf[256];
snprintf(tmpbuf, sizeof(tmpbuf), "%s", mbuf->buf);
mbuf->len = snprintf((char*)mbuf->buf, mbuf->max_len,
"AL_INVALID_CMD(%s)", tmpbuf);
}
}