Navigation

Console
Generate Code: All packets
Packets

Packet Information


Message ID:0x3E
  
Message Name:SID_LOGONREALMEX
  
Direction:Server -> Client (Received)
  
Used By:Diablo II, Diablo
  
Format:(DWORD) MCP Cookie
(DWORD) MCP Status
(DWORD) [2] MCP Chunk 1
(DWORD) IP
(DWORD) Port
(DWORD) [12] MCP Chunk 2
(STRING) Battle.net unique name
  
Remarks:This packet supplies the data necessary to connect to an MCP server. The cookie value is defined in the first DWORD of SID_LOGONREALMEX and is simply returned by Battle.net. If the length of the message (not including header) is greater than 8, the client should continue to logon to the MCP. Otherwise, the Status field is interpreted as an error code:

0x80000001: Realm is unavailable
0x80000002: Realm logon failed

Any other value indicates failure.

The first part of the MCP Chunk that must be sent to the MCP server includes the Status and Cookie DWORDS, making MCP Chunk 1 the first 4 DWORDS of the packet.

There used to be a WORD at the end of this packet, which was apparently random.
  
Related:[0x3E] SID_LOGONREALMEX (C->S), [0x01] MCP_STARTUP (C->S)

User Comments


For detailed questions and discussion, visit the Battle.net Research Forum

Kyro
Sep 15, 2007
06:16 PM

Credit goes to l2k-Shadow for the following information:

To get the port # from the port DWORD, use the ntohs function.

Example code in C++:

#include 
#include
#include

#pragma comment(lib, "ws2_32")

void main()
{
char s[] = "\x17\xe0\x00\x00";
DWORD d = 0;
memcpy(&d, s, 4);
cout << ntohs(d) << endl;
}


Credits goes to Chriso.de for VB conversion:

Public Declare Function ntohs Lib "ws2_32" (ByVal netshort As Long) As Long

' Get the port
Port = ntohs(r.GetInt32())


Gary13579
Sep 10, 2008
04:09 AM

Diablo 2 realms went down the morning of 9/7/08, and when they came back up, this packet had changed, breaking a few clientless bots.

The (WORD) Unknown from this packet HAS been removed entirely.

RealityRipple
Sep 11, 2008
11:09 PM

Hmm, strange. Guess we'll never know what it was.

Daedro
Sep 14, 2008
02:41 AM

How to get the port # from DWORD with Python:
socket.ntohs(struct.unpack("< i", "\x17\xe0\x00\x00")[0])


How to convert port to DWORD with Python:
struct.pack("< i", socket.htons(6112))


Remove the space between < and i, these docs dont parse code comments well.

How to get the IP from DWORD with Python:
socket.inet_ntoa("\x3f\xf1\x53\x12")


How to convert IP to DWORD with Python:
socket.inet_aton("63.241.83.18")


Remove the extra quotation marks, these docs dont parse code comments well.

BNLS Server Status
bnls.bnetdocs.org:
bnls.net:
bnls.mattkv.net:
phix.no-ip.org:
pyro.no-ip.biz:
bnls.war-lords.net:
bnls.anubisdev.net:
knight.mattkv.net:

= Online       = Offline

Battle.net Server Status

Battle.net v1

uswest.battle.net:
exodus.battle.net:
useast.battle.net:
asia.battle.net:
europe.battle.net:
ustest.battle.net:
beta.battle.net:
classicbeta.battle.net:
demo.war3.battle.net:

Battle.net v2

us.logon.battle.net:
eu.logon.battle.net:
kr.logon.battle.net:
cn.logon.battle.net:
public-test.logon.battle.net:
us.patch.battle.net:
eu.patch.battle.net:
kr.patch.battle.net:
cn.patch.battle.net:
public-test.patch.battle.net:

emNet

cali.emwar.com:
dallas.emwar.com:
kc.emwar.com:
ny.emwar.com:

PvPGN

server.eurobattle.net:
rubattle.net:
sc.theabyss.ru:
wc3.theabyss.ru:
bnetd.fishbattle.net:

RBNETD

server.bnetdocs.org:

= Online       = Offline



Copyrights

Site scripts and design copyrights reserved to Don Cullen.
Contents copyrighted to Blizzard and their parent corporation, Vivendi.
Main credits for contents goes to Arta. View the rest of credits.
Demented Minds copyrights reserved to Don Cullen 2003-present.
Copyright infringements will be prosecuted to the fullest extent allowable by law.
Please view our legal disclaimer and terms of service.