blob: e986ebc14151cebd9a73623ae1c84a8f6d85cb2d [file] [log] [blame]
hj.shaofe9d0022025-06-11 20:22:48 -07001/**
2* @file : gsw_sys_interface.h
hong.liud2417072025-06-27 07:10:37 -07003* @brief : system service ctrl
4* @date : 2022-07-05
5* @author : Wind
6* @version : v1.0
7* @copyright Copyright(C) 2022,Geely
hj.shaofe9d0022025-06-11 20:22:48 -07008*/
hong.liud2417072025-06-27 07:10:37 -07009#ifndef __GSW_SYS_INTERFACE_H__
10#define __GSW_SYS_INTERFACE_H__
hj.shaofe9d0022025-06-11 20:22:48 -070011
hong.liud2417072025-06-27 07:10:37 -070012#include <stdint.h>
hj.shaofe9d0022025-06-11 20:22:48 -070013#include "gsw_hal_errcode.h"
14
hj.shaofe9d0022025-06-11 20:22:48 -070015/**
hong.liud2417072025-06-27 07:10:37 -070016 * @brief start or restart ftp server
17 * @param [in] cfg the ftp server config file
18 * @retval 0: success
19 * @retval other: fail
20 */
hj.shaofe9d0022025-06-11 20:22:48 -070021int gsw_sys_svr_ftp_start(const char *cfg);
22
23/**
hong.liud2417072025-06-27 07:10:37 -070024 * @brief stop ftp server
25 * @retval 0: success
26 * @retval other: fail
27 */
hj.shaofe9d0022025-06-11 20:22:48 -070028int gsw_sys_svr_ftp_stop(void);
29
30/**
hong.liud2417072025-06-27 07:10:37 -070031 * @brief start or restart ssh server
32 * @param [in] cfg the ssh server config file
33 * @retval 0: success
34 * @retval other: fail
35 */
hj.shaofe9d0022025-06-11 20:22:48 -070036int gsw_sys_svr_ssh_start(const char *cfg);
37
38/**
hong.liud2417072025-06-27 07:10:37 -070039 * @brief stop ssh server
40 * @retval 0: success
41 * @retval other: fail
42 */
hj.shaofe9d0022025-06-11 20:22:48 -070043int gsw_sys_svr_ssh_stop(void);
44
45/**
hong.liud2417072025-06-27 07:10:37 -070046 * @brief restart syslog server
47 * @param [in] log_lvl, range [emerg alert crit err warning notice info debug]
48 * @retval 0: success
49 * @retval other: fail
50 */
hj.shaofe9d0022025-06-11 20:22:48 -070051int gsw_sys_svr_syslog_restart(const char *log_lvl);
52
hong.liud2417072025-06-27 07:10:37 -070053#endif // __GSW_SYS_INTERFACE_H__