Electroneum
net_utils_base.h File Reference
#include <boost/uuid/uuid.hpp>
#include <boost/asio/io_service.hpp>
#include <typeinfo>
#include <type_traits>
#include "enums.h"
#include "serialization/keyvalue_serialization.h"
#include "misc_log_ex.h"
Include dependency graph for net_utils_base.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  epee::net_utils::ipv4_network_address
 
class  epee::net_utils::network_address
 
struct  epee::net_utils::connection_context_base
 
struct  epee::net_utils::i_service_endpoint
 

Namespaces

 net
 
 epee
 
 epee::net_utils
 

Macros

#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "net"
 
#define MAKE_IP(a1, a2, a3, a4)   (a1|(a2<<8)|(a3<<16)|(a4<<24))
 
#define GET_IO_SERVICE(s)   ((s).get_io_service())
 
#define LOG_ERROR_CC(ct, message)   MERROR(ct << message)
 
#define LOG_WARNING_CC(ct, message)   MWARNING(ct << message)
 
#define LOG_INFO_CC(ct, message)   MINFO(ct << message)
 
#define LOG_DEBUG_CC(ct, message)   MDEBUG(ct << message)
 
#define LOG_TRACE_CC(ct, message)   MTRACE(ct << message)
 
#define LOG_CC(level, ct, message)   MLOG(level, ct << message)
 
#define LOG_PRINT_CC_L0(ct, message)   LOG_PRINT_L0(ct << message)
 
#define LOG_PRINT_CC_L1(ct, message)   LOG_PRINT_L1(ct << message)
 
#define LOG_PRINT_CC_L2(ct, message)   LOG_PRINT_L2(ct << message)
 
#define LOG_PRINT_CC_L3(ct, message)   LOG_PRINT_L3(ct << message)
 
#define LOG_PRINT_CC_L4(ct, message)   LOG_PRINT_L4(ct << message)
 
#define LOG_PRINT_CCONTEXT_L0(message)   LOG_PRINT_CC_L0(context, message)
 
#define LOG_PRINT_CCONTEXT_L1(message)   LOG_PRINT_CC_L1(context, message)
 
#define LOG_PRINT_CCONTEXT_L2(message)   LOG_PRINT_CC_L2(context, message)
 
#define LOG_PRINT_CCONTEXT_L3(message)   LOG_PRINT_CC_L3(context, message)
 
#define LOG_ERROR_CCONTEXT(message)   LOG_ERROR_CC(context, message)
 
#define CHECK_AND_ASSERT_MES_CC(condition, return_val, err_message)   CHECK_AND_ASSERT_MES(condition, return_val, "[" << epee::net_utils::print_connection_context_short(context) << "]" << err_message)
 

Functions

bool epee::net_utils::operator== (const ipv4_network_address &lhs, const ipv4_network_address &rhs) noexcept
 
bool epee::net_utils::operator!= (const ipv4_network_address &lhs, const ipv4_network_address &rhs) noexcept
 
bool epee::net_utils::operator< (const ipv4_network_address &lhs, const ipv4_network_address &rhs) noexcept
 
bool epee::net_utils::operator<= (const ipv4_network_address &lhs, const ipv4_network_address &rhs) noexcept
 
bool epee::net_utils::operator> (const ipv4_network_address &lhs, const ipv4_network_address &rhs) noexcept
 
bool epee::net_utils::operator>= (const ipv4_network_address &lhs, const ipv4_network_address &rhs) noexcept
 
bool epee::net_utils::operator== (const network_address &lhs, const network_address &rhs)
 
bool epee::net_utils::operator!= (const network_address &lhs, const network_address &rhs)
 
bool epee::net_utils::operator< (const network_address &lhs, const network_address &rhs)
 
bool epee::net_utils::operator<= (const network_address &lhs, const network_address &rhs)
 
bool epee::net_utils::operator> (const network_address &lhs, const network_address &rhs)
 
bool epee::net_utils::operator>= (const network_address &lhs, const network_address &rhs)
 
std::string epee::net_utils::print_connection_context (const connection_context_base &ctx)
 
std::string epee::net_utils::print_connection_context_short (const connection_context_base &ctx)
 
 epee::net_utils::MAKE_LOGGABLE (connection_context_base, ct, os)
 

Macro Definition Documentation

◆ CHECK_AND_ASSERT_MES_CC

#define CHECK_AND_ASSERT_MES_CC (   condition,
  return_val,
  err_message 
)    CHECK_AND_ASSERT_MES(condition, return_val, "[" << epee::net_utils::print_connection_context_short(context) << "]" << err_message)

Definition at line 369 of file net_utils_base.h.

◆ ELECTRONEUM_DEFAULT_LOG_CATEGORY

#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "net"

Definition at line 41 of file net_utils_base.h.

◆ GET_IO_SERVICE

#define GET_IO_SERVICE (   s)    ((s).get_io_service())

Definition at line 50 of file net_utils_base.h.

◆ LOG_CC

#define LOG_CC (   level,
  ct,
  message 
)    MLOG(level, ct << message)

Definition at line 355 of file net_utils_base.h.

◆ LOG_DEBUG_CC

#define LOG_DEBUG_CC (   ct,
  message 
)    MDEBUG(ct << message)

Definition at line 353 of file net_utils_base.h.

◆ LOG_ERROR_CC

#define LOG_ERROR_CC (   ct,
  message 
)    MERROR(ct << message)

Definition at line 350 of file net_utils_base.h.

◆ LOG_ERROR_CCONTEXT

#define LOG_ERROR_CCONTEXT (   message)    LOG_ERROR_CC(context, message)

Definition at line 367 of file net_utils_base.h.

◆ LOG_INFO_CC

#define LOG_INFO_CC (   ct,
  message 
)    MINFO(ct << message)

Definition at line 352 of file net_utils_base.h.

◆ LOG_PRINT_CC_L0

#define LOG_PRINT_CC_L0 (   ct,
  message 
)    LOG_PRINT_L0(ct << message)

Definition at line 357 of file net_utils_base.h.

◆ LOG_PRINT_CC_L1

#define LOG_PRINT_CC_L1 (   ct,
  message 
)    LOG_PRINT_L1(ct << message)

Definition at line 358 of file net_utils_base.h.

◆ LOG_PRINT_CC_L2

#define LOG_PRINT_CC_L2 (   ct,
  message 
)    LOG_PRINT_L2(ct << message)

Definition at line 359 of file net_utils_base.h.

◆ LOG_PRINT_CC_L3

#define LOG_PRINT_CC_L3 (   ct,
  message 
)    LOG_PRINT_L3(ct << message)

Definition at line 360 of file net_utils_base.h.

◆ LOG_PRINT_CC_L4

#define LOG_PRINT_CC_L4 (   ct,
  message 
)    LOG_PRINT_L4(ct << message)

Definition at line 361 of file net_utils_base.h.

◆ LOG_PRINT_CCONTEXT_L0

#define LOG_PRINT_CCONTEXT_L0 (   message)    LOG_PRINT_CC_L0(context, message)

Definition at line 363 of file net_utils_base.h.

◆ LOG_PRINT_CCONTEXT_L1

#define LOG_PRINT_CCONTEXT_L1 (   message)    LOG_PRINT_CC_L1(context, message)

Definition at line 364 of file net_utils_base.h.

◆ LOG_PRINT_CCONTEXT_L2

#define LOG_PRINT_CCONTEXT_L2 (   message)    LOG_PRINT_CC_L2(context, message)

Definition at line 365 of file net_utils_base.h.

◆ LOG_PRINT_CCONTEXT_L3

#define LOG_PRINT_CCONTEXT_L3 (   message)    LOG_PRINT_CC_L3(context, message)

Definition at line 366 of file net_utils_base.h.

◆ LOG_TRACE_CC

#define LOG_TRACE_CC (   ct,
  message 
)    MTRACE(ct << message)

Definition at line 354 of file net_utils_base.h.

◆ LOG_WARNING_CC

#define LOG_WARNING_CC (   ct,
  message 
)    MWARNING(ct << message)

Definition at line 351 of file net_utils_base.h.

◆ MAKE_IP

#define MAKE_IP (   a1,
  a2,
  a3,
  a4 
)    (a1|(a2<<8)|(a3<<16)|(a4<<24))

Definition at line 44 of file net_utils_base.h.