123 lines
3.0 KiB
C
123 lines
3.0 KiB
C
|
|
/* vim: set filetype=c ts=8 noexpandtab: */
|
|
|
|
#define RP_PARSE_CONNECTION_REQ ((void*) 0x4591D0)
|
|
|
|
#define NO_ACTION 0
|
|
#define DISCONNECT_ASAP 1
|
|
#define DISCONNECT_ASAP_SILENTLY 2
|
|
#define DISCONNECT_ON_NO_ACK 3
|
|
#define REQUESTED_CONNECTION 4
|
|
#define HANDLING_CONNECTION_REQUEST 5
|
|
#define UNVERIFIED_SENDER 6
|
|
#define SET_ENCRYPTION_ON_MULTIPLE_16_BYTE_PACKET 7
|
|
#define CONNECTED 8
|
|
|
|
#define ID_CONNECTION_REQUEST 0x0B
|
|
#define ID_OPEN_CONNECTION_REQUEST 0x18
|
|
#define ID_OPEN_CONNECTION_REPLY 0x19
|
|
#define ID_CONNECTION_ATTEMPT_FAILED 0x1D /*results in server did not respond*/
|
|
#define ID_NEW_INCOMING_CONNECTION 0x1E
|
|
#define ID_NO_FREE_INCOMING_CONNECTIONS 0x1F
|
|
#define ID_CONNECTION_BANNED 0x24
|
|
#define ID_INVALID_PASSWORD 0x25
|
|
#define ID_MODIFIED_PACKET 0x26
|
|
|
|
#define SYSTEM_PRIORITY 0
|
|
#define HIGH_PRIORITY 1
|
|
#define NUMBER_OF_PRIORITIES 4
|
|
|
|
#define UNRELIABLE_SEQUENCED 7
|
|
#define RELIABLE 8
|
|
#define RELIABLE_ORDENED 9
|
|
#define RELIABLE_SEQUENCED 0xA
|
|
#define UNRELIABLE 0xB
|
|
|
|
#pragma pack(push,1)
|
|
|
|
struct CRemoteSystem {
|
|
char _pad0[0x10-0x0];
|
|
int reliabilityLayer;
|
|
char _pad14[0x778-0x14];
|
|
int lowestPing;
|
|
int nextPingTime;
|
|
char _pad780[0xCB0-0x780];
|
|
int connectMode;
|
|
};
|
|
|
|
struct CRakPeer {
|
|
char _pad0[6];
|
|
char occasionalPing;
|
|
char _pad7[0x14-0x7];
|
|
int maximumIncomingConnections;
|
|
char _pad18[0x28-0x18];
|
|
int procIsActive;
|
|
char _pad2C[0x70-0x2C];
|
|
int procIsBanned;
|
|
char _pad74[0xB8-0x74];
|
|
int procPlayerIDToDottedIP;
|
|
char _padBC[0xDC-0xBC];
|
|
int procDeleteCompressionLayer;
|
|
char _padE0[0x22C-0xE0];
|
|
struct PlayerID mPlayerId;
|
|
char _pad234[0x23A-0x234];
|
|
char incomingPassword[256];
|
|
unsigned char incomingPasswordLength;
|
|
char _pad33B[0x33C-0x33B];
|
|
struct CRakPeer__RemoteSystemStruct *remoteSystemList;
|
|
char _pad340[0x3B8-0x340];
|
|
int messageHandlerList;
|
|
char _pad3BC[0x7DC-0x3BC];
|
|
void *inputTree; /*HuffmanEncodingTree**/
|
|
void *outputTree; /*HuffmanEncodingTree**/
|
|
char _pad7E4[0xC0C-0x7E4];
|
|
int MTUSize;
|
|
char _padC18[0xC18-0xC10];
|
|
void *socket;
|
|
char _padC1C[0xD95-0xC1C];
|
|
char usingSecurity;
|
|
/*incomplete*/
|
|
};
|
|
#pragma pack(pop)
|
|
|
|
/**
|
|
Only seems to fetch lo32
|
|
*/
|
|
unsigned int __stdcall RakPeer__GetTime();
|
|
|
|
void RakNet__GetTimeNS(struct CRaknetTimeNS *time);
|
|
|
|
int __stdcall RakPeer__GetIndexFromPlayerID(
|
|
struct CRakPeer *this,
|
|
struct PlayerID playerId,
|
|
char calledFromNetworkThread);
|
|
|
|
int __stdcall RakPeer__AddPacketToProducer(
|
|
struct CRakPeer *this,
|
|
struct CPacket *packet);
|
|
|
|
int __stdcall RakPeer__AssignPlayerIDToRemoteSystemList(
|
|
struct CRakPeer *this,
|
|
struct PlayerID playerId,
|
|
int connectionMode);
|
|
|
|
struct CRemoteSystem* __stdcall RakPeer__GetRemoteSystemFromPlayerID(
|
|
struct CRakPeer *this,
|
|
struct PlayerID playerId,
|
|
char calledFromNetworkThread,
|
|
char onlyActive);
|
|
|
|
/**
|
|
int __thiscall RakPeer__ParseConnectionRequestPacket(
|
|
CRakPeer *this,
|
|
CRakPeer__RemoteSystemStruct *remoteSystem,
|
|
PlayerID playerId,
|
|
int data,
|
|
char byteSize)
|
|
*/
|
|
int RakPeer__ParseConnectionRequestPacket(
|
|
struct CRakPeer__RemoteSystemStruct *remoteSystem,
|
|
struct PlayerID playerId,
|
|
int data,
|
|
char byteSize);
|