[Xcb] Connecting to an X Server

Thien-Thi Nguyen ttn at gnuvola.org
Tue Aug 5 00:41:36 PDT 2008


() "Antoine Latter" <aslatter at gmail.com>
() Mon, 4 Aug 2008 21:38:10 -0500

   After I get a handle to the server the first thing I do is send down
   my 10-byte setup-request, which consists of:

"Normal" messages pad internal fields up to the next 4-byte boundary, and in
turn pad the message up to a minimum of 32-bytes.  The `SetupRequest' is a
anomolous, IIRC, in that the usual 32-byte minimum padding is not required.
Quoting its description from the X Protocol document, Appendix B:

 |Information sent by the client at connection setup:
 |   1                             byte-order
 |       #x42         MSB first
 |       #x6C         LSB first
 |   1                             unused
 |   2   CARD16                    protocol-major-version
 |   2   CARD16                    protocol-minor-version
 |   2   n                         length of authorization-protocol-name
 |   2   d                         length of authorization-protocol-data
>|   2                             unused
 |   n   STRING8                   authorization-protocol-name
 |   p                             unused, p=pad(n)
 |   d   STRING8                   authorization-protocol-data
 |   q                             unused, q=pad(d)

It sounds like you have discovered the first `unused' field (highlighted)
through trial and error.

thi


More information about the Xcb mailing list