Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/network/NetMessages.h
Show All 22 Lines | |||||
#ifndef NETMESSAGES_H | #ifndef NETMESSAGES_H | ||||
#define NETMESSAGES_H | #define NETMESSAGES_H | ||||
#include "ps/CStr.h" | #include "ps/CStr.h" | ||||
#include "scriptinterface/ScriptTypes.h" | #include "scriptinterface/ScriptTypes.h" | ||||
#define PS_PROTOCOL_MAGIC 0x5073013f // 'P', 's', 0x01, '?' | #define PS_PROTOCOL_MAGIC 0x5073013f // 'P', 's', 0x01, '?' | ||||
#define PS_PROTOCOL_MAGIC_RESPONSE 0x50630121 // 'P', 'c', 0x01, '!' | #define PS_PROTOCOL_MAGIC_RESPONSE 0x50630121 // 'P', 'c', 0x01, '!' | ||||
#define PS_PROTOCOL_VERSION 0x01010015 // Arbitrary protocol | #define PS_PROTOCOL_VERSION 0x01010016 // Arbitrary protocol | ||||
#define PS_DEFAULT_PORT 0x5073 // 'P', 's' | #define PS_DEFAULT_PORT 0x5073 // 'P', 's' | ||||
// Set when lobby authentication is required. Used in the SrvHandshakeResponseMessage. | // Set when lobby authentication is required. Used in the SrvHandshakeResponseMessage. | ||||
#define PS_NETWORK_FLAG_REQUIRE_LOBBYAUTH 0x1 | #define PS_NETWORK_FLAG_REQUIRE_LOBBYAUTH 0x1 | ||||
// Defines the list of message types. The order of the list must not change. | // Defines the list of message types. The order of the list must not change. | ||||
// The message types having a negative value are used internally and not sent | // The message types having a negative value are used internally and not sent | ||||
// over the network. The message types used for network communication have | // over the network. The message types used for network communication have | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
START_NMT_CLASS_(SrvHandshakeResponse, NMT_SERVER_HANDSHAKE_RESPONSE) | START_NMT_CLASS_(SrvHandshakeResponse, NMT_SERVER_HANDSHAKE_RESPONSE) | ||||
NMT_FIELD_INT(m_UseProtocolVersion, u32, 4) | NMT_FIELD_INT(m_UseProtocolVersion, u32, 4) | ||||
NMT_FIELD_INT(m_Flags, u32, 4) | NMT_FIELD_INT(m_Flags, u32, 4) | ||||
NMT_FIELD(CStr, m_GUID) | NMT_FIELD(CStr, m_GUID) | ||||
END_NMT_CLASS() | END_NMT_CLASS() | ||||
START_NMT_CLASS_(Authenticate, NMT_AUTHENTICATE) | START_NMT_CLASS_(Authenticate, NMT_AUTHENTICATE) | ||||
NMT_FIELD(CStrW, m_Name) | NMT_FIELD(CStrW, m_Name) | ||||
// TODO: The password should not be printed to logfiles | NMT_FIELD_SECRET(CStr, m_Password) | ||||
NMT_FIELD(CStrW, m_Password) | |||||
NMT_FIELD_INT(m_IsLocalClient, u8, 1) | NMT_FIELD_INT(m_IsLocalClient, u8, 1) | ||||
END_NMT_CLASS() | END_NMT_CLASS() | ||||
START_NMT_CLASS_(AuthenticateResult, NMT_AUTHENTICATE_RESULT) | START_NMT_CLASS_(AuthenticateResult, NMT_AUTHENTICATE_RESULT) | ||||
NMT_FIELD_INT(m_Code, u32, 4) | NMT_FIELD_INT(m_Code, u32, 4) | ||||
NMT_FIELD_INT(m_HostID, u32, 2) | NMT_FIELD_INT(m_HostID, u32, 2) | ||||
NMT_FIELD(CStrW, m_Message) | NMT_FIELD(CStrW, m_Message) | ||||
END_NMT_CLASS() | END_NMT_CLASS() | ||||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator