OpenVPN 3 Core Library
Loading...
Searching...
No Matches
signal_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
#pragma once
13
14
#include <string>
15
#include <signal.h>
16
17
namespace
openvpn
{
18
19
inline
std::string
signal_name
(
const
int
signum)
20
{
21
switch
(signum)
22
{
23
case
SIGINT:
24
return
"SIGINT"
;
25
case
SIGTERM:
26
return
"SIGTERM"
;
27
case
SIGHUP:
28
return
"SIGHUP"
;
29
case
SIGUSR1:
30
return
"SIGUSR1"
;
31
case
SIGUSR2:
32
return
"SIGUSR2"
;
33
case
SIGPIPE:
34
return
"SIGPIPE"
;
35
default
:
36
return
std::to_string(signum);
37
}
38
}
39
40
}
// namespace openvpn
openvpn
Support deferred server-side state creation when client connects.
Definition
ovpncli.cpp:95
openvpn::signal_name
std::string signal_name(const int signum)
Definition
signal_name.hpp:19
openvpn
common
signal_name.hpp
Generated by
1.9.8