OpenVPN 3 Core Library
Loading...
Searching...
No Matches
hostname.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
// Get hostname
13
14
#ifndef OPENVPN_COMMON_HOSTNAME_H
15
#define OPENVPN_COMMON_HOSTNAME_H
16
17
#include <string>
18
19
#ifdef USE_ASIO
20
#include <asio/ip/host_name.hpp>
21
#endif
22
23
namespace
openvpn
{
24
inline
std::string
get_hostname
()
25
{
26
#ifdef USE_ASIO
27
return
asio::ip::host_name();
28
#else
29
return
"HOSTNAME_UNDEFINED"
;
30
#endif
31
}
32
}
// namespace openvpn
33
34
#endif
openvpn
Definition
ovpncli.cpp:97
openvpn::get_hostname
std::string get_hostname()
Definition
hostname.hpp:24
openvpn
common
hostname.hpp
Generated by
1.9.8