Packet consist of following parts: version number (2), sequence number (4), command code (2),
IN number (2x4), command parameters (parameters have non-fixed length)
|
| 03 00 | | version number (v3 proto) (allways 00 03 for v3 proto) |
| e8 03 | | command code (03 e8 - logon packet) |
| 01 00 | | sequence num 1 (seq1) (in reply packet it = 00 00 ) |
| 02 00 | | sequence num 2 (seq2) (in reply packet it = 00 00 ) |
| 8f e4 5e 00 | | client local (intranet) UIN |
| 00 00 00 00 | | client Internet UIN ??? (current client = 00 00 00 00 ) |
| bf 09 00 00 | | client tcp port number |
| 04 00 | | password length (length with final zero) |
| 25 25 25 00 | | password (ASCIIZ plain string) |
| 7a 00 02 00 | | logon version (current client = 7a 00 02 00 ) |
|
...
|
|
Server and client have no-crossed sequenses numbers. Client start from 00 01 (sec2 from 00 02)
and increase seq number in each packet with 1. Server start seq1 from 00 00 and increase it in
each packet with 1 and it doesn't change seq2 - it equiv 00 00 (if this is not reply packet)
and it = seq2 of replyed packet. Seq2 in client messages used in reply packets to identify them.
All strings are ASCIIZ - ASCII string with zero at the end to identify end_of_string. Before
each string there are 2 bytes of its length. TCP port number use 4 bytes (strange, isn't it?)
Client ACK (reply) packets must have zero seq2 and seq1 = seq1 of server packet. Server ACK
must have seq1 = seq1 of server packet and seq2 = seq2 of server packet.
--- V3G protocol packets description.
Client commands overview
Server replies/async overview