#include <ICP.h>
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_t * | CreateMessage (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.
Constructor & Destructor Documentation
◆ icp_common_t() [1/2]
icp_common_t::icp_common_t | ( | ) |
Definition at line 104 of file icp_v2.cc.
Referenced by CreateMessage(), and handleReply().
◆ icp_common_t() [2/2]
icp_common_t::icp_common_t | ( | char * | buf, |
unsigned int | len | ||
) |
Member Function Documentation
◆ CreateMessage()
|
static |
- Returns
- newly allocated buffer with an ICP message, including header
Definition at line 271 of file icp_v2.cc.
References icp_common_t(), flags, ICP_QUERY, ICP_VERSION_CURRENT, length, opcode, pad, reqnum, shostid, version, and xcalloc().
Referenced by icpCreateAndSend().
◆ getOpCode()
icp_opcode icp_common_t::getOpCode | ( | ) | const |
Definition at line 129 of file icp_v2.cc.
References ICP_END, ICP_INVALID, and opcode.
Referenced by PeerSelector::handleIcpReply(), icpHandleIcpV2(), and icpHandleIcpV3().
◆ handleReply()
void icp_common_t::handleReply | ( | char * | buf, |
Ip::Address & | from | ||
) |
Definition at line 540 of file icp_v2.cc.
References icp_common_t(), DBG_CRITICAL, debugs, icp_opcode_str, icpGetCacheKey(), neighbors_do_private_keys, neighborsUdpAck(), opcode, and reqnum.
Referenced by icpHandleIcpV2(), and icpHandleIcpV3().
Member Data Documentation
◆ flags
uint32_t icp_common_t::flags |
Definition at line 45 of file ICP.h.
Referenced by icp_common_t(), CreateMessage(), doV2Query(), and PeerSelector::handleIcpParentMiss().
◆ length
unsigned short icp_common_t::length |
total length (bytes)
Definition at line 42 of file ICP.h.
Referenced by icp_common_t(), CreateMessage(), icpHandleIcpV2(), icpHandleIcpV3(), and icpUdpSend().
◆ opcode
unsigned char icp_common_t::opcode |
opcode
Definition at line 38 of file ICP.h.
Referenced by CreateMessage(), getOpCode(), handleReply(), icpCount(), icpHandleIcpV2(), icpHandleIcpV3(), icpUdpSend(), neighborAlive(), and neighborsUdpAck().
◆ pad
uint32_t icp_common_t::pad |
Definition at line 46 of file ICP.h.
Referenced by icp_common_t(), CreateMessage(), and PeerSelector::handleIcpParentMiss().
◆ reqnum
uint32_t icp_common_t::reqnum |
req number (req'd for UDP)
Definition at line 44 of file ICP.h.
Referenced by icp_common_t(), CreateMessage(), doV2Query(), doV3Query(), and handleReply().
◆ shostid
uint32_t icp_common_t::shostid |
◆ version
unsigned char icp_common_t::version |
version number
Definition at line 40 of file ICP.h.
Referenced by CreateMessage(), and neighborAlive().
The documentation for this class was generated from the following files: