97 lines
2.3 KiB
C
97 lines
2.3 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
|
||
|
#define ID_NEW_INCOMING_CONNECTION 0x1E
|
||
|
#define ID_NO_FREE_INCOMING_CONNECTIONS 0x1F
|
||
|
#define ID_CONNECTION_BANNED 0x24
|
||
|
#define ID_INVALID_PASSWORD 0x25
|
||
|
|
||
|
#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 PlayerID {
|
||
|
int binaryAddress;
|
||
|
short port;
|
||
|
short __pad;
|
||
|
};
|
||
|
EXPECT_SIZE(struct PlayerID, 0x8);
|
||
|
|
||
|
struct CRakPeer__RemoteSystemStruct {
|
||
|
char _pad0[0x10-0x0];
|
||
|
void *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[0x7DC-0x340];
|
||
|
void *inputTree; /*HuffmanEncodingTree**/
|
||
|
void *outputTree; /*HuffmanEncodingTree**/
|
||
|
char _pad7E4[0xC0C-0x7E4];
|
||
|
int MTUSize;
|
||
|
char _padC10[0xD95-0xC10];
|
||
|
char usingSecurity;
|
||
|
/*incomplete*/
|
||
|
};
|
||
|
#pragma pack(pop)
|
||
|
|
||
|
/**
|
||
|
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);
|