From 880ebb081aa86a52076c482e00b64e7cbb2dd13c Mon Sep 17 00:00:00 2001 From: Razvan Cojocaru Date: Thu, 15 Aug 2024 23:34:22 +0300 Subject: [PATCH] server: Add new to_string_debug() pure virtual member to SendBase This is part of a series of patches instrumenting crash checks. Classes that implement SendBase can optionally collect debug information for various scenarios, and create a string here that presents them in human-readable form when requested. Signed-off-by: Razvan Cojocaru --- openvpn/server/manage.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openvpn/server/manage.hpp b/openvpn/server/manage.hpp index 74f556f0..19488b09 100644 --- a/openvpn/server/manage.hpp +++ b/openvpn/server/manage.hpp @@ -4,7 +4,7 @@ // packet encryption, packet authentication, and // packet compression. // -// Copyright (C) 2012-2022 OpenVPN Inc. +// Copyright (C) 2012- OpenVPN Inc. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License Version 3 @@ -69,6 +69,9 @@ struct SendBase : public virtual RC // Status virtual bool is_stopped() const = 0; + // Retrieve any potentially collected debug state. + virtual std::string to_string_debug() const = 0; + // IP-mapped ACL (IPMA) notification virtual void ipma_notify(const struct ovpn_tun_head_ipma &ipma) = 0;