NetTunnelWindows/NetTunnelSDK/include/user.h

54 lines
1.7 KiB
C
Raw Normal View History

#pragma once
#include "sccsdk.h"
#define HEART_PERIOD_MS (3000)
/**
*
* @brief
*/
typedef struct {
int isCurrent; ///< 网卡 MAC 地址
TCHAR CfgPath[260]; ///< 配置文件路径
} USER_CFGFILE, *PUSER_CFGFILE;
#ifdef __cplusplus // If used by C++ code,
extern "C" {
// we need to export the C interface
#endif
/**
* @brief
* @param pUserSvrUrl URL
*/
void ConnectServerControlService(const TCHAR *pUserSvrUrl);
/**
* @brief WireGuard
* @param[in] pCliPrivateKey
* @param[in] pSvrPublicKey
* @param[in] pSvrNetwork 访
* @param[in] pCliNetwork
* @param[in] pSvrTunnelAddr
* @param[in] pSvrEndPoint
* @return 0 @see USER_ERRNO
* - -ERR_INPUT_PARAMS
* - -ERR_SYSTEM_UNINITIALIZE
* - -ERR_MALLOC_MEMORY
* - -ERR_OPEN_FILE
* - -ERR_MEMORY_STR
* - -ERR_UN_SUPPORT
* - -ERR_MALLOC_MEMORY
* - ERR_SUCCESS
*/
int SetTunnelConfigure(const TCHAR *pCliPrivateKey,
const TCHAR *pSvrPublicKey,
const TCHAR *pSvrNetwork,
const TCHAR *pCliNetwork,
const TCHAR *pSvrTunnelAddr,
const TCHAR *pSvrEndPoint);
int GetUserConfigFiles(const TCHAR *pUserName, PUSER_CFGFILE* pCfgFile, int *pItems);
#ifdef __cplusplus
}
#endif