C>S 0x50 SID_AUTH_INFO

Transport Layer:Transmission Control Protocol (TCP)
Application Layer:Battle.net v1 TCP Messages (SID)
Message Id:0x50
Message Name:SID_AUTH_INFO
Direction:Client to Server
Used By:Starcraft Original, Starcraft Broodwar
Diablo II, Diablo II Lord of Destruction
Warcraft III Reign of Chaos, Warcraft III The Frozen Throne
Message Format:
(does not include protocol header)
(UINT32) Protocol ID
(UINT32) Platform code
(UINT32) Product code
(UINT32) Version byte
(UINT32) Language code
(UINT32) Local IP
(INT32) Time zone bias
(UINT32) MPQ locale ID
(UINT32) User language ID
(STRING) Country abbreviation
(STRING) Country

Remarks

Sends information about the client's product and locale to Battle.net.

Field descriptions:

  • Protocol ID: Battle.net's current Protocol ID is 0x00. This field has only been seen with a value of 0x00.
  • Platform code: Identifies the client's platform value.
  • Product code: Identifies the client's product value.
  • Version byte: Identifies the client's version number.
  • Language code: Identifies the client's language value. If set to 0x00 the server will likely use its default, or English (enUS). This value is used to determine the client's home channel (eg: Diablo II En-1).
  • Local IP: This is the local network IP of the client, in network byte (big-endian) order, for NAT compatibility. Can safely be set to 0.0.0.0, or 0x00.
  • Timezone bias: The difference between UTC and local time, in minutes.
    • Retrieve using TIME_ZONE_INFORMATION structure returned from GetTimeZoneInformation()
    • Depending on whether the return value is TIME_ZONE_ID_STANDARD or TIME_ZONE_ID_DAYLINE, add TZI.Bias + TZI.StandardBias or TZI.Bias + TZI.DaylightBias to get the bias in minutes, where TZI is the returned TIME_ZONE_INFORMATION structure.
    • Alternatively, you may use GetSystemTime(), GetLocalTime(), and SystemTimeToFileTime(): convert both system and local time to FILETIMEs, subtract local time from system time, and divide by 600,000,000 to get the bias in minutes.
  • MPQ locale ID: This field is part of Blizzard's multi-lingual MPQ system and is used to specify which version of an MPQ should be used when the MPQ is available in multiple languages. Can safely be set to 0x00, but you may also use something like GetUserDefaultLCID().
  • User language ID: Can be retrieved with GetUserDefaultLangID(). Can safely be set to 0x00.
  • Abbreviated country name and country name: Can be retrived with GetLocaleInfo() with LCType set to LOCALE_SABBREVCTRYNAME (three-letter code) and LOCALE_SENGLISHCOUNTRYNAME (English country name) respectively.
    • If you're unable to retrieve these values you can use USA and United States.
| Edited: Anonymous

Comments

Chriso

Local IP address in network byte order can be determined using the inet_addr API (http://msdn2.microsoft.com/en-us/library/ms738563.aspx)

Region can be determined by joining LOCALE_SISO639LANGNAME and LOCALE_SISO3166CTRYNAME together after they have been determined by the GetLocaleInfo API e.g.:
Region = GetLocaleInfo(LOCALE_SISO639LANGNAME) & GetLocaleInfo(LOCALE_SISO3166CTRYNAME)

Caaaaarrrrlll

The product ID can use W2BN / WarCraft II BNE. I saw MirageBot by Chriso using it when I network-logged it, and it works just fine as of June 8th, 2009. All I am saying is, W2BN does not have to use the older version (CLIENTID packets), and that it can use this newer version (SID_AUTH_INFO, SID_AUTH_CHECK, SID_LOGONRESPONSE2, SID_ENTERCHAT).

In an interesting topic, I wonder (have not tested) if it is possible to supply CHAT to the product ID, instead of an actual binary client like STAR or WAR3. If you could do this, then the ol' Chat-icon that was seen back before 2005 may still be able to be seen around the Battle.net.