Login Packet: Difference between revisions

From wowdev
Jump to navigation Jump to search
(Add direct links to client/server packets and remove indirect links. This significantly reduces page bloat)
(Add brief overview)
Line 7: Line 7:


The login packets are internally referred to as ''grunt'' and the packet layouts hint at it being planned for use for games other than WoW.
The login packets are internally referred to as ''grunt'' and the packet layouts hint at it being planned for use for games other than WoW.
The client always sends the first packet in a category, and the server responds with a packet from the same category. So the client would send a [[CMD_AUTH_LOGON_CHALLENGE_Client]] and the server would respond with a [[CMD_AUTH_LOGON_CHALLENGE_Server]].


The names here are used internally in the clients.
The names here are used internally in the clients.


See [[Login]] for a higher level overview of the login process.
See [[Login]] for a higher level overview of the login process.
[[Login_Packet_Results|Result values]] signal the result of server operations.
[[Login_Packet_Security_Flags|Security flags]] are used at {{Template:Sandbox/VersionRange|max_expansionlevel=2}} and afterwards.
= Overview =
The client initiates a TCP connection to the server on either the default port of 3724, or a port specified in the Realmlist.wtf file.
The exchange is then:
# Client sends a [[CMD_AUTH_LOGON_CHALLENGE_Client]] containing the username and version information.
# Server responds with a [[CMD_AUTH_LOGON_CHALLENGE_Server]] containing either authentication values or a [[Login_Packet_Results|failure code]].
# Client performs authentication calculations and sends a [[CMD_AUTH_LOGON_PROOF_Client]].
# Server performs calculations and returns a [[CMD_AUTH_LOGON_PROOF_Server]] with either a server proof or a [[Login_Packet_Results|failure code]]
# Client requests a realm list with [[CMD_REALM_LIST_Client]] and the server responds with [[CMD_REALM_LIST_Server]].
# Client selects a server and sends a [[World Packet]] to the address of the realm server, keeping the connection with the authentication server alive.
= Opcodes and packets =


{| class="wikitable"
{| class="wikitable"

Revision as of 21:25, 21 May 2021

Login packets are packets sent by the client to the authentication server as the first connection to the server infrastructure.

All packets start with an opcode field but do not use the same values as the World Packets. The only packets that can start a connection are CMD_AUTH_LOGON_CHALLENGE Client and CMD_AUTH_RECONNECT_CHALLENGE Client which share packet layout.

There are minor differences in the packets between WoW versions, but the layout seems to be stable around BC and later.

The login packets are internally referred to as grunt and the packet layouts hint at it being planned for use for games other than WoW.

The client always sends the first packet in a category, and the server responds with a packet from the same category. So the client would send a CMD_AUTH_LOGON_CHALLENGE_Client and the server would respond with a CMD_AUTH_LOGON_CHALLENGE_Server.

The names here are used internally in the clients.

See Login for a higher level overview of the login process.

Result values signal the result of server operations.

Security flags are used at ≤ BC and afterwards.

Overview

The client initiates a TCP connection to the server on either the default port of 3724, or a port specified in the Realmlist.wtf file. The exchange is then:

  1. Client sends a CMD_AUTH_LOGON_CHALLENGE_Client containing the username and version information.
  2. Server responds with a CMD_AUTH_LOGON_CHALLENGE_Server containing either authentication values or a failure code.
  3. Client performs authentication calculations and sends a CMD_AUTH_LOGON_PROOF_Client.
  4. Server performs calculations and returns a CMD_AUTH_LOGON_PROOF_Server with either a server proof or a failure code
  5. Client requests a realm list with CMD_REALM_LIST_Client and the server responds with CMD_REALM_LIST_Server.
  6. Client selects a server and sends a World Packet to the address of the realm server, keeping the connection with the authentication server alive.

Opcodes and packets

Opcodes
Name Value Description Client Link Server Link
Authentication
CMD_AUTH_LOGON_CHALLENGE 0x00 Intial information sent by client and then challenge by server. Client Server
CMD_AUTH_LOGON_PROOF 0x01 Proof sent by client and then server. Client Server
CMD_AUTH_RECONNECT_CHALLENGE 0x02 Reconnect challenge sent by client and then server. Client Server
CMD_AUTH_RECONNECT_PROOF 0x03 Reconnect proof sent by client and then server. Client Server
Miscellaneous
CMD_SURVEY_RESULT 0x04 Used for hardware survey. Client Server
Realmlist
CMD_REALM_LIST 0x10 Realmlist request sent by client and realmlist information sent by server. Client Server
Patching
CMD_XFER_INITIATE 0x30 Used for patching. Client Server
CMD_XFER_DATA 0x31 Used for patching. Client Server
CMD_XFER_ACCEPT 0x32 Used for patching. Client Server
CMD_XFER_RESUME 0x33 Used for patching. Client Server
CMD_XFER_CANCEL 0x34 Used for patching. Client Server