Subject [FIREBIRD WIRE PROTOCOL] Documentation
Author

Hi,

i try to implement a driver and i play with the wire protocol but i need help !

i have found this doc : http://sourceforge.net/p/firebird/NETProvider/ci/3.1.1.0/tree/Documentation/FirebirdWireProtocol/ => FirebirdWireProtocol.pdf

For exemple the packet to send for a connect is :

Int32 => Operation code (op_connect)
Int32 => Operation code (op_attach)
Int32 => Version (CONNECT_VERSION2)
Int32 => Architecture type (Generic = 1)
String => Database path
Int32 => Protocol versions understood (1)
Buffer => User identification
Int32 => Protocol version (PROTOCOL_VERSION10)
Int32 => Architecture type (Generic = 1)
Int32 => Minimum type (2)
Int32 => Maximum type (3)
Int32 => Preference weight (2)

the problem is that i don't find the doc that describe the buffer for user identification.

i have take a look in the dotnet provider : and i found this :

it is the code for the buffer

user_id.WriteByte(1); => what is the 1 ?
user_id.WriteByte((byte)user.Length);
user_id.Write(user, 0, user.Length);
// Host    name
user_id.WriteByte(4); => what is the 4 ?
user_id.WriteByte((byte)host.Length);
user_id.Write(host, 0, host.Length);
// Attach/create using this connection will use user verification
user_id.WriteByte(6); => what is the 6 ?
user_id.WriteByte(0); => what is the 0 ?

more globally how i can found the description of this buffer ? and do you know a more detailed documentation about the wire protocol ?

Thanks in advance.