Monero
Classes | Namespaces | Macros | Typedefs | Functions
node_server.cpp File Reference
#include "gtest/gtest.h"
#include "cryptonote_core/cryptonote_core.h"
#include "p2p/net_node.h"
#include "p2p/net_node.inl"
#include "cryptonote_core/i_core_events.h"
#include "cryptonote_protocol/cryptonote_protocol_handler.h"
#include "cryptonote_protocol/cryptonote_protocol_handler.inl"
#include "unit_tests_utils.h"
#include <condition_variable>
Include dependency graph for node_server.cpp:

Classes

class  test_core
 

Namespaces

 cryptonote
 Holds cryptonote related classes and helpers.
 
 nodetool
 

Macros

#define MAKE_IPV4_ADDRESS(a, b, c, d)   epee::net_utils::ipv4_network_address{MAKE_IP(a,b,c,d),0}
 
#define MAKE_IPV4_ADDRESS_PORT(a, b, c, d, e)   epee::net_utils::ipv4_network_address{MAKE_IP(a,b,c,d),e}
 
#define MAKE_IPV4_SUBNET(a, b, c, d, e)   epee::net_utils::ipv4_network_subnet{MAKE_IP(a,b,c,d),e}
 

Typedefs

typedef nodetool::node_server< cryptonote::t_cryptonote_protocol_handler< test_core > > Server
 

Functions

static bool is_blocked (Server &server, const epee::net_utils::network_address &address, time_t *t=NULL)
 
 TEST (ban, add)
 
 TEST (ban, limit)
 
 TEST (ban, subnet)
 
 TEST (ban, ignores_port)
 
 TEST (ban, file_banlist)
 
 TEST (node_server, bind_same_p2p_port)
 
 TEST (cryptonote_protocol_handler, race_condition)
 
 TEST (node_server, race_condition)
 

Macro Definition Documentation

◆ MAKE_IPV4_ADDRESS

#define MAKE_IPV4_ADDRESS (   a,
  b,
  c,
  d 
)    epee::net_utils::ipv4_network_address{MAKE_IP(a,b,c,d),0}

◆ MAKE_IPV4_ADDRESS_PORT

#define MAKE_IPV4_ADDRESS_PORT (   a,
  b,
  c,
  d,
 
)    epee::net_utils::ipv4_network_address{MAKE_IP(a,b,c,d),e}

◆ MAKE_IPV4_SUBNET

#define MAKE_IPV4_SUBNET (   a,
  b,
  c,
  d,
 
)    epee::net_utils::ipv4_network_subnet{MAKE_IP(a,b,c,d),e}

Typedef Documentation

◆ Server

Function Documentation

◆ is_blocked()

static bool is_blocked ( Server server,
const epee::net_utils::network_address address,
time_t *  t = NULL 
)
static

◆ TEST() [1/8]

TEST ( ban  ,
add   
)

◆ TEST() [2/8]

TEST ( ban  ,
limit   
)

◆ TEST() [3/8]

TEST ( ban  ,
subnet   
)

◆ TEST() [4/8]

TEST ( ban  ,
ignores_port   
)

◆ TEST() [5/8]

TEST ( ban  ,
file_banlist   
)

◆ TEST() [6/8]

TEST ( node_server  ,
bind_same_p2p_port   
)

◆ TEST() [7/8]

TEST ( cryptonote_protocol_handler  ,
race_condition   
)

◆ TEST() [8/8]

TEST ( node_server  ,
race_condition   
)