NetTunnelWindows/NetTunnelSDK/tunnel.h

46 lines
1.0 KiB
C
Raw Normal View History

2023-06-15 01:35:37 +00:00
#pragma once
#include <Windows.h>
#ifdef NETTUNNELSDK_EXPORTS
#define NETTUNNELSDK_API __declspec(dllexport)
#else
#define NETTUNNELSDK_API __declspec(dllimport)
#endif
using PROTO_CRYPTO_TYPE = enum
{
CRYPTO_NONE = 0,
CRYPTO_BASE64 = 1,
CRYPTO_AES128 = 2,
CRYPTO_3DES = 3,
CRYPTO_AES256 = 4,
CRYPTO_MAX,
};
typedef enum
{
LOG_DEBUG = 0,
LOG_INFO = 1,
LOG_WARN = 2,
LOG_ERROR = 3,
LOG_MAX
} LOG_LEVEL;
#ifdef __cplusplus // If used by C++ code,
extern "C" {
// we need to export the C interface
#endif
NETTUNNELSDK_API int __cdecl CreateTunnel(LPCSTR lpszMsg);
2023-06-15 06:16:52 +00:00
NETTUNNELSDK_API const char* __cdecl TestMessage();
2023-06-15 01:35:37 +00:00
NETTUNNELSDK_API int __cdecl Add(int a, int b);
NETTUNNELSDK_API int __cdecl TunnelSDKInitEnv();
NETTUNNELSDK_API int __cdecl SetProtocolEncryptType(PROTO_CRYPTO_TYPE type, const char* pProKey);
NETTUNNELSDK_API void __cdecl InitTunnelSDKLog(const char* pLogFile, LOG_LEVEL level);
2023-06-15 06:16:52 +00:00
NETTUNNELSDK_API void __cdecl TunnelLogEnable(bool enLog);
2023-06-15 01:35:37 +00:00
#ifdef __cplusplus
}
#endif