1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
// OpenVPN 3 Linux client -- Next generation OpenVPN client
//
// SPDX-License-Identifier: AGPL-3.0-only
//
// Copyright (C) 2017- OpenVPN Inc <sales@openvpn.net>
// Copyright (C) 2024- Răzvan Cojocaru <razvan.cojocaru@openvpn.com>
//
#pragma once
#include <string>
namespace DevPosture {
struct SysInfo
{
SysInfo();
struct Uname
{
std::string sysname;
std::string machine;
std::string version;
std::string release;
};
struct OSRelease
{
std::string version_id;
std::string id;
std::string cpe;
std::string extra_version;
};
operator std::string() const
{
return "{\n { " + uname.sysname + ", " + uname.machine + ", " + uname.version
+ ", " + uname.release + " },\n { " + os_release.version_id + ", "
+ os_release.id + ", " + os_release.cpe + ", " + os_release.extra_version
+ " }\n}";
}
Uname uname;
OSRelease os_release;
};
struct DateTime
{
DateTime();
operator std::string() const
{
return "{ " + date + ", " + time + ", " + timezone + " }";
}
std::string date;
std::string time;
std::string timezone;
};
} // namespace DevPosture
|