#include <ICP.h>

Collaboration diagram for icp_common_t:

Public Member Functions

 icp_common_t ()
 icp_common_t (char *buf, unsigned int len)
void handleReply (char *buf, Ip::Address &from)
icp_opcode getOpCode () const

Static Public Member Functions

static icp_common_tCreateMessage (icp_opcode opcode, int flags, const char *url, int reqnum, int pad)

Public Attributes

unsigned char opcode
unsigned char version
unsigned short length
uint32_t reqnum
uint32_t flags
uint32_t pad
uint32_t shostid

Detailed Description

Wire-level ICP header. DO NOT add or move fields. DO NOT add virtual methods.

Definition at line 31 of file ICP.h.

Constructor & Destructor Documentation

icp_common_t::icp_common_t ( )

Definition at line 76 of file icp_v2.cc.

Referenced by CreateMessage(), and handleReply().

icp_common_t::icp_common_t ( char *  buf,
unsigned int  len 

Definition at line 81 of file icp_v2.cc.

References flags, length, pad, and reqnum.

Member Function Documentation

icp_common_t * icp_common_t::CreateMessage ( icp_opcode  opcode,
int  flags,
const char *  url,
int  reqnum,
int  pad 
newly allocated buffer with an ICP message, including header

Definition at line 232 of file icp_v2.cc.

References buf, flags, icp_common_t(), ICP_QUERY, ICP_VERSION_CURRENT, length, NULL, opcode, pad, reqnum, shostid, version, and xcalloc.

Referenced by icpCreateAndSend(), neighborsUdpPing(), and peerCountMcastPeersStart().

icp_opcode icp_common_t::getOpCode ( ) const

Definition at line 101 of file icp_v2.cc.

References ICP_END, ICP_INVALID, and opcode.

Referenced by PeerSelector::handleIcpReply().

void icp_common_t::handleReply ( char *  buf,
Ip::Address from 

Member Data Documentation

uint32_t icp_common_t::flags

Definition at line 41 of file ICP.h.

Referenced by CreateMessage(), doV2Query(), PeerSelector::handleIcpParentMiss(), and icp_common_t().

unsigned short icp_common_t::length

total length (bytes)

Definition at line 38 of file ICP.h.

Referenced by CreateMessage(), icp_common_t(), icpHandleIcpV2(), icpHandleIcpV3(), and icpUdpSend().

uint32_t icp_common_t::pad

Definition at line 42 of file ICP.h.

Referenced by CreateMessage(), PeerSelector::handleIcpParentMiss(), and icp_common_t().

uint32_t icp_common_t::reqnum

req number (req'd for UDP)

Definition at line 40 of file ICP.h.

Referenced by ICP3State::created(), ICP2State::created(), CreateMessage(), doV2Query(), doV3Query(), handleReply(), and icp_common_t().

uint32_t icp_common_t::shostid

sender host id

Definition at line 44 of file ICP.h.

Referenced by CreateMessage().

unsigned char icp_common_t::version

version number

Definition at line 36 of file ICP.h.

Referenced by CreateMessage(), and neighborAlive().

The documentation for this class was generated from the following files:






Web Site Translations