Plus, beyond the leading op_code (OP_SessionRequest is 0x01 and Op_SessionResponse is 0x02) here is the structure of the SessionRequest and SessionResponse packets:
Code:
struct SessionRequest {
unsigned long UnknownA;
unsigned long Session;
unsigned short UnknownB;
unsigned short MaxLength;
};
struct SessionResponse {
unsigned long Session;
unsigned long Key;
unsigned short UnknownA;
unsigned char UnknownB;
unsigned char UnknownC;
unsigned short MaxLength;
unsigned long UnknownD;
};
In the login server Key is ignored and unused. In the chatchannels it is used to "scramble" the packets being sent.