#include <Packet.h>
Inheritance diagram for CPacket:
Public Types | |
enum | { seekStart, seekEnd } |
Public Member Functions | |
virtual void | Reset () |
virtual void | ToBuffer (CBuffer *pBuffer) const =0 |
void | Seek (DWORD nPosition, int nRelative=seekStart) |
void | Shorten (DWORD nLength) |
virtual CString | ReadString (DWORD nMaximum=0xFFFFFFFF) |
virtual void | WriteString (LPCTSTR pszString, BOOL bNull=TRUE) |
virtual int | GetStringLen (LPCTSTR pszString) const |
virtual CString | ReadStringUTF8 (DWORD nMaximum=0xFFFFFFFF) |
virtual void | WriteStringUTF8 (LPCTSTR pszString, BOOL bNull=TRUE) |
virtual int | GetStringLenUTF8 (LPCTSTR pszString) const |
LPBYTE | ReadZLib (DWORD nLength, DWORD *pnOutput, DWORD nSuggest=0) |
void | WriteZLib (LPCVOID pData, DWORD nLength) |
BYTE * | WriteGetPointer (DWORD nLength, DWORD nOffset=0xFFFFFFFF) |
virtual LPCTSTR | GetType () const |
CString | ToHex () const |
CString | ToASCII () const |
virtual void | Debug (LPCTSTR pszReason) const |
void | SmartDump (CNeighbour *pNeighbour, IN_ADDR *pUDP, BOOL bOutgoing) const |
virtual BOOL | GetRazaHash (SHA1 *pHash, DWORD nLength=0xFFFFFFFF) const |
void | RazaSign () |
BOOL | RazaVerify () const |
int | GetRemaining () |
void | Read (LPVOID pData, int nLength) |
BYTE | ReadByte () |
BYTE | PeekByte () |
WORD | ReadShortLE () |
WORD | ReadShortBE () |
DWORD | ReadLongLE () |
DWORD | ReadLongBE () |
QWORD | ReadInt64 () |
void | Ensure (int nLength) |
void | Write (LPCVOID pData, int nLength) |
void | WriteByte (BYTE nValue) |
void | WriteShortLE (WORD nValue) |
void | WriteShortBE (WORD nValue) |
void | WriteLongLE (DWORD nValue) |
void | WriteLongBE (DWORD nValue) |
void | WriteInt64 (QWORD nValue) |
void | AddRef () |
void | Release () |
void | ReleaseChain () |
virtual void | Delete ()=0 |
Public Attributes | |
PROTOCOLID | m_nProtocol |
CPacket * | m_pNext |
DWORD | m_nReference |
BYTE * | m_pBuffer |
DWORD | m_nBuffer |
DWORD | m_nLength |
DWORD | m_nPosition |
BOOL | m_bBigEndian |
Protected Member Functions | |
CPacket (PROTOCOLID nProtocol) | |
virtual | ~CPacket () |
Static Protected Attributes | |
static CHAR | m_szSCHAR [PACKET_BUF_SCHAR+1] |
static WCHAR | m_szWCHAR [PACKET_BUF_WCHAR+1] |
Friends | |
class | CPacketPool |
|
|
|
Definition at line 53 of file Packet.cpp. References m_bBigEndian, m_nBuffer, m_nLength, m_nPosition, m_nProtocol, m_nReference, m_pBuffer, m_pNext, and NULL. |
|
Definition at line 73 of file Packet.cpp. References m_nReference, and m_pBuffer. |
|
Definition at line 385 of file Packet.h. References m_nReference. Referenced by CG1PacketBufferType::Add(), CPacketPool::New(), CBrowseFrameCtrl::OnPhysicalTree(), CBrowseFrameCtrl::OnVirtualTree(), and CG2Neighbour::Send(). |
|
Reimplemented in CEDPacket, CG1Packet, and CG2Packet. Definition at line 492 of file Packet.cpp. References m_nLength, m_pBuffer, CShareazaApp::Message(), MSG_DEBUG, and theApp. Referenced by CG2Packet::Debug(), CG1Packet::Debug(), CEDPacket::Debug(), and CNeighbour::OnCommonHit(). |
|
Implemented in CBTPacket, CEDPacket, CG1Packet, and CG2Packet. Referenced by Release(). |
|
Definition at line 277 of file Packet.h. References m_nBuffer, m_nLength, m_pBuffer, and PACKET_GROW. Referenced by WriteByte(), WriteInt64(), WriteLongBE(), WriteLongLE(), WriteShortBE(), and WriteShortLE(). |
|
Reimplemented in CG1Packet. Definition at line 553 of file Packet.cpp. References CSHA::Add(), CSHA::Finish(), CSHA::GetHash(), m_nLength, and m_pBuffer. |
|
|
Reimplemented in CG2Packet. Definition at line 220 of file Packet.cpp. References NULL. Referenced by CChatSession::SendPrivateMessage(), CEDTag::Write(), CEDPacket::WriteEDString(), and CEDPacket::WriteLongEDString(). |
|
Definition at line 325 of file Packet.cpp. References NULL. Referenced by CChatSession::SendPrivateMessage(), CEDTag::Write(), CEDPacket::WriteEDString(), and CEDPacket::WriteLongEDString(). |
|
Reimplemented in CBTPacket, CEDPacket, CG1Packet, and CG2Packet. Definition at line 426 of file Packet.cpp. References NULL. Referenced by CPacketWnd::Process(). |
|
Definition at line 191 of file Packet.h. References m_nLength, m_nPosition, and m_pBuffer. |
|
Definition at line 570 of file Packet.cpp. Referenced by CG1Neighbour::SendClusterAdvisor(). |
|
Definition at line 576 of file Packet.cpp. Referenced by CG1Neighbour::OnClusterAdvisor(). |
|
|
Definition at line 180 of file Packet.h. References m_nLength, m_nPosition, and m_pBuffer. Referenced by CDownloadTransferBT::OnBitfield(), CEDClient::OnEmuleInfo(), CDownloadTransferED2K::OnFileComment(), CDownloadTransferED2K::OnFileStatus(), CQueryHashTable::OnPatch(), CG1Neighbour::OnPing(), CG1Neighbour::OnPush(), CQueryHashTable::OnReset(), CG2Packet::ReadPacket(), and CG2Packet::SkipCompound(). |
|
Definition at line 262 of file Packet.h. References m_bBigEndian, m_nLength, m_nPosition, m_pBuffer, and SWAP_64. Referenced by CQuerySearch::ReadG2Packet(). |
|
Definition at line 247 of file Packet.h. References m_bBigEndian, m_nLength, m_nPosition, m_pBuffer, and SWAP_LONG. Referenced by CUploadTransferBT::OnCancel(), CDownloadTransferBT::OnHave(), CG2Neighbour::OnKHL(), CG2Neighbour::OnLNI(), CCrawlNode::OnNode(), CDownloadTransferBT::OnPiece(), CDatagrams::OnQueryKeyAnswer(), CQueryHashTable::OnReset(), CBrowseTreeCtrl::OnTreePacket(), and CQuerySearch::ReadG2Packet(). |
|
|
Definition at line 217 of file Packet.h. References m_bBigEndian, m_nLength, m_nPosition, m_pBuffer, and SWAP_SHORT. Referenced by CG2Neighbour::OnKHL(), CG2Neighbour::OnLNI(), CCrawlNode::OnNode(), CG2Neighbour::OnPing(), CG2Neighbour::OnPush(), CDatagrams::OnPush(), CDatagrams::OnQueryKeyRequest(), and CQuerySearch::ReadG2Packet(). |
|
|
Reimplemented in CG2Packet. Definition at line 134 of file Packet.cpp. References m_nLength, m_nPosition, m_pBuffer, and NULL. Referenced by CChatSession::OnChatMessage(), CDownloadTransferED2K::OnFileComment(), CEDPacket::ReadEDString(), and CEDPacket::ReadLongEDString(). |
|
Definition at line 239 of file Packet.cpp. References m_nLength, m_nPosition, m_pBuffer, and NULL. Referenced by CChatSession::OnChatMessage(), CDownloadTransferED2K::OnFileComment(), CEDPacket::ReadEDString(), and CEDPacket::ReadLongEDString(). |
|
Definition at line 344 of file Packet.cpp. References CZLib::Decompress(), m_nLength, m_nPosition, m_pBuffer, and NULL. |
|
|
Definition at line 399 of file Packet.h. References NULL. |
|
Reimplemented in CG2Packet. Definition at line 86 of file Packet.cpp. References m_bBigEndian, m_nLength, m_nPosition, m_nReference, m_pNext, and NULL. Referenced by CPacketPool::New(), and CG2Packet::Reset(). |
|
Definition at line 103 of file Packet.cpp. References m_nLength, m_nPosition, and seekStart. |
|
Definition at line 121 of file Packet.cpp. References m_nLength, and m_nPosition. Referenced by CG1Neighbour::OnPush(). |
|
Definition at line 524 of file Packet.cpp. References CWindowManager::Find(), CShareazaApp::m_pSafeWnd, CShareazaApp::m_pSection, NULL, CPacketWnd::Process(), and theApp. Referenced by CDatagrams::OnDatagram(), CG2Neighbour::OnPacket(), CG1Neighbour::OnPacket(), CDatagrams::OnPacket(), CG2Neighbour::Send(), CG1Neighbour::Send(), and CDatagrams::Send(). |
|
Definition at line 465 of file Packet.cpp. References m_nLength, and m_pBuffer. Referenced by CG2Packet::Debug(), CG1Packet::Debug(), CEDPacket::Debug(), and CPacketWnd::Process(). |
|
Implemented in CBTPacket, CEDPacket, CG1Packet, and CG2Packet. Referenced by CLocalSearch::DispatchPacket(), and CG2Neighbour::Send(). |
|
Definition at line 434 of file Packet.cpp. References m_nLength, and m_pBuffer. Referenced by CPacketWnd::Process(). |
|
|
|
Definition at line 388 of file Packet.cpp. References m_nBuffer, m_nLength, m_pBuffer, and PACKET_GROW. Referenced by CGProfile::CreateAvatar(), CG2Neighbour::OnPing(), CDatagrams::OnQueryKeyAnswer(), CEDClient::OnSourceRequest(), and CNeighboursWithRouting::RouteQuery(). |
|
Definition at line 372 of file Packet.h. References Ensure(), m_bBigEndian, m_nBuffer, m_nLength, m_pBuffer, and SWAP_64. Referenced by CLocalSearch::AddHit(), CLocalSearch::AddHitG2(), and CQuerySearch::ToG2Packet(). |
|
|
|
|
|
Reimplemented in CG2Packet. Definition at line 183 of file Packet.cpp. References m_szSCHAR, NULL, PACKET_BUF_SCHAR, and Write(). Referenced by CLocalSearch::AddHitG1(), CChatSession::SendPrivateMessage(), CQuerySearch::ToG1Packet(), CEDTag::Write(), CEDPacket::WriteEDString(), CEDPacket::WriteLongEDString(), and CLocalSearch::WriteTrailerG1(). |
|
Definition at line 288 of file Packet.cpp. References m_szSCHAR, NULL, PACKET_BUF_SCHAR, and Write(). Referenced by CLocalSearch::AddHitG1(), CChatSession::SendPrivateMessage(), CQuerySearch::ToG1Packet(), CEDTag::Write(), CEDPacket::WriteEDString(), and CEDPacket::WriteLongEDString(). |
|
Definition at line 366 of file Packet.cpp. References CZLib::Compress(), and Write(). Referenced by CQueryHashTable::PatchToOldShareaza(). |
|
|
|
Definition at line 82 of file Packet.h. Referenced by CG2Packet::CG2Packet(), CPacket(), CG2Packet::New(), CDatagrams::OnQueryKeyAnswer(), ReadInt64(), ReadLongBE(), CG2Packet::ReadPacket(), ReadShortBE(), Reset(), CG2Packet::Reset(), CNeighboursWithRouting::RouteQuery(), CG2Packet::SkipCompound(), CG2Packet::ToBuffer(), WriteInt64(), WriteLongBE(), CG2Packet::WritePacket(), and WriteShortBE(). |
|
Definition at line 79 of file Packet.h. Referenced by CPacket(), Ensure(), CEDPacket::InflateOrRelease(), Write(), WriteByte(), WriteGetPointer(), WriteInt64(), WriteLongBE(), WriteLongLE(), WriteShortBE(), and WriteShortLE(). |
|
|
|
|
Definition at line 73 of file Packet.h. Referenced by AddRef(), CPacket(), CPacketPool::Delete(), Release(), Reset(), and ~CPacket(). |
|
|
Definition at line 72 of file Packet.h. Referenced by CPacket(), CPacketPool::Delete(), CPacketPool::New(), CPacketPool::NewPool(), and Reset(). |
|
Definition at line 45 of file Packet.cpp. Referenced by WriteString(), CG2Packet::WriteString(), and WriteStringUTF8(). |
|
Definition at line 46 of file Packet.cpp. |