OpenVPN 3 Core Library
Loading...
Searching...
No Matches
platform_name.hpp
Go to the documentation of this file.
1// OpenVPN -- An application to securely tunnel IP networks
2// over a single port, with support for SSL/TLS-based
3// session authentication and key exchange,
4// packet encryption, packet authentication, and
5// packet compression.
6//
7// Copyright (C) 2012- OpenVPN Inc.
8//
9// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10//
11
12#ifndef OPENVPN_COMMON_PLATFORM_NAME_H
13#define OPENVPN_COMMON_PLATFORM_NAME_H
14
17
18namespace openvpn {
19
20// return a string that describes our platform
21inline const char *platform_name()
22{
23#if defined(OPENVPN_PLATFORM_WIN)
24#if defined(OPENVPN_PLATFORM_UWP)
25 return "uwp";
26#else
27 return "win";
28#endif // UWP
29#elif defined(OPENVPN_PLATFORM_MAC)
30 return "mac";
31#elif defined(OPENVPN_PLATFORM_IPHONE)
32 return "ios";
33#elif defined(OPENVPN_PLATFORM_IPHONE_SIMULATOR)
34 return "iosim";
35#elif defined(OPENVPN_PLATFORM_ANDROID)
36 return "android";
37#elif defined(OPENVPN_PLATFORM_LINUX)
38 return "linux";
39#elif defined(OPENVPN_PLATFORM_FREEBSD)
40 return "FreeBSD";
41#else
42 static_assert(false);
43#endif
44}
45
46} // namespace openvpn
47
48#endif // OPENVPN_COMMON_PLATFORM_NAME_H
Support deferred server-side state creation when client connects.
Definition ovpncli.cpp:95
const char * platform_name()