OpenVPN 3 Core Library
Loading...
Searching...
No Matches
tunlog.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// Define tun logging macros using OPENVPN_DEBUG_TUN as a verbosity level.
13
14#ifndef OPENVPN_TUN_TUNLOG_H
15#define OPENVPN_TUN_TUNLOG_H
16
17#if defined(OPENVPN_DEBUG_TUN) && OPENVPN_DEBUG_TUN >= 1
18#define OPENVPN_LOG_TUN_ERROR(x) OPENVPN_LOG(x)
19#else
20#define OPENVPN_LOG_TUN_ERROR(x)
21#endif
22
23#if defined(OPENVPN_DEBUG_TUN) && OPENVPN_DEBUG_TUN >= 2
24#define OPENVPN_LOG_TUN(x) OPENVPN_LOG(x)
25#else
26#define OPENVPN_LOG_TUN(x)
27#endif
28
29#if defined(OPENVPN_DEBUG_TUN) && OPENVPN_DEBUG_TUN >= 3
30#define OPENVPN_LOG_TUN_VERBOSE(x) OPENVPN_LOG(x)
31#else
32#define OPENVPN_LOG_TUN_VERBOSE(x)
33#endif
34
35#endif // OPENVPN_TUN_TUNLOG_H