Pol  Revision:cb584c9
packethooks.cpp File Reference
#include "packethooks.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "../../clib/cfgelem.h"
#include "../../clib/clib.h"
#include "../../clib/clib_endian.h"
#include "../../clib/logfacility.h"
#include "../../clib/rawtypes.h"
#include "../../clib/refptr.h"
#include "../../clib/strutil.h"
#include "../../plib/pkg.h"
#include "../globals/network.h"
#include "../mobile/charactr.h"
#include "../packetscrobj.h"
#include "../syshook.h"
#include "client.h"

Go to the source code of this file.




void Pol::Network::CallOutgoingPacketExportedFunction (Client *client, const void *&data, int &inlength, ref_ptr< Core::BPacket > &outpacket, PacketHookData *phd, bool &handled)
void Pol::Network::clean_packethooks ()
bool Pol::Network::CompareVersionDetail (VersionDetailStruct ver1, VersionDetailStruct ver2)
void Pol::Network::ExportedPacketHookHandler (Client *client, void *data)
PacketHookData * Pol::Network::get_packethook (u8 msgid, PacketVersion version=PacketVersion::Default)
PacketHookData * Pol::Network::get_packethook (u8 msgid, const Client *client)
bool Pol::Network::GetAndCheckPacketHooked (Client *client, const void *&data, PacketHookData *&phd)
u32 Pol::Network::GetSubCmd (const unsigned char *message, PacketHookData *phd)
static bool Pol::Network::is_fixed_length (const PacketHookData *phd)
void Pol::Network::load_packet_entries (const Plib::Package *pkg, Clib::ConfigElem &elem)
void Pol::Network::load_packet_hooks ()
static int Pol::Network::load_packethook_length (Clib::ConfigElem &elem)
static PacketVersion Pol::Network::load_packethook_version (Clib::ConfigElem &elem)
void Pol::Network::load_subpacket_entries (const Plib::Package *pkg, Clib::ConfigElem &elem)
static void Pol::Network::packethook_assert_valid_parent (u8 id, const PacketHookData *parent, const Clib::ConfigElem &elem)
static void Pol::Network::packethook_warn_if_previously_defined (u8 msgid, PacketVersion pktversion)
void Pol::Network::SetVersionDetailStruct (const std::string &ver, VersionDetailStruct &detail)

Detailed Description

  • 2006/05/23 Shinigami: added missing Check to ExportedPacketHookHandler() for missing default_handler in Packets with SubCommands
  • 2007/08/19 Shinigami: fixed Memory Leak in PacketHook functions
  • 2009/08/03 MuadDib: Renaming of MSG_HANDLER_6017 and related, to MSG_HANDLER_V2 for better description Renamed secondary handler class to *_V2 for naming convention
  • 2009/08/25 Shinigami: STLport-5.2.1 fix: params in call of Log2()
  • 2009/09/03 MuadDib: Relocation of account related cpp/h
Version member: Positive Integer. This is used to translate the "version" of the packet structure to the correct internal core Message Handler (Default 1, which translates to use handler[]). Each new Handler added to the core needs a new Version number here. As of 8/3/09 there is only 2.

Definition in file packethooks.cpp.