summaryrefslogtreecommitdiff
path: root/src/vf/command_proc.h
blob: 04296de6889684100dfbdb3bcb410322da82f6a1 (plain)
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
#ifndef _COMMAND_PROC_H_
#define _COMMAND_PROC_H_

/**
 * @file
 * SPP Command processing
 *
 * Receive and process the command message, then send back the
 * result JSON formatted data.
 */

/**
 * initialize command processor.
 *
 * @param controller_ip
 *  The controller's ip address.
 * @param controller_port
 *  The controller's port number.
 *
 * @retval 0  succeeded.
 * @retval -1 failed.
 */
int
spp_command_proc_init(const char *controller_ip, int controller_port);

/**
 * process command from controller.
 *
 * @retval 0  succeeded.
 * @retval -1 process termination is required.
 *            (occurred connection failure, or received exit command)
 */
int
spp_command_proc_do(void);

#endif /* _COMMAND_PROC_H_ */