Common types, includes and definitions. More...
#include <map>
#include <set>
#include <array>
#include <chrono>
#include <string>
#include <vector>
#include <utility>
#include <cstdint>
#include <boost/system/error_code.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/asio/posix/stream_descriptor.hpp>
#include <boost/asio/signal_set.hpp>
#include <boost/asio/system_timer.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include "json/json.h"
Namespaces | |
Myra | |
Namespace declaration for all of the Myra Canyon helper functions. | |
Typedefs | |
typedef std::vector< uint8_t > | Myra::VBytes |
Vector of bytes. (E.g., to use as a packet buffer.) More... | |
typedef std::vector< std::string > | Myra::VStr |
Vector of strings. More... | |
typedef std::set< std::string > | Myra::SStr |
Set of strings. More... | |
typedef std::map< std::string, std::string > | Myra::MStr |
Map of strings. More... | |
typedef Json::Value | Myra::JSON |
Easy to reference JSON object. More... | |
typedef uint64_t | Myra::FlowHash |
64-bit hash calculated by Myra::hash(). More... | |
typedef uint64_t | Myra::STAT |
Type used for statistics. More... | |
typedef std::set< FlowHash > | Myra::Hashes |
Set of hashes. More... | |
typedef int | Myra::FD |
Native file descriptor. More... | |
typedef boost::multiprecision::uint128_t | Myra::uint128_t |
Unsigned 128-bit integer. More... | |
typedef boost::multiprecision::int128_t | Myra::int128_t |
Signed 128-bit integer. More... | |
typedef boost::system::error_code | Myra::EC |
boost system error code. More... | |
typedef boost::asio::io_service | Myra::ASIO_IO_SERVICE |
boost::asio's link to the operating system's I/O services. More... | |
typedef boost::asio::posix::stream_descriptor | Myra::ASIO_STREAM |
boost::asio's POSIX stream descriptor. More... | |
typedef boost::asio::signal_set | Myra::ASIO_SIGNAL_SET |
boost::asio's signal handling. More... | |
typedef boost::asio::system_timer | Myra::ASIO_TIMER |
boost::asio's timer support. More... | |
typedef std::chrono::high_resolution_clock::time_point | Myra::TP |
High resolution time point (aka "now"). More... | |
typedef uint8_t | Myra::MAC [6] |
MAC addresses. More... | |
typedef uint32_t | Myra::IPv4_ADDR |
32-bit IPv4 addresses. More... | |
typedef uint128_t | Myra::IPv6_ADDR |
128-bit IPv6 addresses. More... | |
typedef uint16_t | Myra::PORT |
16-bit port. More... | |
typedef PORT | Myra::TCP_PORT |
16-bit TCP port. More... | |
typedef PORT | Myra::UDP_PORT |
16-bit UDP port. More... | |
typedef std::map< IPv4_ADDR, std::string > | Myra::HostLookupMap |
Map of address to hostname. More... | |
Variables | |
constexpr std::size_t | Myra::KiB = 1024 |
kibibyte (10 bits) 1024 More... | |
constexpr std::size_t | Myra::MiB = 1024 * KiB |
mebibyte (20 bits) 1048576 More... | |
constexpr std::size_t | Myra::GiB = 1024 * MiB |
gibibyte (30 bits) 1073741824 More... | |
constexpr std::size_t | Myra::TiB = 1024 * GiB |
tebibyte (40 bits) 1099511627776 More... | |
constexpr std::size_t | Myra::PiB = 1024 * TiB |
pebibyte (50 bits) 1125899906842624 More... | |
constexpr std::size_t | Myra::EiB = 1024 * PiB |
exbibyte (60 bits) 1152921505606846976 More... | |
constexpr std::size_t | Myra::ZiB = 1024 * EiB |
zebibyte (70 bits) 1180591620717411303424 More... | |
constexpr std::size_t | Myra::YiB = 1024 * ZiB |
yobibyte (80 bits) 1208925819614629174706176 More... | |
constexpr std::size_t | Myra::KB = 1000 |
kilobyte 1000 More... | |
constexpr std::size_t | Myra::MB = 1000 * KB |
megabyte 1000000 More... | |
constexpr std::size_t | Myra::GB = 1000 * MB |
gigabyte 1000000000 More... | |
constexpr std::size_t | Myra::TB = 1000 * GB |
terabyte 1000000000000 More... | |
constexpr std::size_t | Myra::PB = 1000 * TB |
petabyte 1000000000000000 More... | |
constexpr std::size_t | Myra::EB = 1000 * PB |
exabyte 1000000000000000000 More... | |
constexpr std::size_t | Myra::ZB = 1000 * EB |
zetabyte 1000000000000000000000 More... | |
constexpr std::size_t | Myra::YB = 1000 * ZB |
yotabyte 1000000000000000000000000 More... | |
constexpr std::size_t | Myra::Seconds = 1 |
constexpr std::size_t | Myra::Minutes = 60 * Seconds |
constexpr std::size_t | Myra::Hours = 60 * Minutes |
constexpr std::size_t | Myra::Days = 24 * Hours |
constexpr std::size_t | Myra::Weeks = 7 * Days |
constexpr std::size_t | Myra::Years = 365.24 * Days |
constexpr std::size_t | Myra::Months = Years / 12 |
Common types, includes and definitions.