This deals with the data portion mentioned in
AOL Specs: first layer.
It does not apply to non-FDO data, the first packet transmitted by the client (good luck reversing that one), init packets, and split packets, or the token "f2" (where the data is in raw form: 2x unsigned short -- the data for f2 invoke 40-1827 would be 0x00 0x28 0x07 0x23).
Data {
2 bytes: Token ID
2 bytes: SID (in most cases; see below for exceptions)
2 bytes: microcode opcode
1 byte: length of parameter to opcode
x bytes: parameter
2 bytes: new opcode..
and so on.
}
Some opcodes are of type 2; in that case, the format is not
2 bytes: AOL Opcode
1 byte: length
x bytes: parameter
but
2 bytes: AOL Opcode
1 byte: parameter
This only applies to what the client sends. The server's packets are munged in some way that has not yet been reversed.
Note on SIDs: in some client tokens (file transmissions (x* token IDs) mainly), the SID is absent. This does not follow any preset pattern, so it must be hard-coded for each token ID.