PocketMine-MP 5.18.2 git-00e39821f06a4b6d728d35053c2621dbb19369ff
MessageIdentifiers.php
1<?php
2
3/*
4 * This file is part of RakLib.
5 * Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/RakLib>
6 *
7 * RakLib is not affiliated with Jenkins Software LLC nor RakNet.
8 *
9 * RakLib is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 */
14
15declare(strict_types=1);
16
17namespace raklib\protocol;
18
20 //From https://github.com/OculusVR/RakNet/blob/master/Source/MessageIdentifiers.h
21
22 //
23 // RESERVED TYPES - DO NOT CHANGE THESE
24 // All types from RakPeer
25 //
28 public const ID_CONNECTED_PING = 0x00;
30 public const ID_UNCONNECTED_PING = 0x01;
34 public const ID_CONNECTED_PONG = 0x03;
36 public const ID_DETECT_LOST_CONNECTIONS = 0x04;
39 public const ID_OPEN_CONNECTION_REQUEST_1 = 0x05;
42 public const ID_OPEN_CONNECTION_REPLY_1 = 0x06;
46 public const ID_OPEN_CONNECTION_REQUEST_2 = 0x07;
48 public const ID_OPEN_CONNECTION_REPLY_2 = 0x08;
50 public const ID_CONNECTION_REQUEST = 0x09;
56 public const ID_PUBLIC_KEY_MISMATCH = 0x0c;
59 public const ID_OUT_OF_BAND_INTERNAL = 0x0d;
65 public const ID_SND_RECEIPT_ACKED = 0x0e;
72 public const ID_SND_RECEIPT_LOSS = 0x0f;
73
74 //
75 // USER TYPES - DO NOT CHANGE THESE
76 //
77
79 public const ID_CONNECTION_REQUEST_ACCEPTED = 0x10;
81 public const ID_CONNECTION_ATTEMPT_FAILED = 0x11;
83 public const ID_ALREADY_CONNECTED = 0x12;
85 public const ID_NEW_INCOMING_CONNECTION = 0x13;
90 public const ID_DISCONNECTION_NOTIFICATION = 0x15;
93 public const ID_CONNECTION_LOST = 0x16;
95 public const ID_CONNECTION_BANNED = 0x17;
97 public const ID_INVALID_PASSWORD = 0x18;
98 // RAKNET_PROTOCOL_VERSION in RakNetVersion.h does not match on the remote system what we have on our system
99 // This means the two systems cannot communicate.
100 // The 2nd byte of the message contains the value of RAKNET_PROTOCOL_VERSION for the remote system
101 public const ID_INCOMPATIBLE_PROTOCOL_VERSION = 0x19;
102 // Means that this IP address connected recently, and can't connect again as a security measure. See
104 public const ID_IP_RECENTLY_CONNECTED = 0x1a;
107 public const ID_TIMESTAMP = 0x1b;
111 public const ID_UNCONNECTED_PONG = 0x1c;
114 public const ID_ADVERTISE_SYSTEM = 0x1d;
115 // RakPeer - Downloading a large message. Format is ID_DOWNLOAD_PROGRESS (MessageID), partCount (unsigned int),
119 public const ID_DOWNLOAD_PROGRESS = 0x1e;
120
126 public const ID_REMOTE_CONNECTION_LOST = 0x20;
129
131 public const ID_FILE_LIST_TRANSFER_HEADER = 0x22;
133 public const ID_FILE_LIST_TRANSFER_FILE = 0x23;
134 // Ack for reference push, to send more of the file
135 public const ID_FILE_LIST_REFERENCE_PUSH_ACK = 0x24;
136
138 public const ID_DDT_DOWNLOAD_REQUEST = 0x25;
139
141 public const ID_TRANSPORT_STRING = 0x26;
142
148 public const ID_REPLICA_MANAGER_SERIALIZE = 0x29;
153
159 public const ID_RAKVOICE_CLOSE_CHANNEL = 0x2e;
161 public const ID_RAKVOICE_DATA = 0x2f;
162
166 public const ID_AUTOPATCHER_CREATION_LIST = 0x31;
168 public const ID_AUTOPATCHER_DELETION_LIST = 0x32;
170 public const ID_AUTOPATCHER_GET_PATCH = 0x33;
172 public const ID_AUTOPATCHER_PATCH_LIST = 0x34;
179 public const ID_AUTOPATCHER_FINISHED = 0x38;
182
184 public const ID_NAT_PUNCHTHROUGH_REQUEST = 0x3a;
186 //ID_NAT_GROUP_PUNCHTHROUGH_REQUEST,
188 //ID_NAT_GROUP_PUNCHTHROUGH_REPLY,
190 public const ID_NAT_CONNECT_AT_TIME = 0x3b;
192 public const ID_NAT_GET_MOST_RECENT_PORT = 0x3c;
194 public const ID_NAT_CLIENT_READY = 0x3d;
196 //ID_NAT_GROUP_PUNCHTHROUGH_FAILURE_NOTIFICATION,
197
200 public const ID_NAT_TARGET_NOT_CONNECTED = 0x3e;
203 public const ID_NAT_TARGET_UNRESPONSIVE = 0x3f;
210 public const ID_NAT_ALREADY_IN_PROGRESS = 0x41;
213 public const ID_NAT_PUNCHTHROUGH_FAILED = 0x42;
216 public const ID_NAT_PUNCHTHROUGH_SUCCEEDED = 0x43;
217
220 public const ID_READY_EVENT_SET = 0x44;
223 public const ID_READY_EVENT_UNSET = 0x45;
226 public const ID_READY_EVENT_ALL_SET = 0x46;
229 public const ID_READY_EVENT_QUERY = 0x47;
230
232 public const ID_LOBBY_GENERAL = 0x48;
233
234 // RPC3, RPC4 error
235 public const ID_RPC_REMOTE_ERROR = 0x49;
237 public const ID_RPC_PLUGIN = 0x4a;
238
240 public const ID_FILE_LIST_REFERENCE_PUSH = 0x4b;
242 public const ID_READY_EVENT_FORCE_ALL_SET = 0x4c;
243
245 public const ID_ROOMS_EXECUTE_FUNC = 0x4d;
246 public const ID_ROOMS_LOGON_STATUS = 0x4e;
247 public const ID_ROOMS_HANDLE_CHANGE = 0x4f;
248
250 public const ID_LOBBY2_SEND_MESSAGE = 0x50;
251 public const ID_LOBBY2_SERVER_ERROR = 0x51;
252
256 public const ID_FCM2_NEW_HOST = 0x52;
258 public const ID_FCM2_REQUEST_FCMGUID = 0x53;
260 public const ID_FCM2_RESPOND_CONNECTION_COUNT = 0x54;
262 public const ID_FCM2_INFORM_FCMGUID = 0x55;
264 public const ID_FCM2_UPDATE_MIN_TOTAL_CONNECTION_COUNT = 0x56;
273 public const ID_FCM2_VERIFIED_JOIN_START = 0x57;
275 public const ID_FCM2_VERIFIED_JOIN_CAPABLE = 0x58;
281 public const ID_FCM2_VERIFIED_JOIN_FAILED = 0x59;
295
297 public const ID_UDP_PROXY_GENERAL = 0x5c;
298
300 public const ID_SQLite3_EXEC = 0x5d;
302 public const ID_SQLite3_UNKNOWN_DB = 0x5e;
304 public const ID_SQLLITE_LOGGER = 0x5f;
305
307 public const ID_NAT_TYPE_DETECTION_REQUEST = 0x60;
309 public const ID_NAT_TYPE_DETECTION_RESULT = 0x61;
310
312 public const ID_ROUTER_2_INTERNAL = 0x62;
332 public const ID_ROUTER_2_REROUTED = 0x65;
333
335 public const ID_TEAM_BALANCER_INTERNAL = 0x66;
344 public const ID_TEAM_BALANCER_TEAM_REQUESTED_CANCELLED = 0x69;
347
349 public const ID_LIGHTSPEED_INTEGRATION = 0x6b;
350
352 public const ID_XBOX_LOBBY = 0x6c;
353
358 public const ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_SUCCESS = 0x6e;
371 public const ID_TWO_WAY_AUTHENTICATION_NEGOTIATION = 0x72;
372
374 public const ID_CLOUD_POST_REQUEST = 0x73;
375 public const ID_CLOUD_RELEASE_REQUEST = 0x74;
376 public const ID_CLOUD_GET_REQUEST = 0x75;
377 public const ID_CLOUD_GET_RESPONSE = 0x76;
378 public const ID_CLOUD_UNSUBSCRIBE_REQUEST = 0x77;
379 public const ID_CLOUD_SERVER_TO_SERVER_COMMAND = 0x78;
380 public const ID_CLOUD_SUBSCRIPTION_NOTIFICATION = 0x79;
381
382 // LibVoice
383 public const ID_LIB_VOICE = 0x7a;
384
385 public const ID_RELAY_PLUGIN = 0x7b;
386 public const ID_NAT_REQUEST_BOUND_ADDRESSES = 0x7c;
387 public const ID_NAT_RESPOND_BOUND_ADDRESSES = 0x7d;
388 public const ID_FCM2_UPDATE_USER_CONTEXT = 0x7e;
389 public const ID_RESERVED_3 = 0x7f;
390 public const ID_RESERVED_4 = 0x80;
391 public const ID_RESERVED_5 = 0x81;
392 public const ID_RESERVED_6 = 0x82;
393 public const ID_RESERVED_7 = 0x83;
394 public const ID_RESERVED_8 = 0x84;
395 public const ID_RESERVED_9 = 0x85;
396
397 // For the user to use. Start your first enumeration at this value.
398 public const ID_USER_PACKET_ENUM = 0x86;
399 //-------------------------------------------------------------------------------------------------------------
400}
const ID_TEAM_BALANCER_TEAM_ASSIGNED
Team balancer plugin informing you of your team. Byte 1 contains the team you requested to join....
const ID_NAT_TARGET_NOT_CONNECTED
NATPunchthrough plugin: internal.
const ID_CONNECTION_REQUEST
C2S: Header(1), GUID(8), Timestamp, HasSecurity(1), Proof(32)
const ID_ROUTER_2_FORWARDING_ESTABLISHED
You can now call connect, ping, or other operations to the destination system.
const ID_OUR_SYSTEM_REQUIRES_SECURITY
RakPeer - We passed a public key to RakPeerInterface::Connect(), but the other system did not have se...
const ID_NAT_PUNCHTHROUGH_REQUEST
NATPunchthrough plugin: internal.
const ID_CONNECTION_REQUEST_ACCEPTED
RakPeer - In a client/server environment, our connection request to the server has been accepted.
const ID_OPEN_CONNECTION_REPLY_2
S2C: Header(1), OfflineMesageID(16), server GUID(8), mtu(2), doSecurity(1 bit), handshakeAnswer (if d...
const ID_TRANSPORT_STRING
RakNetTransport plugin - Transport provider message, used for remote console.
const ID_FILE_LIST_TRANSFER_HEADER
FileListTransfer plugin - Setup data.
const ID_REPLICA_MANAGER_SCOPE_CHANGE
ReplicaManager plugin - Changed scope of an object.
const ID_AUTOPATCHER_PATCH_LIST
Autopatcher plugin - A list of patches for a list of files.
const ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR
Autopatcher plugin - Returned to the user: An error from the database repository for the autopatcher.
const ID_RAKVOICE_OPEN_CHANNEL_REQUEST
RakVoice plugin - Open a communication channel.
const ID_REPLICA_MANAGER_SERIALIZE
ReplicaManager plugin - Serialized data of an object.
const ID_CONNECTION_ATTEMPT_FAILED
RakPeer - Sent to the player when a connection request cannot be completed due to inability to connec...
const ID_CLOUD_POST_REQUEST
CloudClient / CloudServer.
const ID_CONNECTION_BANNED
RakPeer - We are banned from the system we attempted to connect to.
const ID_SQLite3_UNKNOWN_DB
SQLite3Plugin - Remote database is unknown.
const ID_UNCONNECTED_PING_OPEN_CONNECTIONS
Ping from an unconnected system. Only reply if we have open connections. Do not update timestamps....
const ID_REPLICA_MANAGER_DOWNLOAD_COMPLETE
ReplicaManager plugin - Finished downloading all serialized objects.
const ID_FILE_LIST_TRANSFER_FILE
FileListTransfer plugin - A file.
const ID_DETECT_LOST_CONNECTIONS
A reliable packet to detect lost connections (internal use only)
const ID_AUTOPATCHER_DELETION_LIST
Autopatcher plugin - A list of files to delete.
const ID_NAT_TYPE_DETECTION_REQUEST
Sent to NatTypeDetectionServer.
const ID_RAKVOICE_CLOSE_CHANNEL
RakVoice plugin - Close a communication channel.
const ID_LIGHTSPEED_INTEGRATION
Gamebryo Lightspeed integration.
const ID_NO_FREE_INCOMING_CONNECTIONS
RakPeer - The system we attempted to connect to is not accepting new connections.
const ID_UDP_PROXY_GENERAL
UDP proxy messages. Second byte indicates type.
const ID_CONNECTED_PONG
Pong from a connected system. Update timestamps (internal use only)
const ID_NEW_INCOMING_CONNECTION
RakPeer - A remote system has successfully connected.
const ID_REMOTE_SYSTEM_REQUIRES_PUBLIC_KEY
RakPeer - Remote system requires secure connections, pass a public key to RakPeerInterface::Connect()
const ID_ROUTER_2_INTERNAL
Used by the router2 plugin.
const ID_NAT_GET_MOST_RECENT_PORT
NATPunchthrough plugin: internal.
const ID_FILE_LIST_REFERENCE_PUSH
FileListTransfer transferring large files in chunks that are read only when needed,...
const ID_AUTOPATCHER_FINISHED_INTERNAL
Autopatcher plugin - Finished getting all files from the autopatcher.
const ID_AUTOPATCHER_CREATION_LIST
Autopatcher plugin - A list of files to create.
const ID_INVALID_PASSWORD
RakPeer - The remote system is using a password and has refused our connection because we did not set...
const ID_REMOTE_NEW_INCOMING_CONNECTION
ConnectionGraph2 plugin: Bytes 1-4 = count. for (count items) contains {SystemAddress,...
const ID_LOBBY_GENERAL
Lobby packets. Second byte indicates type.
const ID_UNCONNECTED_PING
Ping from an unconnected system. Reply but do not update timestamps. (internal use only)
const ID_REPLICA_MANAGER_DOWNLOAD_STARTED
ReplicaManager plugin - New connection, about to send all world objects.
const ID_AUTOPATCHER_RESTART_APPLICATION
Autopatcher plugin - Returned to the user: You must restart the application to finish patching.
const ID_READY_EVENT_FORCE_ALL_SET
Force the ready event to all set.
const ID_ALREADY_CONNECTED
RakPeer - Sent a connect request to a system we are currently connected to.
const ID_NAT_CONNECT_AT_TIME
NATPunchthrough plugin: internal.
const ID_AUTOPATCHER_GET_CHANGELIST_SINCE_DATE
Autopatcher plugin - Get a list of files that have changed since a certain date.
const ID_RAKVOICE_DATA
RakVoice plugin - Voice data.
const ID_NAT_CLIENT_READY
NATPunchthrough plugin: internal.
const ID_SQLLITE_LOGGER
Events happening with SQLiteClientLoggerPlugin.
const ID_REPLICA_MANAGER_CONSTRUCTION
ReplicaManager plugin - Create an object.
const ID_SQLite3_EXEC
SQLite3Plugin - execute.
const ID_AUTOPATCHER_GET_PATCH
Autopatcher plugin - A list of files to get patches for.
const ID_IP_RECENTLY_CONNECTED
RakPeer::SetLimitIPConnectionFrequency()
const ID_AUTOPATCHER_CANNOT_DOWNLOAD_ORIGINAL_UNMODIFIED_FILES
Autopatcher plugin - Returned to the user: The server does not allow downloading unmodified game file...
const ID_PUBLIC_KEY_MISMATCH
RakPeer - Wrong public key passed to RakPeerInterface::Connect()
const ID_RPC_PLUGIN
Plugin based replacement for RPC system.
const ID_NAT_TYPE_DETECTION_RESULT
Sent to NatTypeDetectionClient. Byte 1 contains the type of NAT detected.
const ID_RAKVOICE_OPEN_CHANNEL_REPLY
RakVoice plugin - Communication channel accepted.
const ID_DDT_DOWNLOAD_REQUEST
DirectoryDeltaTransfer plugin - Request from a remote system for a download of a directory.