World Packet: Difference between revisions

From wowdev
Jump to navigation Jump to search
(Initial commit)
 
(Mention default port)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''World Packets''' are the majority of communication between the client and the world server.
'''World Packets''' are the majority of communication between the client and the world server, in contrast with [[Login Packet]]s which are used for authentication and realm selection.


World packets consist of a packet size, an [[Opcodes|Opcode]] and a body.  
World packets consist of a packet size, an [[Opcodes|Opcode]] and a body.  
World packets default to port 8085.
= Headers =
All world packet headers are encrypted using the session key negotiated during login, except for [[SMSG_AUTH_CHALLENGE]] and [[CMSG_AUTH_SESSION]].


For server messages (SMSG) the headers look like:
For server messages (SMSG) the headers look like:


{| class="wikitable"
{{SMSG_Header}}
|+ SMSG Header
! Offset
! Size / Endianness
! Type
! Name
! Description
|-
| 0x0 || 2 / Big || uint16 || size || Size of the packet including the opcode field.
|-
| 0x2 || 2 / Little || uint16 || opcode || [[Opcodes|Opcode]] for the packet.<br>Determines the structure of the body.
|-
|}


For client messages (CMSG) the headers look like:
For client messages (CMSG) the headers look like:


{| class="wikitable"
{{CMSG_Header}}
|+ CMSG Header
= Process =
! Offset
 
! Size / Endianness
World packets begin with the client making a TCP to the world server and then:
! Type
# The server sends a [[SMSG_AUTH_CHALLENGE]].
! Name
# The client sends a [[CMSG_AUTH_SESSION]].
! Description
# The server sends a [[SMSG_AUTH_RESPONSE]].
|-
# The client requests a character screen with [[CMSG_CHAR_ENUM]].
| 0x0 || 2 / Big || uint16 || size || Size of the packet including the opcode field.
# The server responds with a list of characters in a [[SMSG_CHAR_ENUM]].
|-
# The client is now at the character screen.
| 0x2 || 4 / Little || uint32 || opcode || [[Opcodes|Opcode]] for the packet.<br>Determines the structure of the body.
 
|-
[[Category:Packet]]
|}
[[Category:World_Packets]]

Latest revision as of 17:30, 19 July 2021

World Packets are the majority of communication between the client and the world server, in contrast with Login Packets which are used for authentication and realm selection.

World packets consist of a packet size, an Opcode and a body.

World packets default to port 8085.

Headers

All world packet headers are encrypted using the session key negotiated during login, except for SMSG_AUTH_CHALLENGE and CMSG_AUTH_SESSION.

For server messages (SMSG) the headers look like:

SMSG Header
Offset Size / Endianness Type Name Description
0x0 2 / Big uint16 size Size of the packet including the opcode field.
0x2 2 / Little uint16 opcode Opcode for the packet.
Determines the structure of the body.


For client messages (CMSG) the headers look like:

CMSG Header
Offset Size / Endianness Type Name Description
0x0 2 / Big uint16 size Size of the packet including the opcode field.
0x2 4 / Little uint32 opcode Opcode for the packet.
Determines the structure of the body.

Process

World packets begin with the client making a TCP to the world server and then:

  1. The server sends a SMSG_AUTH_CHALLENGE.
  2. The client sends a CMSG_AUTH_SESSION.
  3. The server sends a SMSG_AUTH_RESPONSE.
  4. The client requests a character screen with CMSG_CHAR_ENUM.
  5. The server responds with a list of characters in a SMSG_CHAR_ENUM.
  6. The client is now at the character screen.