Electroneum
Namespaces | Classes | Typedefs | Functions | Variables
nodetool Namespace Reference

Namespaces

 anonymous_namespace{net_peerlist.cpp}
 

Classes

struct  proxy
 
struct  anonymous_inbound
 
struct  p2p_connection_context_t
 
class  node_server
 
struct  i_p2p_endpoint
 
struct  p2p_endpoint_stub
 
struct  peerlist_join
 
struct  peerlist_types
 
class  peerlist_storage
 
class  peerlist_manager
 
struct  network_address_old
 
struct  peerlist_entry_base
 
struct  anchor_peerlist_entry_base
 
struct  connection_entry_base
 
struct  network_config
 
struct  basic_node_data
 
struct  COMMAND_HANDSHAKE_T
 
struct  COMMAND_TIMED_SYNC_T
 
struct  COMMAND_PING
 

Typedefs

typedef boost::uuids::uuid uuid
 
typedef boost::uuids::uuid net_connection_id
 
typedef uint64_t peerid_type
 
typedef peerlist_entry_base< epee::net_utils::network_address > peerlist_entry
 
typedef anchor_peerlist_entry_base< epee::net_utils::network_address > anchor_peerlist_entry
 
typedef connection_entry_base< epee::net_utils::network_address > connection_entry
 

Functions

boost::optional< std::vector< proxy > > get_proxies (boost::program_options::variables_map const &vm)
 
boost::optional< std::vector< anonymous_inbound > > get_anonymous_inbounds (boost::program_options::variables_map const &vm)
 
bool is_filtered_command (const epee::net_utils::network_address &address, int command)
 
boost::optional< boost::asio::ip::tcp::socket > socks_connect_internal (const std::atomic< bool > &stop_signal, boost::asio::io_service &service, const boost::asio::ip::tcp::endpoint &proxy, const epee::net_utils::network_address &remote)
 
bool append_net_address (std::vector< epee::net_utils::network_address > &seed_nodes, std::string const &addr, uint16_t default_port)
 
template<typename Archive >
void serialize (Archive &a, peerlist_types &elem, unsigned ver)
 
template<typename Archive >
void serialize (Archive &a, peerlist_join elem, unsigned ver)
 
static std::string peerid_to_string (peerid_type peer_id)
 
std::string print_peerlist_to_string (const std::vector< peerlist_entry > &pl)
 
crypto::hash get_proof_of_trust_hash (const nodetool::proof_of_trust &pot)
 

Variables

const command_line::arg_descriptor< std::string > arg_p2p_bind_ip = {"p2p-bind-ip", "Interface for p2p network protocol", "0.0.0.0"}
 
const command_line::arg_descriptor< std::string, false, true, 2 > arg_p2p_bind_port
 
const command_line::arg_descriptor< uint32_t > arg_p2p_external_port = {"p2p-external-port", "External port for p2p network protocol (if port forwarding used with NAT)", 0}
 
const command_line::arg_descriptor< boolarg_p2p_allow_local_ip = {"allow-local-ip", "Allow local ip add to peer list, mostly in debug purposes"}
 
const command_line::arg_descriptor< std::vector< std::string > > arg_p2p_add_peer = {"add-peer", "Manually add peer to local peerlist"}
 
const command_line::arg_descriptor< std::vector< std::string > > arg_p2p_add_priority_node = {"add-priority-node", "Specify list of peers to connect to and attempt to keep the connection open"}
 
const command_line::arg_descriptor< std::vector< std::string > > arg_p2p_add_exclusive_node
 
const command_line::arg_descriptor< std::vector< std::string > > arg_p2p_seed_node = {"seed-node", "Connect to a node to retrieve peer addresses, and disconnect"}
 
const command_line::arg_descriptor< std::vector< std::string > > arg_proxy = {"proxy", "<network-type>,<socks-ip:port>[,max_connections] i.e. \"tor,127.0.0.1:9050,100\""}
 
const command_line::arg_descriptor< std::vector< std::string > > arg_anonymous_inbound = {"anonymous-inbound", "<hidden-service-address>,<[bind-ip:]port>[,max_connections] i.e. \"x.onion,127.0.0.1:18083,100\""}
 
const command_line::arg_descriptor< boolarg_p2p_hide_my_port = {"hide-my-port", "Do not announce yourself as peerlist candidate", false, true}
 
const command_line::arg_descriptor< boolarg_no_sync = {"no-sync", "Don't synchronize the blockchain with other peers", false}
 
const command_line::arg_descriptor< boolarg_no_igd = {"no-igd", "Disable UPnP port mapping"}
 
const command_line::arg_descriptor< int64_t > arg_out_peers = {"out-peers", "set max number of out peers", -1}
 
const command_line::arg_descriptor< int64_t > arg_in_peers = {"in-peers", "set max number of in peers", -1}
 
const command_line::arg_descriptor< int > arg_tos_flag = {"tos-flag", "set TOS flag", -1}
 
const command_line::arg_descriptor< int64_t > arg_limit_rate_up = {"limit-rate-up", "set limit-rate-up [kB/s]", P2P_DEFAULT_LIMIT_RATE_UP}
 
const command_line::arg_descriptor< int64_t > arg_limit_rate_down = {"limit-rate-down", "set limit-rate-down [kB/s]", P2P_DEFAULT_LIMIT_RATE_DOWN}
 
const command_line::arg_descriptor< int64_t > arg_limit_rate = {"limit-rate", "set limit-rate [kB/s]", -1}
 
const command_line::arg_descriptor< boolarg_save_graph = {"save-graph", "Save data for dr electroneum", false}
 
const int64_t default_limit_up = P2P_DEFAULT_LIMIT_RATE_UP
 
const int64_t default_limit_down = P2P_DEFAULT_LIMIT_RATE_DOWN
 
const command_line::arg_descriptor< boolarg_offline
 

Typedef Documentation

◆ anchor_peerlist_entry

typedef anchor_peerlist_entry_base<epee::net_utils::network_address> nodetool::anchor_peerlist_entry

◆ connection_entry

typedef connection_entry_base<epee::net_utils::network_address> nodetool::connection_entry

◆ net_connection_id

typedef boost::uuids::uuid nodetool::net_connection_id

◆ peerid_type

typedef uint64_t nodetool::peerid_type

◆ peerlist_entry

typedef peerlist_entry_base<epee::net_utils::network_address> nodetool::peerlist_entry

◆ uuid

typedef boost::uuids::uuid nodetool::uuid

Function Documentation

◆ append_net_address()

bool nodetool::append_net_address ( std::vector< epee::net_utils::network_address > &  seed_nodes,
std::string const &  addr,
uint16_t  default_port 
)
inline

◆ get_anonymous_inbounds()

boost::optional< std::vector< anonymous_inbound > > nodetool::get_anonymous_inbounds ( boost::program_options::variables_map const &  vm)

◆ get_proof_of_trust_hash()

crypto::hash nodetool::get_proof_of_trust_hash ( const nodetool::proof_of_trust &  pot)
inline

◆ get_proxies()

boost::optional< std::vector< proxy > > nodetool::get_proxies ( boost::program_options::variables_map const &  vm)

◆ is_filtered_command()

bool nodetool::is_filtered_command ( epee::net_utils::network_address const &  address,
int  command 
)
Returns
True if commnd is filtered (ignored/dropped) for address

◆ peerid_to_string()

static std::string nodetool::peerid_to_string ( peerid_type  peer_id)
inlinestatic

◆ print_peerlist_to_string()

std::string nodetool::print_peerlist_to_string ( const std::vector< peerlist_entry > &  pl)
inline

◆ serialize() [1/2]

template<typename Archive >
void nodetool::serialize ( Archive &  a,
peerlist_join  elem,
unsigned  ver 
)

◆ serialize() [2/2]

template<typename Archive >
void nodetool::serialize ( Archive &  a,
peerlist_types elem,
unsigned  ver 
)

◆ socks_connect_internal()

boost::optional< boost::asio::ip::tcp::socket > nodetool::socks_connect_internal ( const std::atomic< bool > &  stop_signal,
boost::asio::io_service &  service,
const boost::asio::ip::tcp::endpoint &  proxy,
const epee::net_utils::network_address &  remote 
)

Variable Documentation

◆ arg_anonymous_inbound

const command_line::arg_descriptor< std::vector< std::string > > nodetool::arg_anonymous_inbound = {"anonymous-inbound", "<hidden-service-address>,<[bind-ip:]port>[,max_connections] i.e. \"x.onion,127.0.0.1:18083,100\""}

◆ arg_in_peers

const command_line::arg_descriptor< int64_t > nodetool::arg_in_peers = {"in-peers", "set max number of in peers", -1}

◆ arg_limit_rate

const command_line::arg_descriptor< int64_t > nodetool::arg_limit_rate = {"limit-rate", "set limit-rate [kB/s]", -1}

◆ arg_limit_rate_down

const command_line::arg_descriptor< int64_t > nodetool::arg_limit_rate_down = {"limit-rate-down", "set limit-rate-down [kB/s]", P2P_DEFAULT_LIMIT_RATE_DOWN}

◆ arg_limit_rate_up

const command_line::arg_descriptor< int64_t > nodetool::arg_limit_rate_up = {"limit-rate-up", "set limit-rate-up [kB/s]", P2P_DEFAULT_LIMIT_RATE_UP}

◆ arg_no_igd

const command_line::arg_descriptor< bool > nodetool::arg_no_igd = {"no-igd", "Disable UPnP port mapping"}

◆ arg_no_sync

const command_line::arg_descriptor< bool > nodetool::arg_no_sync = {"no-sync", "Don't synchronize the blockchain with other peers", false}

◆ arg_offline

const command_line::arg_descriptor<bool> nodetool::arg_offline
extern

◆ arg_out_peers

const command_line::arg_descriptor< int64_t > nodetool::arg_out_peers = {"out-peers", "set max number of out peers", -1}

◆ arg_p2p_add_exclusive_node

const command_line::arg_descriptor< std::vector< std::string > > nodetool::arg_p2p_add_exclusive_node
Initial value:
= {"add-exclusive-node", "Specify list of peers to connect to only."
" If this option is given the options add-priority-node and seed-node are ignored"}

◆ arg_p2p_add_peer

const command_line::arg_descriptor< std::vector< std::string > > nodetool::arg_p2p_add_peer = {"add-peer", "Manually add peer to local peerlist"}

◆ arg_p2p_add_priority_node

const command_line::arg_descriptor< std::vector< std::string > > nodetool::arg_p2p_add_priority_node = {"add-priority-node", "Specify list of peers to connect to and attempt to keep the connection open"}

◆ arg_p2p_allow_local_ip

const command_line::arg_descriptor< bool > nodetool::arg_p2p_allow_local_ip = {"allow-local-ip", "Allow local ip add to peer list, mostly in debug purposes"}

◆ arg_p2p_bind_ip

const command_line::arg_descriptor< std::string > nodetool::arg_p2p_bind_ip = {"p2p-bind-ip", "Interface for p2p network protocol", "0.0.0.0"}

◆ arg_p2p_bind_port

const command_line::arg_descriptor< std::string, false, true, 2 > nodetool::arg_p2p_bind_port
Initial value:
= {
"p2p-bind-port"
, "Port for p2p network protocol"
, std::to_string(config::P2P_DEFAULT_PORT)
, [](std::array<bool, 2> testnet_stagenet, bool defaulted, std::string val)->std::string {
if (testnet_stagenet[0] && defaulted)
return std::to_string(config::testnet::P2P_DEFAULT_PORT);
else if (testnet_stagenet[1] && defaulted)
return std::to_string(config::stagenet::P2P_DEFAULT_PORT);
return val;
}
}
uint16_t const P2P_DEFAULT_PORT
Definition: cryptonote_config.h:229
uint16_t const P2P_DEFAULT_PORT
Definition: cryptonote_config.h:214
uint16_t const P2P_DEFAULT_PORT
Definition: cryptonote_config.h:200
const command_line::arg_descriptor< bool, false > arg_testnet_on
Definition: cryptonote_core.cpp:71
const command_line::arg_descriptor< bool, false > arg_stagenet_on
Definition: cryptonote_core.cpp:76

◆ arg_p2p_external_port

const command_line::arg_descriptor< uint32_t > nodetool::arg_p2p_external_port = {"p2p-external-port", "External port for p2p network protocol (if port forwarding used with NAT)", 0}

◆ arg_p2p_hide_my_port

const command_line::arg_descriptor< bool > nodetool::arg_p2p_hide_my_port = {"hide-my-port", "Do not announce yourself as peerlist candidate", false, true}

◆ arg_p2p_seed_node

const command_line::arg_descriptor< std::vector< std::string > > nodetool::arg_p2p_seed_node = {"seed-node", "Connect to a node to retrieve peer addresses, and disconnect"}

◆ arg_proxy

const command_line::arg_descriptor< std::vector< std::string > > nodetool::arg_proxy = {"proxy", "<network-type>,<socks-ip:port>[,max_connections] i.e. \"tor,127.0.0.1:9050,100\""}

◆ arg_save_graph

const command_line::arg_descriptor< bool > nodetool::arg_save_graph = {"save-graph", "Save data for dr electroneum", false}

◆ arg_tos_flag

const command_line::arg_descriptor< int > nodetool::arg_tos_flag = {"tos-flag", "set TOS flag", -1}

◆ default_limit_down

const int64_t nodetool::default_limit_down = P2P_DEFAULT_LIMIT_RATE_DOWN

◆ default_limit_up

const int64_t nodetool::default_limit_up = P2P_DEFAULT_LIMIT_RATE_UP