TARAXA
|
Classes | |
class | CapabilityFace |
The Capability interface. This interface has to be implemented to support any devp2p subprotocol. More... | |
struct | NetworkStartRequired |
struct | InvalidPublicIPAddress |
struct | NetworkRestartNotSupported |
struct | ECDHEError |
The ECDHE agreement failed during RLPx handshake. More... | |
struct | PeerSessionInfo |
class | NodeIPEndpoint |
IPv4,UDP/TCP endpoints. More... | |
struct | NodeSpec |
class | Node |
class | EndpointTracker |
class | ENR |
Class representing Ethereum Node Record - see EIP-778. More... | |
class | IdentitySchemeV4 |
struct | NodeInfo |
struct | Host |
The Host class Capabilities should be registered prior to startNetwork, since m_capabilities is not thread-safe. More... | |
struct | NetworkConfig |
class | Network |
Network Class Static network operations and interface(s). More... | |
class | NodeTableEventHandler |
class | NodeTable |
struct | NodeEntry |
Entry in Node Table. More... | |
struct | DiscoveryDatagram |
struct | PingNode |
struct | Pong |
struct | FindNode |
struct | Neighbours |
struct | ENRRequest |
struct | ENRResponse |
class | Peer |
Representation of connectivity state and all other pertinent Peer metadata. A Peer represents connectivity between two nodes, which in this case, are the host and remote nodes. More... | |
class | RLPXFrameCoderImpl |
struct | RLPXFrameInfo |
Encapsulation of Frame. More... | |
class | RLPXFrameCoder |
Encoder/decoder transport for RLPx connection established by RLPXHandshake. More... | |
struct | RLPXHandshake |
Setup inbound or outbound connection for communication over RLPXFrameCoder. RLPx Spec: https://github.com/ethereum/devp2p/blob/master/rlpx.md#encrypted-handshake. More... | |
struct | RLPXInvalidPacket |
class | RLPXPacket |
class | RLPXSocket |
Shared pointer wrapper for ASIO TCP socket. More... | |
struct | Session |
The Session class. More... | |
struct | TaraxaNetworkConfig |
struct | Capability |
struct | SessionCapability |
class | UDPDatagram |
struct | RLPXDatagramFace |
RLPX Datagram which can be signed. More... | |
struct | UDPSocketFace |
Interface which UDPSocket will implement. More... | |
struct | UDPSocketEvents |
Interface which a UDPSocket's owner must implement. More... | |
class | UDPSocket |
UDP Interface Handler must implement UDPSocketEvents. More... | |
class | UPnP |
Typedefs | |
using | NodeID = h512 |
using | CapDesc = std::pair< std::string, unsigned > |
using | CapDescs = std::vector< CapDesc > |
using | PeerSessionInfos = std::vector< PeerSessionInfo > |
using | CapabilityNameAndVersion = CapDesc |
using | Capabilities = std::map< CapabilityNameAndVersion, Capability > |
using | SessionCapabilities = std::map< std::string, SessionCapability > |
Enumerations | |
enum | P2pPacketType { HelloPacket = 0 , DisconnectPacket , PingPacket , PongPacket , UserPacket = 0x10 } |
enum | DisconnectReason { DisconnectRequested = 0 , TCPError , BadProtocol , UselessPeer , TooManyPeers , DuplicatePeer , IncompatibleProtocol , NullIdentity , ClientQuit , UnexpectedIdentity , LocalIdentity , PingTimeout , UserReason = 0x10 , NoDisconnect = 0xffff } |
enum class | HandshakeFailureReason { NoFailure = 0 , UnknownFailure , Timeout , TCPError , FrameDecryptionFailure , InternalError , ProtocolError , DisconnectRequested } |
enum class | PeerType { Optional , Required } |
enum | NodeTableEventType { NodeEntryAdded , NodeEntryDropped , NodeEntryScheduledForEviction } |
Functions | |
char const * | p2pPacketTypeToString (P2pPacketType _packetType) |
bool | isPublicAddress (string const &_addressToCheck) |
bool | isPublicAddress (bi::address const &_addressToCheck) |
bool | isAllowedAddress (bool _allowLocalDiscovery, bi::address const &_addressToCheck) |
bool | isAllowedEndpoint (bool _allowLocalDiscovery, NodeIPEndpoint const &_endpointToCheck) |
bool | isPrivateAddress (bi::address const &_addressToCheck) |
bool | isPrivateAddress (string const &_addressToCheck) |
bool | isLocalHostAddress (bi::address const &_addressToCheck) |
bool | isLocalHostAddress (string const &_addressToCheck) |
string | reasonOf (DisconnectReason _r) |
ostream & | operator<< (ostream &_out, NodeIPEndpoint const &_ep) |
bool | isPrivateAddress (std::string const &_addressToCheck) |
bool | isLocalHostAddress (std::string const &_addressToCheck) |
bool | isPublicAddress (std::string const &_addressToCheck) |
boost::log::formatting_ostream & | operator<< (boost::log::formatting_ostream &_strm, Node const &_node) |
boost::log::formatting_ostream & | operator<< (boost::log::formatting_ostream &_strm, Node &_node) |
std::ostream & | operator<< (std::ostream &_strm, NodeID const &_id) |
boost::log::formatting_ostream & | operator<< (boost::log::formatting_ostream &_strm, PeerSessionInfo const &_peerSessionInfo) |
std::ostream & | operator<< (std::ostream &_out, NodeIPEndpoint const &_ep) |
Simple stream output for a NodeIPEndpoint. More... | |
std::ostream & | operator<< (std::ostream &_out, ENR const &_enr) |
DEV_SIMPLE_EXCEPTION (ENRIsTooBig) | |
DEV_SIMPLE_EXCEPTION (ENRSignatureIsInvalid) | |
DEV_SIMPLE_EXCEPTION (ENRKeysAreNotUniqueSorted) | |
DEV_SIMPLE_EXCEPTION (ENRUnknownIdentityScheme) | |
DEV_SIMPLE_EXCEPTION (ENRSecp256k1NotFound) | |
DEV_SIMPLE_EXCEPTION (ENRInvalidAddress) | |
bool | operator== (std::weak_ptr< NodeEntry > const &_weak, std::shared_ptr< NodeEntry > const &_shared) |
std::ostream & | operator<< (std::ostream &_out, NodeTable const &_nodeTable) |
static bytesConstRef | nextRLP (bytesConstRef _b) |
Variables | |
const NodeIPEndpoint | UnspecifiedNodeIPEndpoint = NodeIPEndpoint{{}, 0, 0} |
const Node | UnspecifiedNode = Node{{}, UnspecifiedNodeIPEndpoint} |
constexpr unsigned | c_protocolVersion = 1029 |
Peer network protocol version. More... | |
constexpr const char * | c_localhostIp = "127.0.0.1" |
constexpr unsigned short | c_defaultListenPort = 30303 |
struct dev::p2p::PeerSessionInfo |
struct dev::p2p::TaraxaNetworkConfig |
using dev::p2p::Capabilities = typedef std::map<CapabilityNameAndVersion, Capability> |
using dev::p2p::CapabilityNameAndVersion = typedef CapDesc |
using dev::p2p::CapDesc = typedef std::pair<std::string, unsigned> |
using dev::p2p::CapDescs = typedef std::vector<CapDesc> |
using dev::p2p::NodeID = typedef h512 |
using dev::p2p::PeerSessionInfos = typedef std::vector<PeerSessionInfo> |
using dev::p2p::SessionCapabilities = typedef std::map<std::string, SessionCapability> |
|
strong |
|
strong |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRInvalidAddress | ) |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRIsTooBig | ) |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRKeysAreNotUniqueSorted | ) |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRSecp256k1NotFound | ) |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRSignatureIsInvalid | ) |
dev::p2p::DEV_SIMPLE_EXCEPTION | ( | ENRUnknownIdentityScheme | ) |
bool dev::p2p::isAllowedAddress | ( | bool | _allowLocalDiscovery, |
bi::address const & | _addressToCheck | ||
) |
bool dev::p2p::isAllowedEndpoint | ( | bool | _allowLocalDiscovery, |
NodeIPEndpoint const & | _endpointToCheck | ||
) |
bool dev::p2p::isLocalHostAddress | ( | bi::address const & | _addressToCheck | ) |
bool dev::p2p::isLocalHostAddress | ( | std::string const & | _addressToCheck | ) |
bool dev::p2p::isLocalHostAddress | ( | string const & | _addressToCheck | ) |
bool dev::p2p::isPrivateAddress | ( | bi::address const & | _addressToCheck | ) |
bool dev::p2p::isPrivateAddress | ( | std::string const & | _addressToCheck | ) |
bool dev::p2p::isPrivateAddress | ( | string const & | _addressToCheck | ) |
bool dev::p2p::isPublicAddress | ( | bi::address const & | _addressToCheck | ) |
bool dev::p2p::isPublicAddress | ( | std::string const & | _addressToCheck | ) |
bool dev::p2p::isPublicAddress | ( | string const & | _addressToCheck | ) |
|
static |
|
inline |
|
inline |
|
inline |
ostream& dev::p2p::operator<< | ( | ostream & | _out, |
NodeIPEndpoint const & | _ep | ||
) |
std::ostream & dev::p2p::operator<< | ( | std::ostream & | _out, |
ENR const & | _enr | ||
) |
std::ostream& dev::p2p::operator<< | ( | std::ostream & | _out, |
NodeIPEndpoint const & | _ep | ||
) |
Simple stream output for a NodeIPEndpoint.
|
inline |
|
inline |
|
inline |
char const * dev::p2p::p2pPacketTypeToString | ( | P2pPacketType | _packetType | ) |
std::string dev::p2p::reasonOf | ( | DisconnectReason | _r | ) |
|
constexpr |
|
constexpr |
|
constexpr |
Peer network protocol version.
const Node dev::p2p::UnspecifiedNode = Node{{}, UnspecifiedNodeIPEndpoint} |
const NodeIPEndpoint dev::p2p::UnspecifiedNodeIPEndpoint = NodeIPEndpoint{{}, 0, 0} |