directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu" <aok...@bellsouth.net>
Subject [snickers] Prefabricated tags?
Date Sun, 28 Mar 2004 04:01:45 GMT
Alan,

MessageTypeEnum values are not prefabricated tag octets!

For some time now I thought those constant values in the MessageTypeEnum
represented the prefabricated tag for the LDAP message type CHOICE.  I don't
remember how but I got them from SNACC4J for some reason. After our IM
conversation I looked at it more in depth and realized that they in fact are
not.  If you look at the values we have:

    /** Bind request protocol message type value */
    public static final int BINDREQUEST_VAL = 0x40000000 ;
    /** Bind response protocol message type value */
    public static final int BINDRESPONSE_VAL = 0x40000001 ;
    /** Unbind request protocol message type value */
    public static final int UNBINDREQUEST_VAL = 0x40000002 ;
    /** Search request protocol message type value */
    public static final int SEARCHREQUEST_VAL = 0x40000003 ;

and so on.

The byte values for the actual tags would be 0x60, 0x61, 0x62, and 0x63
respectively.  All these types are of the APPLICATION type class and are
constructed TLVs so the first three bits would always be 011.  So the
correct tags are not used in that enum but perhaps they should be.  WDYT?

Alex



Mime
View raw message