2018-02-03 18:22:01 -08:00
|
|
|
// Matrix Construct
|
|
|
|
//
|
|
|
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
|
|
|
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
|
|
|
|
//
|
|
|
|
// Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
// purpose with or without fee is hereby granted, provided that the above
|
|
|
|
// copyright notice and this permission notice is present in all copies. The
|
|
|
|
// full license for this software is available in the LICENSE file.
|
2016-08-15 16:21:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#define HAVE_IRCD_INFO_H
|
|
|
|
|
2018-02-19 13:32:34 -08:00
|
|
|
// legacy
|
2018-02-19 14:03:05 -08:00
|
|
|
extern "C" const char *const ircd_name;
|
2018-02-19 13:32:34 -08:00
|
|
|
extern "C" const char *const ircd_version;
|
|
|
|
|
2017-09-12 09:37:44 -07:00
|
|
|
/// Information & metadata about the library.
|
2017-08-28 14:51:22 -07:00
|
|
|
namespace ircd::info
|
|
|
|
{
|
|
|
|
struct line;
|
2018-01-17 03:55:36 -08:00
|
|
|
struct tc_version;
|
2017-08-28 14:51:22 -07:00
|
|
|
|
2018-02-19 13:32:34 -08:00
|
|
|
// Build information
|
2018-04-02 16:50:51 -07:00
|
|
|
extern const string_view tag;
|
|
|
|
extern const string_view branch;
|
|
|
|
extern const string_view commit;
|
2017-08-28 14:51:22 -07:00
|
|
|
extern const time_t configured_time;
|
|
|
|
extern const time_t startup_time;
|
2018-02-19 13:32:34 -08:00
|
|
|
extern const string_view configured;
|
2018-09-05 23:32:52 -07:00
|
|
|
extern const string_view compiled;
|
2018-02-19 13:32:34 -08:00
|
|
|
extern const string_view startup;
|
2018-01-17 03:55:36 -08:00
|
|
|
|
2018-12-19 12:23:38 -08:00
|
|
|
// System information
|
2018-01-17 21:36:26 -08:00
|
|
|
extern const size_t max_align;
|
|
|
|
extern const size_t hardware_concurrency;
|
|
|
|
extern const size_t destructive_interference;
|
|
|
|
extern const size_t constructive_interference;
|
2018-12-19 12:23:38 -08:00
|
|
|
extern const size_t page_size;
|
|
|
|
extern const size_t iov_max;
|
|
|
|
extern const size_t aio_max;
|
|
|
|
extern const size_t aio_reqprio_max;
|
2018-04-20 12:37:17 -07:00
|
|
|
extern const size_t rlimit_as;
|
|
|
|
extern const size_t rlimit_data;
|
|
|
|
extern const size_t rlimit_rss;
|
|
|
|
extern const size_t rlimit_nofile;
|
2018-11-14 17:36:15 -08:00
|
|
|
extern const size_t rlimit_rttime;
|
2018-06-09 13:42:35 -07:00
|
|
|
|
2018-12-19 12:23:38 -08:00
|
|
|
// Host information
|
2018-01-21 02:09:13 -08:00
|
|
|
#ifdef HAVE_SYS_UTSNAME_H
|
|
|
|
extern const ::utsname utsname;
|
|
|
|
#endif
|
|
|
|
|
2018-12-19 12:23:38 -08:00
|
|
|
// Third-party information
|
|
|
|
extern const int glibc_version[3];
|
|
|
|
extern const string_view glibc_version_str;
|
|
|
|
|
|
|
|
// Primary information
|
|
|
|
extern const string_view name;
|
|
|
|
extern const string_view version;
|
|
|
|
extern const string_view user_agent;
|
|
|
|
extern const string_view server_agent;
|
|
|
|
|
2018-02-19 13:32:34 -08:00
|
|
|
// Extended information
|
2018-12-19 12:23:38 -08:00
|
|
|
extern const string_view credits[];
|
2018-02-19 13:32:34 -08:00
|
|
|
|
2018-12-19 12:23:38 -08:00
|
|
|
// Util
|
2018-04-20 12:41:03 -07:00
|
|
|
void dump();
|
2018-01-17 03:55:36 -08:00
|
|
|
void init();
|
2017-08-28 14:51:22 -07:00
|
|
|
}
|