Dash Core  0.12.2.1
P2P Digital Currency
protocol.cpp File Reference
#include "protocol.h"
#include "util.h"
#include "utilstrencodings.h"
#include <arpa/inet.h>

Go to the source code of this file.

Namespaces

 NetMsgType
 

Functions

static const std::vector< std::string > allNetMessageTypesVec (allNetMessageTypes, allNetMessageTypes+ARRAYLEN(allNetMessageTypes))
 
bool operator< (const CInv &a, const CInv &b)
 
const std::vector< std::string > & getAllNetMessageTypes ()
 

Variables

const char * NetMsgType::VERSION ="version"
 
const char * NetMsgType::VERACK ="verack"
 
const char * NetMsgType::ADDR ="addr"
 
const char * NetMsgType::INV ="inv"
 
const char * NetMsgType::GETDATA ="getdata"
 
const char * NetMsgType::MERKLEBLOCK ="merkleblock"
 
const char * NetMsgType::GETBLOCKS ="getblocks"
 
const char * NetMsgType::GETHEADERS ="getheaders"
 
const char * NetMsgType::TX ="tx"
 
const char * NetMsgType::HEADERS ="headers"
 
const char * NetMsgType::BLOCK ="block"
 
const char * NetMsgType::GETADDR ="getaddr"
 
const char * NetMsgType::MEMPOOL ="mempool"
 
const char * NetMsgType::PING ="ping"
 
const char * NetMsgType::PONG ="pong"
 
const char * NetMsgType::ALERT ="alert"
 
const char * NetMsgType::NOTFOUND ="notfound"
 
const char * NetMsgType::FILTERLOAD ="filterload"
 
const char * NetMsgType::FILTERADD ="filteradd"
 
const char * NetMsgType::FILTERCLEAR ="filterclear"
 
const char * NetMsgType::REJECT ="reject"
 
const char * NetMsgType::SENDHEADERS ="sendheaders"
 
const char * NetMsgType::TXLOCKREQUEST ="ix"
 
const char * NetMsgType::TXLOCKVOTE ="txlvote"
 
const char * NetMsgType::SPORK ="spork"
 
const char * NetMsgType::GETSPORKS ="getsporks"
 
const char * NetMsgType::MASTERNODEPAYMENTVOTE ="mnw"
 
const char * NetMsgType::MASTERNODEPAYMENTBLOCK ="mnwb"
 
const char * NetMsgType::MASTERNODEPAYMENTSYNC ="mnget"
 
const char * NetMsgType::MNBUDGETSYNC ="mnvs"
 
const char * NetMsgType::MNBUDGETVOTE ="mvote"
 
const char * NetMsgType::MNBUDGETPROPOSAL ="mprop"
 
const char * NetMsgType::MNBUDGETFINAL ="fbs"
 
const char * NetMsgType::MNBUDGETFINALVOTE ="fbvote"
 
const char * NetMsgType::MNQUORUM ="mn quorum"
 
const char * NetMsgType::MNANNOUNCE ="mnb"
 
const char * NetMsgType::MNPING ="mnp"
 
const char * NetMsgType::DSACCEPT ="dsa"
 
const char * NetMsgType::DSVIN ="dsi"
 
const char * NetMsgType::DSFINALTX ="dsf"
 
const char * NetMsgType::DSSIGNFINALTX ="dss"
 
const char * NetMsgType::DSCOMPLETE ="dsc"
 
const char * NetMsgType::DSSTATUSUPDATE ="dssu"
 
const char * NetMsgType::DSTX ="dstx"
 
const char * NetMsgType::DSQUEUE ="dsq"
 
const char * NetMsgType::DSEG ="dseg"
 
const char * NetMsgType::SYNCSTATUSCOUNT ="ssc"
 
const char * NetMsgType::MNGOVERNANCESYNC ="govsync"
 
const char * NetMsgType::MNGOVERNANCEOBJECT ="govobj"
 
const char * NetMsgType::MNGOVERNANCEOBJECTVOTE ="govobjvote"
 
const char * NetMsgType::MNVERIFY ="mnv"
 
static const char * ppszTypeName []
 
static const std::string allNetMessageTypes []
 

Function Documentation

◆ allNetMessageTypesVec()

static const std::vector<std::string> allNetMessageTypesVec ( allNetMessageTypes  ,
allNetMessageTypes ARRAYLENallNetMessageTypes 
)
static

Referenced by getAllNetMessageTypes().

◆ getAllNetMessageTypes()

const std::vector<std::string>& getAllNetMessageTypes ( )

Definition at line 275 of file protocol.cpp.

Referenced by CNode::CNode(), and ProcessMessage().

◆ operator<()

bool operator< ( const CInv a,
const CInv b 
)

Definition at line 249 of file protocol.cpp.

Variable Documentation

◆ allNetMessageTypes

const std::string allNetMessageTypes[]
static

All known message types. Keep this in the same order as the list of messages above and in protocol.h.

Definition at line 99 of file protocol.cpp.

◆ ppszTypeName

const char* ppszTypeName[]
static
Initial value:
=
{
"ERROR",
"filtered block",
}
const char * MNPING
Definition: protocol.cpp:53
const char * DSTX
Definition: protocol.cpp:60
const char * MASTERNODEPAYMENTVOTE
Definition: protocol.cpp:43
const char * MASTERNODEPAYMENTBLOCK
Definition: protocol.cpp:44
const char * BLOCK
Definition: protocol.cpp:26
const char * TX
Definition: protocol.cpp:24
const char * MNQUORUM
Definition: protocol.cpp:51
const char * MNVERIFY
Definition: protocol.cpp:67
const char * TXLOCKVOTE
Definition: protocol.cpp:40
const char * MNBUDGETVOTE
Definition: protocol.cpp:47
const char * MNGOVERNANCEOBJECT
Definition: protocol.cpp:65
const char * SPORK
Definition: protocol.cpp:41
const char * MNBUDGETPROPOSAL
Definition: protocol.cpp:48
const char * TXLOCKREQUEST
Definition: protocol.cpp:39
const char * MNGOVERNANCEOBJECTVOTE
Definition: protocol.cpp:66
const char * MNBUDGETFINALVOTE
Definition: protocol.cpp:50
const char * MNBUDGETFINAL
Definition: protocol.cpp:49
const char * MNANNOUNCE
Definition: protocol.cpp:52

Definition at line 70 of file protocol.cpp.

Referenced by CInv::CInv(), CInv::GetCommand(), and CInv::IsKnownType().