AuthServer: Difference between revisions
From OuroDev
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
==Communication Protocols== | ==Communication Protocols== | ||
In the sections below, the table column "Structure" is denoted in a similar format used by the server source. Minus the opcode, which is type '''''c''''' anyways. | In the sections below, the table column "Structure" is denoted in a similar format used by the server source. Minus the opcode, which is type '''''c''''' anyways. | ||
<div style="overflow-x:scroll"> | |||
{| class="wikitable" | {| class="wikitable" | ||
!Type | !Type | ||
Line 31: | Line 32: | ||
|Conditional, based on config | |Conditional, based on config | ||
|} | |} | ||
</div> | |||
===Game Server=== | ===Game Server=== | ||
Line 36: | Line 38: | ||
====Incoming Packets==== | ====Incoming Packets==== | ||
<div style="overflow-x:scroll"> | |||
{| class="wikitable" | {| class="wikitable" | ||
!Opcode | !Opcode | ||
!Structure | !Structure | ||
!DBServer Function | |||
!AuthServer Function | |||
|- | |- | ||
|AS_PLAY_OK | |AS_PLAY_OK | ||
|dd | |||
|authSendPlayOK / ServerPlayOk | |authSendPlayOK / ServerPlayOk | ||
| | | | ||
|- | |- | ||
|AS_PLAY_FAIL | |AS_PLAY_FAIL | ||
|cd | |||
|authSendPlayFail / ServerPlayFail | |authSendPlayFail / ServerPlayFail | ||
| | | | ||
|- | |- | ||
|AS_PLAY_GAME | |AS_PLAY_GAME | ||
|d | |||
|authSendPlayGame / ServerPlayGame | |authSendPlayGame / ServerPlayGame | ||
| | | | ||
|- | |- | ||
|AS_QUIT_GAME | |AS_QUIT_GAME | ||
|dwd | |||
|authSendQuitGame / ServerPlayQuit | |authSendQuitGame / ServerPlayQuit | ||
| | | | ||
|- | |- | ||
|AS_KICK_ACCOUNT | |AS_KICK_ACCOUNT | ||
|dw | |||
|authSendKickAccount / ServerKickAccount | |authSendKickAccount / ServerKickAccount | ||
| | | | ||
|- | |- | ||
|AS_SERVER_USERNUM | |AS_SERVER_USERNUM | ||
|ww | |||
| - / ServerGetUserNum | | - / ServerGetUserNum | ||
| | | | ||
|- | |- | ||
|AS_BAN_USER | |AS_BAN_USER | ||
|dw | |||
|authSendBanAccount / ServerBanUser | |authSendBanAccount / ServerBanUser | ||
| | | | ||
|- | |- | ||
|AS_VERSION | |AS_VERSION | ||
|d | |||
|authSendVersion / ServerVersion | |authSendVersion / ServerVersion | ||
| | | | ||
|- | |- | ||
|AS_PING | |AS_PING | ||
|d | |||
|authSendPing / ServerPing | |authSendPing / ServerPing | ||
| | | | ||
|- | |- | ||
|AS_WRITE_USERDATA | |AS_WRITE_USERDATA | ||
|db | |||
|authSendUserData / ServerWriteUserData | |authSendUserData / ServerWriteUserData | ||
| | | | ||
|- | |- | ||
|AS_SET_CONNECT | |AS_SET_CONNECT | ||
|d | |||
|authSendSetConnect / ServerSetActive | |authSendSetConnect / ServerSetActive | ||
| | | | ||
|- | |- | ||
|AS_PLAY_USER_LIST | |AS_PLAY_USER_LIST | ||
|dsddddd | |||
|authSendCurrentPlayers / ServerPlayUserList | |authSendCurrentPlayers / ServerPlayUserList | ||
| | | | ||
|- | |- | ||
|AS_SET_SERVER_ID | |AS_SET_SERVER_ID | ||
|cw | |||
| - / SetServerId | | - / SetServerId | ||
| | | | ||
|- | |- | ||
|AS_SERVER_USER_NUM_BY_QUEUE_LEVEL | |AS_SERVER_USER_NUM_BY_QUEUE_LEVEL | ||
| - | |||
| - / ServerUserNumByQueueLevel | | - / ServerUserNumByQueueLevel | ||
| | | | ||
|- | |- | ||
|AS_FINISHED_QUEUE | |AS_FINISHED_QUEUE | ||
|d | |||
| - / FinishedQueue | | - / FinishedQueue | ||
| | | | ||
|- | |- | ||
|AS_SET_LOGIN_FREQUENCY | |AS_SET_LOGIN_FREQUENCY | ||
| - | |||
| - / SetLoginFrequency | | - / SetLoginFrequency | ||
| | | | ||
|- | |- | ||
|AS_QUEUE_SIZES | |AS_QUEUE_SIZES | ||
|c[cdd] | |||
| - / QueueSizes | | - / QueueSizes | ||
| | | | ||
|- | |- | ||
|AS_READ_USERDATA | |AS_READ_USERDATA | ||
|d | |||
| - / ServerReadUserData | | - / ServerReadUserData | ||
| | | | ||
|- | |- | ||
|AS_WRITE_GAMEDATA | |AS_WRITE_GAMEDATA | ||
|db | |||
|authSendUserData / ServerWriteGameData | |authSendUserData / ServerWriteGameData | ||
| | | | ||
|- | |- | ||
|AS_READ_GAMEDATA | |AS_READ_GAMEDATA | ||
|d | |||
|authSendGameDataReq / ServerReadGameData | |authSendGameDataReq / ServerReadGameData | ||
| | | | ||
|- | |- | ||
|AS_SHARD_TRANSFER | |AS_SHARD_TRANSFER | ||
|dd | |||
|authSendShardTransfer / ServerShardTransfer | |authSendShardTransfer / ServerShardTransfer | ||
| | | | ||
|} | |} | ||
</div> | |||
====Outgoing Packets==== | ====Outgoing Packets==== | ||
<div style="overflow-x:scroll"> | |||
{| class="wikitable" | {| class="wikitable" | ||
!Opcode | !Opcode | ||
Line 164: | Line 191: | ||
|db | |db | ||
|} | |} | ||
</div> | |||
===Game Client=== | ===Game Client=== | ||
Line 169: | Line 197: | ||
====Incoming Packets==== | ====Incoming Packets==== | ||
<div style="overflow-x:scroll"> | |||
{| class="wikitable" | {| class="wikitable" | ||
!Opcode | !Opcode | ||
Line 202: | Line 231: | ||
|dbdw(c) | |dbdw(c) | ||
|} | |} | ||
</div> | |||
====Outgoing Packets==== | ====Outgoing Packets==== | ||
<div style="overflow-x:scroll"> | |||
{| class="wikitable" | {| class="wikitable" | ||
!Opcode | !Opcode | ||
Line 280: | Line 311: | ||
| - | | - | ||
|} | |} | ||
</div> | |||
===GM Tools=== | ===GM Tools=== | ||
Line 285: | Line 317: | ||
====Incoming Packets==== | ====Incoming Packets==== | ||
<div style="overflow-x:scroll"> | |||
{| class="wikitable" | {| class="wikitable" | ||
!Opcode | !Opcode | ||
Line 346: | Line 379: | ||
|d | |d | ||
|} | |} | ||
</div> | |||
====Outgoing Packets==== | ====Outgoing Packets==== | ||
<div style="overflow-x:scroll"> | |||
{| class="wikitable" | {| class="wikitable" | ||
!Opcode | !Opcode | ||
Line 397: | Line 432: | ||
|dddcdd | |dddcdd | ||
|} | |} | ||
</div> |
Revision as of 00:21, 3 September 2020
Responsible for user authentication and session creation. Has cross-shard capabilities.
Communication Protocols
In the sections below, the table column "Structure" is denoted in a similar format used by the server source. Minus the opcode, which is type c anyways.
Type | Description |
---|---|
c | Char |
w | Word / Short |
d | DWord / Int |
q | QWord / Long |
b | Byte Array |
s | NUL-terminated C String |
[] | Array |
() | Conditional, based on config |
Game Server
TCP Port 2104. AuthServer and DBServer communicate through this port.
Incoming Packets
Opcode | Structure | DBServer Function | AuthServer Function |
---|---|---|---|
AS_PLAY_OK | dd | authSendPlayOK / ServerPlayOk | |
AS_PLAY_FAIL | cd | authSendPlayFail / ServerPlayFail | |
AS_PLAY_GAME | d | authSendPlayGame / ServerPlayGame | |
AS_QUIT_GAME | dwd | authSendQuitGame / ServerPlayQuit | |
AS_KICK_ACCOUNT | dw | authSendKickAccount / ServerKickAccount | |
AS_SERVER_USERNUM | ww | - / ServerGetUserNum | |
AS_BAN_USER | dw | authSendBanAccount / ServerBanUser | |
AS_VERSION | d | authSendVersion / ServerVersion | |
AS_PING | d | authSendPing / ServerPing | |
AS_WRITE_USERDATA | db | authSendUserData / ServerWriteUserData | |
AS_SET_CONNECT | d | authSendSetConnect / ServerSetActive | |
AS_PLAY_USER_LIST | dsddddd | authSendCurrentPlayers / ServerPlayUserList | |
AS_SET_SERVER_ID | cw | - / SetServerId | |
AS_SERVER_USER_NUM_BY_QUEUE_LEVEL | - | - / ServerUserNumByQueueLevel | |
AS_FINISHED_QUEUE | d | - / FinishedQueue | |
AS_SET_LOGIN_FREQUENCY | - | - / SetLoginFrequency | |
AS_QUEUE_SIZES | c[cdd] | - / QueueSizes | |
AS_READ_USERDATA | d | - / ServerReadUserData | |
AS_WRITE_GAMEDATA | db | authSendUserData / ServerWriteGameData | |
AS_READ_GAMEDATA | d | authSendGameDataReq / ServerReadGameData | |
AS_SHARD_TRANSFER | dd | authSendShardTransfer / ServerShardTransfer |
Outgoing Packets
Opcode | AuthServer Function / DBServer Function | Structure |
---|---|---|
SQ_ABOUT_TO_PLAY | AccountDB::AboutToPlay / handleAboutToPlay | dsdddd |
SQ_KICK_ACCOUNT | AccountDB::KickAccount / handleKickAccount | dcs |
SQ_SERVER_NUM | RequestUserCounts / handleNumOnline | |
SQ_VERSION | CSocketServer::OnCreate / handleVersion | sd(d) |
SQ_PING | ServerPing / handlePing | d |
SQ_COMPLETE_USERLIST | ServerPlayUserList / handleCompleteUserList | d |
SQ_USER_DATA | ServerReadUserData / - | db |
SQ_GAME_DATA | ServerReadGameData / handleRecvGameData | db |
Game Client
TCP Port 2106. AuthServer and Game communicate through this port.
Incoming Packets
Opcode | Game Function / AuthServer Function | Structure |
---|---|---|
AQ_LOGIN | - / LoginPacket | dbdw(c) |
AQ_SERVER_LIST | - / DeprecatedPacket | ddc(c[d]) |
AQ_ABOUT_TO_PLAY | acSendAboutToPlay / SelectServerPacket | ddc |
AQ_LOGOUT | acSendLogout / LogoutPacket | dd |
AQ_LOGIN_MD5 | acSendLoginMD5 / LoginPacketMd5Key | dbdw(c) |
AQ_SERVER_LIST_EXT | acSendServerList / ServerListExtPacket | ddc(c[d]) |
AQ_LOGIN_MD5_MD5 | acSendLoginMD5 / - | dbdw(c) |
Outgoing Packets
Opcode | Description | AuthServer Function / Game Function | Structure |
---|---|---|---|
AC_PROTOCOL_VER | Exchange common protocol version with client | CSocketServerEx::OnCreate / acGetProtocolVer | dddbdb |
AC_LOGIN_FAIL | Reject client authentication | (more than 1) / acGetLoginFail | c |
AC_BLOCKED_ACCOUNT | Account banned for X until Y | LoginPacketSecure / acGetBlockedAccount | dd |
AC_LOGIN_OK | Allow client authentication | AccountDB::RegAccount / acGetLoginOK | dddddddddddd(dd) |
AC_SEND_SERVERLIST | Send list of shards | CServerList::MakeServerListPacket / acGetSendServerList | c[cddccwwcc(cs)] |
AC_SEND_SERVER_FAIL | Something unexpected happened | ServerListExtPacket / acGetSendServerFail | c |
AC_PLAY_FAIL | Server selected, but down possibly? | (more than 1) / acGetPlayFail | c |
AC_PLAY_OK | Server selected, continue | ServerPlayOk / acGetPlayOK | ddc |
AC_ACCOUNT_KICKED | Account kicked for X | AccountDB::KickAccount / acGetAccountKicked | c |
AC_BLOCKED_ACCOUNT_WITH_MSG | Account permabanned for X | LoginPacketSecure / acGetBlockedAccountWithMsg | s |
AC_SC_CHECK_REQ | - | - | - |
AC_QUEUE_SIZE | Queue length and wait time | CServerList::MakeQueueSizePacket / acGetQueueSize | c[ccdd] |
AC_HANDOFF_TO_QUEUE | Wait in server queue | ServerPlayOk / acGetHandoffToQueue | ddc |
AC_POSITION_IN_QUEUE | - | - | - |
GM Tools
TCP Port 2108. Used for internal administration?
Incoming Packets
Opcode | AuthServer Function | Structure |
---|---|---|
IA_SERVER_VERSION | GetConnectSessionKey | d |
IA_IP_KIND | - | - |
IA_IP_USE | GetIPAcquireSuccess | dcdd |
IA_IP_START_OK | StartIPCharge | dcddd |
IA_IP_START_FAIL | StartIPChargeFail | dcddds |
IA_IP_USE_FAIL | GetIPAcquireFail | dc |
IA_IP_SESSIONKEY | - | - |
IA_IP_INSTANTLOGIN_OK | - | - |
IA_IP_INSTANTLOGIN_FAIL | - | - |
IA_IP_KICK | GetIPKick | dddsd |
IA_IP_READY_FAIL | ReadyIPFail | dc |
IA_IP_READY_OK | ReadyIPOK | dcddd |
IA_IP_SET_STARTTIME_OK | - | - |
IA_IP_SET_STARTTIME_FAIL | SetStartTimeFail | d |
Outgoing Packets
Opcode | AuthServer Function | Structure |
---|---|---|
AI_SERVER_VERSION | CIPSocket::OnCreate | sc |
AI_IP_KIND | - | - |
AI_IP_ACQUIRE | CIPSessionDB::AcquireSessionRequest | sddd |
AI_IP_RELEASE | CIPSessionDB::ReleaseSessionRequest | ddddd |
AI_IP_START_CHARGE | CIPSessionDB::StartIPCharge | dddcdd |
AI_IP_STOP_CHARGE | CIPSessionDB::StopIPCharge | ddddcddsd |
AI_IP_INSTANT_START_GAME | - | - |
AI_IP_INSTANT_STOP_GAME | - | - |
AI_IP_KICKED | - | - |
AI_IP_READY_GAME | CIPSessionDB::ReadyToIPCharge | dddcdd |
AI_IP_SET_START_TIME | CIPSessionDB::ConfirmIPCharge | dddcdd |