NetTunnelWindows/NetTunnelSDK/sdk/sccsdk.h

267 lines
8.6 KiB
C
Raw Normal View History

#pragma once
#include <Windows.h>
#include "common.h"
#include "usrerr.h"
#ifdef NETTUNNELSDK_EXPORTS
#define SCCSDK_API __declspec(dllexport)
#else
#define SCCSDK_API __declspec(dllimport)
#endif
typedef void (*PTUNNEL_HEART_ROUTINE)(const CHAR *pMessage, unsigned int timeStampOfSeconds);
typedef PTUNNEL_HEART_ROUTINE LPTUNNEL_HEART_ROUTINE;
/**
*
* @brief <EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
*/
typedef struct {
int InterfaceIndex; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CHAR NetCardUUID[260]; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD> Windows<77><73>ʶΪ UUID
CHAR NetCardName[MAX_NETCARD_NAME]; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CHAR NetCardDescription[132]; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CHAR NetCardIpaddr[MAX_IP_LEN]; ///< <20><><EFBFBD><EFBFBD> IP <20><>ַ
CHAR NetCardNetmask[MAX_IP_LEN]; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CHAR NetCardGateway[MAX_IP_LEN]; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CHAR NetCardMacAddr[20]; ///< <20><><EFBFBD><EFBFBD> MAC <20><>ַ
} NIC_CONTENT, *PNIC_CONTENT;
#ifdef __cplusplus // If used by C++ code,
extern "C" {
// we need to export the C interface
#endif
/**
* @brief <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD> SDK <EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><EFBFBD><EFBFBD>
* @param[in] pWorkDir <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD>ȡ
* @param[in] pSvrUrl <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ̨ URL <EFBFBD><EFBFBD>ַ example: http://localhost:2313, https://localhost:2313
* @param[in] pLogFile <EFBFBD><EFBFBD>־<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>
* @param[in] level <EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD>ȼ<EFBFBD>
* @param[in] isWorkServer SDK <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ
* - TRUE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - FALSE <EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD>
* @return <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD> 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_ITEM_EXISTS δ<EFBFBD>ҵ<EFBFBD> WireGuard <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_SYS_CALL <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD>Ŀ¼ʧ<EFBFBD><EFBFBD>
* - -ERR_CREATE_FILE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>Ŀ¼ʧ<EFBFBD><EFBFBD>
* - -ERR_ITEM_UNEXISTS WireGuard δ<EFBFBD><EFBFBD>װ
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl TunnelSDKInitEnv(const CHAR *pWorkDir,
const CHAR *pSvrUrl,
const CHAR *pLogFile,
LOG_LEVEL level,
bool isWorkServer);
/**
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD> SDK <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
*/
SCCSDK_API void __cdecl TunnelSDKUnInit();
/**
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD>ر<EFBFBD> SDK <EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param enLog <EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - TRUE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־
* - FALSE <EFBFBD>ر<EFBFBD><EFBFBD><EFBFBD>־
*/
SCCSDK_API void __cdecl TunnelLogEnable(bool enLog);
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰ WireGuard <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param pTunnelName <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param pIsRunning pIsRunning WireGuard <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
* - TRUE <EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD>װ
* - FALSE δ<EFBFBD><EFBFBD>װ
* @return <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD> 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_OPEN_SCM <EFBFBD>򿪷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl GetWireGuardServiceStatus(const CHAR *pTunnelName, bool *pIsRunning);
/**
* @brief <EFBFBD>жϵ<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ <EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param[out] pIsWorkServer <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ
* - TRUE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - FALSE <EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD>
* @return <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD> 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl GetWireGuardWorkMode(bool *pIsWorkServer);
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰ WireGuard <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param[in] pIfName WireGuard <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param[out] pIsRunning WireGuard <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
* - TRUE <EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD>װ
* - FALSE δ<EFBFBD><EFBFBD>װ
* @return 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_MALLOC_MEMORY <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>ʧ<EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl IsWireGuardServerRunning(const CHAR *pIfName, bool *pIsRunning);
/**
* @brief SCG <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>񿪹<EFBFBD>
* @param isEnable TRUE: <EFBFBD><EFBFBD><EFBFBD><EFBFBD> SCG <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, FALSE: <EFBFBD><EFBFBD><EFBFBD><EFBFBD> SCG <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param pSCGIpAddr SCG <EFBFBD><EFBFBD><EFBFBD><EFBFBD> IP
* @param scgPort SCG <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD>
* @return 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl EnableSCGProxy(bool isEnable, const CHAR *pSCGIpAddr, int scgPort);
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰ SCG <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
* @return TRUE: SCG <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, FALSE: SCG <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
SCCSDK_API bool __cdecl UsedSCGProxy();
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ
* @return <EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ @see NET_SHARE_MODE
*/
SCCSDK_API NET_SHARE_MODE __cdecl GetCurrentNetShareMode();
/**
* @brief <EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>ȡ<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ
* @param shareMode <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ @see NET_SHARE_MODE
*/
SCCSDK_API void __cdecl SetCurrentNetShareMode(NET_SHARE_MODE shareMode);
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* @param[out] pInfo <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ @see NIC_CONTENT
* @param[out] pItemCounts <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ 32
* @return <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD> 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_MALLOC_MEMORY <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>ʧ<EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl GetAllNICInfo(PNIC_CONTENT *pInfo, int *pItemCounts);
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰ Internet <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param[out] pIfIndex <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD> 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_ITEM_UNEXISTS δ<EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Internet <EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl GetInternetIfIndex(int *pIfIndex);
/**
* @brief <EFBFBD>Ƶ<EFBFBD><EFBFBD>Է<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD>
* @param pSvr <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* @return 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_CREATE_THREAD <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD>ʧ<EFBFBD><EFBFBD>
* - -ERR_SOCKET_BIND_PORT <EFBFBD>󶨶˿<EFBFBD>ʧ<EFBFBD><EFBFBD>
* - -ERR_ITEM_EXISTS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD>״̬<EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl CreateControlService(PUSER_SERVER_CONFIG pSvr);
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* @param[in] pUserName <EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>
* @param[in] pToken <EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param[out] pSvrCfg <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* @return 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_MEMORY_STR <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_CREATE_FILE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼ʧ<EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl GetUserServerConfigure(const CHAR *pUserName,
const CHAR *pToken,
PUSER_SERVER_CONFIG *pSvrCfg);
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD>û<EFBFBD><EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* @param[in] pUserName <EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>
* @param[in] pToken <EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param[out] pCliCfg <EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* @return 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_MEMORY_STR <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_CREATE_FILE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼ʧ<EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl GetUserClientConfigure(const CHAR *pUserName,
const CHAR *pToken,
PUSER_CLIENT_CONFIG *pCliCfg);
/**
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD>̿<EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param[in] vmId <EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param[in] pCliNetwork <EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
* @return <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_SYSTEM_UNINITIALIZE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>
* - -ERR_MALLOC_MEMORY <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>ʧ<EFBFBD><EFBFBD>
* - -ERR_OPEN_FILE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>ʧ<EFBFBD><EFBFBD>
* - -ERR_MEMORY_STR <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>
* - -ERR_UN_SUPPORT <EFBFBD><EFBFBD>֧<EFBFBD>ֵĸ<EFBFBD>ʽת<EFBFBD><EFBFBD>
* - -ERR_JSON_CREATE <EFBFBD><EFBFBD><EFBFBD><EFBFBD> JSON <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>
* - -ERR_HTTP_POST_DATA <EFBFBD><EFBFBD><EFBFBD><EFBFBD> POST <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>
* - -ERR_HTTP_SERVER_RSP <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD>200<EFBFBD><EFBFBD>
* - -ERR_READ_FILE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD><EFBFBD>ؿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_JSON_DECODE <EFBFBD><EFBFBD><EFBFBD><EFBFBD> JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl RemoteCtrlSvrCfgUserTunnel(int vmId, const CHAR *pCliNetwork);
/**
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/ֹͣԶ<EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> WireGuard <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param[in] isStart <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/ֹͣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> TRUE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, FALSE ֹͣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_SYSTEM_UNINITIALIZE δ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>Զ<EFBFBD>̷<EFBFBD><EFBFBD><EFBFBD> URL <EFBFBD><EFBFBD>ַ
* - -ERR_CREATE_FILE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼ʧ<EFBFBD><EFBFBD>
* - -ERR_HTTP_POST_DATA POST <EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>
* - -ERR_HTTP_SERVER_RSP HTTP <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><EFBFBD><EFBFBD>
* - -ERR_READ_FILE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
* - -ERR_JSON_DECODE JSON <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl RemoteWireGuardControl(bool isStart);
/**
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/ֹͣ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> WireGuard <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param[in] isStart <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/ֹͣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> TRUE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, FALSE ֹͣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param[in] setPrivateMode <EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽΪ ר<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ(Private)
* @return 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_NET_CATEGORY_MODE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_UN_SUPPORT <EFBFBD><EFBFBD>֧<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl LocalWireGuardControl(bool isStart, bool setPrivateMode);
/**
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/ֹͣ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param isStart <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/ֹͣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> TRUE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, FALSE ֹͣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param lpHeartCbAddress <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> @see PTUNNEL_HEART_ROUTINE
* @return 0: <EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD> С<EFBFBD><EFBFBD>0 ʧ<EFBFBD><EFBFBD> @see USER_ERRNO
* - -ERR_INPUT_PARAMS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* - -ERR_CREATE_TIMER <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>
* - -ERR_DELETE_TIMER ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>
* - ERR_SUCCESS <EFBFBD>ɹ<EFBFBD>
*/
SCCSDK_API int __cdecl RemoteHeartControl(bool isStart, LPTUNNEL_HEART_ROUTINE lpHeartCbAddress);
/**
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param err <EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return <EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>, "UNKNOWN": δ֪<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
SCCSDK_API const CHAR* __cdecl GetSDKErrorMessage(USER_ERRNO err);
#ifdef __cplusplus
}
#endif