OpenVPN 3 Core Library
Loading...
Searching...
No Matches
servhalt.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
#pragma once
13
14
#include <string>
15
16
namespace
openvpn::HaltRestart
{
17
enum
Type
18
{
19
HALT
,
// disconnect
20
RESTART
,
// restart, don't preserve session token
21
RESTART_PSID
,
// restart, preserve session token
22
RESTART_PASSIVE
,
// restart, preserve session token and local client instance object
23
AUTH_FAILED
,
// auth fail, don't preserve session token
24
RAW
,
// pass raw message to client
25
};
26
27
inline
std::string to_string(
Type
type)
28
{
29
switch
(type)
30
{
31
case
HALT
:
32
return
"HALT"
;
33
case
RESTART
:
34
return
"RESTART"
;
35
case
RESTART_PSID
:
36
return
"RESTART_PSID"
;
37
case
RESTART_PASSIVE
:
38
return
"RESTART_PASSIVE"
;
39
case
AUTH_FAILED
:
40
return
"AUTH_FAILED"
;
41
case
RAW
:
42
return
"RAW"
;
43
default
:
44
return
"HaltRestart_?"
;
45
}
46
}
47
}
// namespace openvpn::HaltRestart
openvpn::HaltRestart
Definition
servhalt.hpp:16
openvpn::HaltRestart::Type
Type
Definition
servhalt.hpp:18
openvpn::HaltRestart::RAW
@ RAW
Definition
servhalt.hpp:24
openvpn::HaltRestart::AUTH_FAILED
@ AUTH_FAILED
Definition
servhalt.hpp:23
openvpn::HaltRestart::RESTART_PSID
@ RESTART_PSID
Definition
servhalt.hpp:21
openvpn::HaltRestart::RESTART_PASSIVE
@ RESTART_PASSIVE
Definition
servhalt.hpp:22
openvpn::HaltRestart::HALT
@ HALT
Definition
servhalt.hpp:19
openvpn::HaltRestart::RESTART
@ RESTART
Definition
servhalt.hpp:20
openvpn
server
servhalt.hpp
Generated by
1.9.8