Electroneum
util.cpp File Reference
#include <unistd.h>
#include <cstdio>
#include "unbound.h"
#include "include_base_utils.h"
#include "file_io_utils.h"
#include "wipeable_string.h"
#include "misc_os_dependent.h"
#include "crypto/crypto.h"
#include "util.h"
#include "stack_trace.h"
#include "memwipe.h"
#include "cryptonote_config.h"
#include "net/http_client.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/sha.h>
Include dependency graph for util.cpp:

Go to the source code of this file.

Namespaces

 tools
 Various Tools.
 

Macros

#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "util"
 

Functions

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...
 
bool tools::sanitize_locale ()
 
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_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)
 
bool tools::sha256sum (const std::string &filename, crypto::hash &hash)
 
boost::optional< std::pair< uint32_t, uint32_t > > tools::parse_subaddress_lookahead (const std::string &str)
 
int tools::display_simple_progress_spinner (int x)
 
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_bytes (uint64_t bytes)
 

Macro Definition Documentation

◆ ELECTRONEUM_DEFAULT_LOG_CATEGORY

#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "util"

Definition at line 91 of file util.cpp.