Old Wiki:Receiving and Decoding Packets incoming from Clients
EVEmu Packet Receiving and Decoding
RECEIVING PACKETS, PROCESSING, AND DISPATCHING:
14:07 descention packets seem to be in a format of: type,source,dest,userID,payload,options 14:08 descention which might be of these types (in order):int,tuple,tuple,int,buffer,dict 14:09 descention i'm not sure about the source,dest types 14:18 shanemse tuple is python code.. 14:18 shanemse http://en.wikibooks.org/wiki/Python_Programming/Tuples 14:22 descention in c++ objects: PyInt?,PyTuple?,PyTuple?,PyInt?,PyBuffer?,PyDict? 14:22 descention the PyTuples? might be PyAddress? 14:24 descention I figured out most of that from the packet encode. line 267 of PyPacket?.cpp
main.cpp Super-loop - the while() loop near the end of the file inside main() line 228: sEntityList.Process()
? ? ? EntityList::Process() line 69: if(!active_client->ProcessNet?())
? ? ? Client::ProcessNet?() line 106: if( DispatchPacket( p ) )
? ? ? EVEPktDispatch::DispatchPacket?() line 37: switch on PyPacket::type of type MACHONETMSG_TYPE
case MACHONETMSG_TYPE::AUTHENTICATION_REQ:
AuthenticationReq::Decode( packet->payload ) - payload is a PyTuple? inside the packet EVEPacketDispatcher::Handle_AuthenticationReq() - packet and its decoded form are passed into here
case MACHONETMSG_TYPE::AUTHENTICATION_RSP:
AuthenticationRsp::Decode( packet->payload ) - payload is a PyTuple? inside the packet EVEPacketDispatcher::Handle_AuthenticationRsp() - packet and its decoded form are passed into here
case MACHONETMSG_TYPE::CALL_REQ:
PyCallStream::Decode( packet->type_string, packet->payload ) - payload is a PyTuple? inside the packet EVEPacketDispatcher::Handle_CallReq() - packet and its decoded form are passed into here
case MACHONETMSG_TYPE::CALL_RSP:
TODO: decode substream in tuple EVEPacketDispatcher::Handle_CallRsp() - packet and its decoded form are passed into here
case MACHONETMSG_TYPE::NOTIFICATION:
EVEPacketDispatcher::Handle_Notify() - packet and its decoded form are passed into here
case MACHONETMSG_TYPE::ERRORRESPONSE:
ErrorResponse::Decode( packet->payload ) - payload is a PyTuple? inside the packet EVEPacketDispatcher::Handle_ErrorResponse() - packet and its decoded form are passed into here
case MACHONETMSG_TYPE::SESSIONCHANGENOTIFICATION:
SessionChangeNotification::Decode( packet->payload ) - payload is a PyTuple? inside the packet EVEPacketDispatcher::Handle_SessionChange() - packet and its decoded form are passed into here
case MACHONETMSG_TYPE::PING_REQ:
EVEPacketDispatcher::Handle_PingReq() - packet and its decoded form are passed into here
case MACHONETMSG_TYPE::PING_RSP:
EVEPacketDispatcher::Handle_PingRsp() - packet and its decoded form are passed into here
? ? ? ( what goes here? )
? ? ? various services' Handle_xxx() functions, such as LSCService::Handle_GetChannels()