Monero
Namespaces | Macros | Functions
util.cpp File Reference
#include <unistd.h>
#include <cstdio>
#include <wchar.h>
#include "unbound.h"
#include "include_base_utils.h"
#include "file_io_utils.h"
#include "wipeable_string.h"
#include "time_helper.h"
#include "crypto/crypto.h"
#include "util.h"
#include "stack_trace.h"
#include "memwipe.h"
#include "net/http_client.h"
#include "readline_buffer.h"
#include <sys/file.h>
#include <sys/utsname.h>
#include <sys/stat.h>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/asio.hpp>
#include <boost/format.hpp>
#include <openssl/evp.h>
Include dependency graph for util.cpp:

Namespaces

 tools
 Various Tools.
 

Macros

#define MONERO_DEFAULT_LOG_CATEGORY   "util"
 

Functions

void tools::copy_file (const std::string &from, const std::string &to)
 
std::string tools::get_nix_version_display_string ()
 
std::string tools::get_os_version_string ()
 Returns the OS version string. More...
 
std::string tools::get_default_data_dir ()
 Returns the default data directory. More...
 
bool tools::create_directories_if_necessary (const std::string &path)
 creates directories for a path More...
 
std::error_code tools::replace_file (const std::string &old_name, const std::string &new_name)
 std::rename wrapper for nix and something strange for windows. More...
 
static bool tools::unbound_built_with_threads ()
 
bool tools::sanitize_locale ()
 
static void tools::setup_crash_dump ()
 
bool tools::disable_core_dumps ()
 
ssize_t tools::get_lockable_memory ()
 
bool tools::on_startup ()
 
void tools::set_strict_default_file_permissions (bool strict)
 
boost::optional< booltools::is_hdd (const char *file_path)
 
void tools::set_max_concurrency (unsigned n)
 
unsigned tools::get_max_concurrency ()
 
bool tools::is_privacy_preserving_network (const std::string &address)
 
bool tools::is_local_address (const std::string &address)
 
int tools::vercmp (const char *v0, const char *v1)
 
bool tools::sha256sum (const uint8_t *data, size_t len, crypto::hash &hash)
 Creates a SHA-256 digest of a data buffer. More...
 
bool tools::sha256sum (const std::string &filename, crypto::hash &hash)
 Creates a SHA-256 digest of a file's contents, equivalent to the sha256sum command in Linux. More...
 
boost::optional< std::pair< uint32_t, uint32_t > > tools::parse_subaddress_lookahead (const std::string &str)
 
std::string tools::glob_to_regex (const std::string &val)
 
void tools::closefrom (int fd)
 
std::string tools::get_human_readable_timestamp (uint64_t ts)
 
std::string tools::get_human_readable_timespan (uint64_t seconds)
 
std::string tools::get_human_readable_bytes (uint64_t bytes)
 
void tools::clear_screen ()
 
std::pair< std::string, size_t > tools::get_string_prefix_by_width (const std::string &s, size_t columns)
 
size_t tools::get_string_width (const std::string &s)
 
std::vector< std::pair< std::string, size_t > > tools::split_line_by_width (const std::string &s, size_t columns)
 
uint64_t tools::cumulative_block_sync_weight (cryptonote::network_type nettype, uint64_t start_block, uint64_t num_blocks)
 
std::vector< std::pair< std::string, size_t > > tools::split_string_by_width (const std::string &s, size_t columns)
 

Macro Definition Documentation

◆ MONERO_DEFAULT_LOG_CATEGORY

#define MONERO_DEFAULT_LOG_CATEGORY   "util"