• Welcome to Valhalla Legends Archive.
 

D2GS Packets

Started by DarkMinion, July 20, 2004, 03:54 PM

Previous topic - Next topic

DarkMinion

Are they all compressed, or just certain packets?

UserLoser.

All of the packets from the server are compressed.

ChR0NiC

#2
JESUS!! :o CHECK OUT THAT RACK !!

Here's some documentation by the whole world's good friend Userloser, which you probably already know about. Userloser's Packet Referral

Edit: As you can see, he has done alot of work on it. Cheers to you UserLoser.

UserLoser.

For those of you interested in this look in D2Net.dll @ .data:6FC08148 PacketSizeTable.  It seems to be:


DWORD PacketSizeTable[] = { 0x1, 0x8, 0x1, 0xc, ... };


Where 0x1, would be length of packet 0x0, 0x8 is length of packet 0x1, and so on.

OnlyMeat

Quote from: UserLoser. on July 20, 2004, 04:02 PM
All of the packets from the server are compressed.

I have been working on D2GS packets recently, and from my experience some packets are compressed and others are not take for example the first couple of packets the D2GS server sends you when you connect:-

(1) AE 01 00 00 00 00
(2) 05 7A 09 2E EF 00

These dont appear to be compressed( the first byte are always these values) and especially considering their size the ratio would be insignifigant.

Also another interesting fact is the format it'self does not appear to be uniform for the smaller packets ie. < 10 bytes the first byte seems to be the length ( - the nulls) although not in all cases as proved by the (1) example.

And again the larger packets (compressed ones) the first byte appears to be the compressed length of the packet, for instance while experimenting i found that in game chat messages use a compressed format of:-

S-->C
(BYTE) Compressed Length
(BYTE) 0x0f always this value for messages

Just as a side note the server sends back the message you sent which is a little inefficient as the client could just simulate that event locally.

I am still working on in game packets currently so this may not be totally correct but it appears this way from my analysis.

Soul Taker

Quote from: OnlyMeat on July 21, 2004, 08:28 PM
Just as a side note the server sends back the message you sent which is a little inefficient as the client could just simulate that event locally.
If you simulated all your actions locally with no confirmation from the server, there would be lots of desynching due to lag I would think.

UserLoser.

Quote from: OnlyMeat on July 21, 2004, 08:28 PM

I have been working on D2GS packets recently, and from my experience some packets are compressed and others are not take for example the first couple of packets the D2GS server sends you when you connect:-

Oops, but as far as I know, all the packets actually in the game are compressed from the server.

OnlyMeat

#7
Quote from: Soul Taker on July 21, 2004, 08:50 PM
Quote from: OnlyMeat on July 21, 2004, 08:28 PM
Just as a side note the server sends back the message you sent which is a little inefficient as the client could just simulate that event locally.
If you simulated all your actions locally with no confirmation from the server, there would be lots of desynching due to lag I would think.

I did'nt say all actions i mean just the chat messages like the way bnchat does it if you send a message in a channel the server does'nt send you back the message you sent in the first place it would just be superflous and cause undue network bandwidth usage albeit maybe only a small amount for the client but if the server does that for each client you can see how it will build up.

I mean think about it in the end it's just drawing some text to a local direct draw device it's not going to affect the way the game plays out :p

Thinking again actually some clients do get an echo of the message back ie. d2 chat clients but sc/bw war 2 and d1 dont as far as i know

iago

Just on a sidenote -- Blizzard HAS implemented some anti-botting and anti-hacking code into Diablo II 1.1.  They have yet to act on it, however, but the code has been identified by a friend of mine.  Just a word of warning, I would'nt recommend botting on your own cdkey/account.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*