[comp.windows.x] Questions on PEX protocol Spec.

ksung@uiucdcsm.cs.uiuc.edu (06/24/88)

I've noticed some inconsistency between the PEX protocol specification
and the encoding documentation  (Version 3.1)

In the version 3.1 protocol spec., PEX_FetchStructure and 
PEX_FetchElementRange protocols are removed and PEX_FetchElements is added in. 
However, the encoding scheme for FetchStructure and FetchElementRange
still exists in 3.1 encoding documentation, while there's no documentation
on how to encode FetchElements.

Also, in the header file :

	PEX.h - opcode for PEX_FetchStructure & PEX_FetchElementRange
		are still there, but there's no opcode for PEX_FetchElements

Another thing I noticed is the inconsistency betweem the encoding 
documentation and the header file PEXproto.h. Some examples are:

Encoding documentation says:

Get Extension reply
(1)--> 	1      CARD8           reply opcode
(2)-->  1      1               PEX opcode
(3)-->	2      CARD16          sequence number
(4)-->  2      n               length of vendor name
(5)-->	4      (n+p)/4         reply length (# additional (>5) words in reply)
(6)-->	2      CARD16          protocol major version
(7)-->	2      CARD16          protocol minor version
(8)-->	4      CARD32          release number
(9)-->	4      CARD32          subset information 
(10)-->12                      unused

while in PEXproto.h the reply structure is defined as :

typedef struct {

(1)--> 	BYTE        type;   /* X_Reply */
(2)--> 	CARD8       what;
(3)--> 	CARD16      sequenceNumber  B16;
(4)--> 	CARD32      length B32;     /* not 0 */
(5)--> 	CARD16      majorVersion B16;
(6)--> 	CARD16      minorVersion B16;
(7)--> 	CARD32      release B32;
(8)--> 	CARD32      lengthName B32;
(9)--> 	CARD32      subsetInfo B32;
(10)-->	BYTE        pad[8];

} pexGetExtensinoInfoReply;

Notice, length_of_vendor_name is defined to be 2 bytes in encoding 
ducoment, while PEXproto.h defined it to be 4 bytes. Also, the 
release_number comes before subset_information in encoding 
document, while it's another way around in PEXproto.h


Another example is ElementSearchReq :

Encoding Document says:

Element Search
 1      CARD8           opcode (x11 assigned)
 1      42              PEX opcode
 2      5+i+e           request length
 4      CARD32          Structure ID
 2                      whence
        0       Beginning
        1       Current
        2       End
 2                      direction
        0       Forward
        1       Backward
 4                      offset
 2      i               number of elements in incl list
 2                      unused
 4i                     LISTofELEMENT_TYPE (incl)
 2      e               number of elements in excl list
 2                      unused
 4e                     LISTofELEMENT_TYPE (excl)

while in PEXproto.h the request structure is defined as :

typedef struct {
    CARD8               reqType;
    CARD8               opcode;
    CARD16              length B16;
    pexStructure        sid B32;
    pexElementPos       position;
    CARD32              direction B32;
    CARD32              numIncls B32;
    CARD32              numExcls B32;
} pexElementSearchReq;

pexElementPos is defined in PEXprotostr as:
typedef struct {
    CARD16	whence B16;
    CARD16	pad B16;
    INT32	offset B32;
} pexElementPos;

In the encoding document the 11th & 12th bytes specifies direction while in 
PEXproto.h the 11th & 12th bytes are not used. 


In situiations like this (when things do not agree), which one should
we believe? 

Another question is: Is the documentation for version 3.1 PEX overview
		     ready yet? If yes, where can I get it? If no,
		     anyone has any idea when it will be ready?

ksung@m.cs.uiuc.edu