Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
Common.h File Reference
#include <string>
#include <set>
#include <vector>
#include <boost/asio.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <chrono>
#include <libdevcrypto/Common.h>
#include <libdevcore/Log.h>
#include <libdevcore/Exceptions.h>
#include <libdevcore/RLP.h>
#include <libdevcore/Guards.h>
Include dependency graph for Common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dev::p2p::NetworkStartRequired
 
struct  dev::p2p::InvalidPublicIPAddress
 
struct  dev::p2p::InvalidHostIPAddress
 
struct  dev::p2p::NetWarn
 
struct  dev::p2p::NetNote
 
struct  dev::p2p::NetImpolite
 
struct  dev::p2p::NetMessageSummary
 
struct  dev::p2p::NetConnect
 
struct  dev::p2p::NetMessageDetail
 
struct  dev::p2p::NetTriviaSummary
 
struct  dev::p2p::NetTriviaDetail
 
struct  dev::p2p::NetAllDetail
 
struct  dev::p2p::NetRight
 
struct  dev::p2p::NetLeft
 
struct  dev::p2p::NetP2PWarn
 
struct  dev::p2p::NetP2PNote
 
struct  dev::p2p::NetP2PConnect
 
struct  dev::p2p::PeerSessionInfo
 
class  dev::p2p::NodeIPEndpoint
 IPv4,UDP/TCP endpoints. More...
 
struct  dev::p2p::NodeSpec
 
class  dev::p2p::Node
 
class  dev::p2p::DeadlineOps
 
class  dev::p2p::DeadlineOps::DeadlineOp
 
struct  std::hash< bi::address >
 

Namespaces

 dev
 Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Originally by RenĂ© Nyffenegger.
 
 dev::p2p
 
 std
 std::hash for asio::adress
 

Typedefs

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

Enumerations

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

Functions

bool dev::p2p::isPrivateAddress (bi::address const &_addressToCheck)
 
bool dev::p2p::isPrivateAddress (std::string const &_addressToCheck)
 
bool dev::p2p::isLocalHostAddress (bi::address const &_addressToCheck)
 
bool dev::p2p::isLocalHostAddress (std::string const &_addressToCheck)
 
bool dev::p2p::isPublicAddress (bi::address const &_addressToCheck)
 
bool dev::p2p::isPublicAddress (std::string const &_addressToCheck)
 
bool dev::p2p::isPermanentProblem (DisconnectReason _r)
 
std::string dev::p2p::reasonOf (DisconnectReason _r)
 
std::ostream & dev::operator<< (std::ostream &_out, dev::p2p::NodeIPEndpoint const &_ep)
 Simple stream output for a NodeIPEndpoint. More...
 

Variables

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