Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Typedefs | Enumerations | Functions | Variables
dev::p2p Namespace Reference

Classes

class  Capability
 
class  DeadlineOps
 
struct  DiscoveryDatagram
 
struct  FindNode
 FindNode Packet: Request k-nodes, closest to the target. More...
 
class  Host
 The Host class Capabilities should be registered prior to startNetwork, since m_capabilities is not thread-safe. More...
 
class  HostCapability
 
class  HostCapabilityFace
 
class  HostNodeTableHandler
 
struct  InvalidHostIPAddress
 
struct  InvalidPublicIPAddress
 
struct  Neighbours
 Node Packet: One or more node packets are sent in response to FindNode. More...
 
struct  NetAllDetail
 
struct  NetConnect
 
struct  NetImpolite
 
struct  NetLeft
 
struct  NetMessageDetail
 
struct  NetMessageSummary
 
struct  NetNote
 
struct  NetP2PConnect
 
struct  NetP2PNote
 
struct  NetP2PWarn
 
struct  NetRight
 
struct  NetTriviaDetail
 
struct  NetTriviaSummary
 
struct  NetWarn
 
class  Network
 Network Class Static network operations and interface(s). More...
 
struct  NetworkPreferences
 
struct  NetworkStartRequired
 
class  Node
 
struct  NodeEntry
 NodeEntry. More...
 
struct  NodeInfo
 
class  NodeIPEndpoint
 IPv4,UDP/TCP endpoints. More...
 
struct  NodeSpec
 
class  NodeTable
 NodeTable using modified kademlia for node discovery and preference. More...
 
struct  NodeTableAllDetail
 
struct  NodeTableConnect
 
struct  NodeTableEgress
 
struct  NodeTableEvent
 
class  NodeTableEventHandler
 
struct  NodeTableIngress
 
struct  NodeTableMessageDetail
 
struct  NodeTableMessageSummary
 
struct  NodeTableNote
 
struct  NodeTableTimer
 
struct  NodeTableTriviaDetail
 
struct  NodeTableTriviaSummary
 
struct  NodeTableUpdate
 
struct  NodeTableWarn
 
class  Peer
 Representation of connectivity state and all other pertinent Peer metadata. More...
 
struct  PeerSessionInfo
 
struct  PingNode
 Ping packet: Sent to check if node is alive. More...
 
struct  Pong
 Pong packet: Sent in response to ping. More...
 
struct  Reputation
 
class  ReputationManager
 
struct  RLPXDatagramFace
 RLPX Datagram which can be signed. More...
 
class  RLPXFrameCoder
 Encoder/decoder transport for RLPx connection established by RLPXHandshake. More...
 
class  RLPXFrameCoderImpl
 
struct  RLPXFrameDecryptFailed
 
struct  RLPXFrameInfo
 Encapsulation of Frame. More...
 
class  RLPXFrameReader
 RLPFrameReader Reads and assembles RLPX frame byte buffers into RLPX packets. More...
 
class  RLPXFrameWriter
 Multiplex packets into encrypted RLPX frames. More...
 
class  RLPXHandshake
 Setup inbound or outbound connection for communication over RLPXFrameCoder. More...
 
struct  RLPXInvalidPacket
 
struct  RLPXNote
 
class  RLPXPacket
 RLPX Packet. More...
 
class  RLPXSocket
 Shared pointer wrapper for ASIO TCP socket. More...
 
class  RLPXSocketIO
 
struct  RLPXWarn
 
class  Session
 The Session class. More...
 
class  SessionFace
 
struct  SubReputation
 
class  UDPDatagram
 UDP Datagram. More...
 
class  UDPSocket
 UDP Interface Handler must implement UDPSocketEvents. More...
 
struct  UDPSocketEvents
 Interface which a UDPSocket's owner must implement. More...
 
struct  UDPSocketFace
 Interface which UDPSocket will implement. More...
 
class  UPnP
 

Typedefs

using NodeID = h512
 
using CapDesc = std::pair< std::string, u256 >
 
using CapDescSet = std::set< CapDesc >
 
using CapDescs = std::vector< CapDesc >
 
using PeerSessionInfos = std::vector< PeerSessionInfo >
 
using Peers = std::vector< Peer >
 

Enumerations

enum  PacketType {
  HelloPacket = 0, DisconnectPacket, PingPacket, PongPacket,
  GetPeersPacket, PeersPacket, UserPacket = 0x10
}
 
enum  DisconnectReason {
  DisconnectRequested = 0, TCPError, BadProtocol, UselessPeer,
  TooManyPeers, DuplicatePeer, IncompatibleProtocol, NullIdentity,
  ClientQuit, UnexpectedIdentity, LocalIdentity, PingTimeout,
  UserReason = 0x10, NoDisconnect = 0xffff
}
 
enum  PeerType { PeerType::Optional, PeerType::Required }
 
enum  NodeTableEventType { NodeEntryAdded, NodeEntryDropped }
 

Functions

bool isPrivateAddress (bi::address const &_addressToCheck)
 
bool isPrivateAddress (std::string const &_addressToCheck)
 
bool isLocalHostAddress (bi::address const &_addressToCheck)
 
bool isLocalHostAddress (std::string const &_addressToCheck)
 
bool isPublicAddress (bi::address const &_addressToCheck)
 
bool isPublicAddress (std::string const &_addressToCheck)
 
bool isPermanentProblem (DisconnectReason _r)
 
std::string reasonOf (DisconnectReason _r)
 
std::ostream & operator<< (std::ostream &_out, NodeTable const &_nodeTable)
 
template<class PeerCap >
std::shared_ptr< PeerCap > capabilityFromSession (SessionFace const &_session, u256 const &_version=PeerCap::version())
 
Json::Value toJson (p2p::PeerSessionInfo const &_p)
 

Variables

const unsigned c_protocolVersion = 4
 Peer network protocol version. More...
 
const unsigned c_defaultIPPort = 30303
 
const NodeIPEndpoint UnspecifiedNodeIPEndpoint = NodeIPEndpoint(bi::address(), 0, 0)
 
const Node UnspecifiedNode = dev::p2p::Node(NodeID(), UnspecifiedNodeIPEndpoint)
 

Typedef Documentation

using dev::p2p::CapDesc = typedef std::pair<std::string, u256>

Definition at line 142 of file Common.h.

using dev::p2p::CapDescs = typedef std::vector<CapDesc>

Definition at line 144 of file Common.h.

using dev::p2p::CapDescSet = typedef std::set<CapDesc>

Definition at line 143 of file Common.h.

using dev::p2p::NodeID = typedef h512

Definition at line 62 of file Common.h.

using dev::p2p::Peers = typedef std::vector<Peer>

Definition at line 99 of file Peer.h.

using dev::p2p::PeerSessionInfos = typedef std::vector<PeerSessionInfo>

Definition at line 164 of file Common.h.

Enumeration Type Documentation

Enumerator
DisconnectRequested 
TCPError 
BadProtocol 
UselessPeer 
TooManyPeers 
DuplicatePeer 
IncompatibleProtocol 
NullIdentity 
ClientQuit 
UnexpectedIdentity 
LocalIdentity 
PingTimeout 
UserReason 
NoDisconnect 

Definition at line 106 of file Common.h.

Enumerator
NodeEntryAdded 
NodeEntryDropped 

Definition at line 48 of file NodeTable.h.

Enumerator
HelloPacket 
DisconnectPacket 
PingPacket 
PongPacket 
GetPeersPacket 
PeersPacket 
UserPacket 

Definition at line 95 of file Common.h.

enum dev::p2p::PeerType
strong
Enumerator
Optional 
Required 

Definition at line 166 of file Common.h.

Function Documentation

template<class PeerCap >
std::shared_ptr<PeerCap> dev::p2p::capabilityFromSession ( SessionFace const &  _session,
u256 const &  _version = PeerCap::version() 
)

Definition at line 196 of file Session.h.

Here is the call graph for this function:

bool dev::p2p::isLocalHostAddress ( bi::address const &  _addressToCheck)

Definition at line 116 of file Common.cpp.

Here is the caller graph for this function:

bool dev::p2p::isLocalHostAddress ( std::string const &  _addressToCheck)

Definition at line 129 of file Common.cpp.

Here is the call graph for this function:

bool dev::p2p::isPermanentProblem ( DisconnectReason  _r)
inline

Definition at line 124 of file Common.h.

Here is the call graph for this function:

bool dev::p2p::isPrivateAddress ( bi::address const &  _addressToCheck)

Definition at line 84 of file Common.cpp.

Here is the caller graph for this function:

bool dev::p2p::isPrivateAddress ( std::string const &  _addressToCheck)

Definition at line 110 of file Common.cpp.

Here is the call graph for this function:

bool dev::p2p::isPublicAddress ( bi::address const &  _addressToCheck)

Definition at line 76 of file Common.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool dev::p2p::isPublicAddress ( std::string const &  _addressToCheck)

Definition at line 71 of file Common.cpp.

Here is the call graph for this function:

std::ostream & dev::p2p::operator<< ( std::ostream &  _out,
NodeTable const &  _nodeTable 
)
inline

Definition at line 270 of file NodeTable.h.

Here is the call graph for this function:

std::string dev::p2p::reasonOf ( DisconnectReason  _r)
Returns
the string form of the given disconnection reason.

Definition at line 134 of file Common.cpp.

Here is the caller graph for this function:

Json::Value dev::p2p::toJson ( p2p::PeerSessionInfo const &  _p)

Definition at line 68 of file JsonHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const unsigned dev::p2p::c_defaultIPPort = 30303

Definition at line 29 of file Common.cpp.

const unsigned dev::p2p::c_protocolVersion = 4

Peer network protocol version.

Peer network protocol version.

Definition at line 28 of file Common.cpp.

const dev::p2p::Node dev::p2p::UnspecifiedNode = dev::p2p::Node(NodeID(), UnspecifiedNodeIPEndpoint)

Definition at line 33 of file Common.cpp.

const dev::p2p::NodeIPEndpoint dev::p2p::UnspecifiedNodeIPEndpoint = NodeIPEndpoint(bi::address(), 0, 0)

Definition at line 32 of file Common.cpp.