#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 35 of file ICP.h.

Constructor & Destructor Documentation

◆ icp_common_t() [1/2]

icp_common_t::icp_common_t ( )

Definition at line 107 of file icp_v2.cc.

◆ icp_common_t() [2/2]

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

Definition at line 112 of file icp_v2.cc.

References flags, length, pad, and reqnum.

Member Function Documentation

◆ CreateMessage()

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 295 of file icp_v2.cc.

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

Referenced by icpCreateAndSend().

◆ getOpCode()

icp_opcode icp_common_t::getOpCode ( ) const

Definition at line 132 of file icp_v2.cc.

References ICP_END, ICP_INVALID, and opcode.

Referenced by PeerSelector::handleIcpReply().

◆ handleReply()

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

Member Data Documentation

◆ flags

uint32_t icp_common_t::flags

◆ length

unsigned short icp_common_t::length

total length (bytes)

Definition at line 42 of file ICP.h.

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

◆ opcode

unsigned char icp_common_t::opcode

◆ pad

uint32_t icp_common_t::pad

Definition at line 46 of file ICP.h.

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

◆ reqnum

uint32_t icp_common_t::reqnum

req number (req'd for UDP)

Definition at line 44 of file ICP.h.

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

◆ shostid

uint32_t icp_common_t::shostid

sender host id

Definition at line 48 of file ICP.h.

Referenced by CreateMessage().

◆ version

unsigned char icp_common_t::version

version number

Definition at line 40 of file ICP.h.

Referenced by CreateMessage(), icpHandleIcpV2(), and neighborAlive().

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






Web Site Translations