5.16.3 Converting Between Abstract and Concrete Value Representations

The type ATTRVAL is an encoding that several methods use to send individual directory attribute values across the network. When an attribute has multiple values, and all those values need to be sent, this is performed by sending multiple ATTRVALs.

An ATTRVAL that encodes an OID requires a prefix table for decoding. In some cases, the prefix table accompanies the ATTRVAL in the same RPC request or response. In other cases, a predefined prefix table is sufficient. The process of creating the ATTRVAL for an OID can add an entry to the prefix table that will accompany the ATTRVAL.

The abstract directory model specified in [MS-ADTS] section 3.1.1 represents individual attribute values in the form used by LDAP (see [RFC2252]), minus the BER encoding. In short, values are represented as strings in a variety of formats. The abstract type Value is used to represent an attribute value in the model. Section 5.16.2 specifies the abstract representation for each LDAP syntax.

Therefore, this specification requires procedures that convert between the concrete ATTRVAL encoding and the abstract Value encoding, creating a prefix table while creating the ATTRVAL, and reading a prefix table while decoding the ATTRVAL. These procedures have the following signatures:

 procedure ATTRVALFromValue(
   v: Value, s: AttributeSyntax, var t: PrefixTable) : ATTRVAL
 procedure ValueFromATTRVAL(
   a: ATTRVAL, s: AttributeSyntax, t: PrefixTable) : Value


  • s is an LDAP attribute syntax from the table in section 5.16.2.

  • t is an abstract PrefixTable object, representing a prefix table.

ATTRVALFromValue mutates its input PrefixTable object t; ValueFromATTRVAL does not.

Apart from the prefix table complication, these two procedures are straightforward given the two value representations. These procedures obey the mappings shown in the following table for converting between abstract and concrete value representations.

 LDAP syntax name

 Encoding of ATTRVAL payload

Boolean (


Enumeration (


Integer (


LargeInteger (


Object(Presentation-Address) (


Object(Replica-Link) (


String(IA5) (


String(Numeric) (


String(Object-Identifier) (


String(Octet) (


String(Printable) (


String(Unicode) (


String(UTC-Time) (


String(Generalized-Time) (


Object(DS-DN) (


Object(DN-String) (


Object(DN-Binary) (


Object(Access-Point) (


Object(OR-Name) (


String(NT-Sec-Desc) (


String(SID) (


String(Teletex) (


Since the preceding procedures require a prefix table, a procedure to produce a prefix table is also required, as follows:

     procedure NewPrefixTable() : PrefixTable

The special case value conversion between ATTRTYP and OID is provided by the following two procedures:

     procedure MakeAttid(t: PrefixTable, o: OID) : ATTRTYP
     procedure OidFromAttid(t: PrefixTable, attr: ATTRTYP) : OID

These three procedures, specified in section 5.16.4, describe the algorithm for converting values of type OID to and from their ATTRVAL payload representation using a PrefixTable.

The conversion between an abstract Value representation and a concrete ATTRVAL representation is specified in the following sections, which are organized by abstract value type. In the examples shown:

  • LDAP Value represents the LDAP value.

  • valLen represents the value in the valLen field of the ATTRVAL structure.

  • payload represents the data in the payload (the referent of pVal in the ATTRVAL structure).

Because prefix tables are communicated over the wire, the ConcretePTFromAbstractPT and AbstractPTFromConcretePT procedures are defined to convert between the abstract PrefixTable and the concrete SCHEMA_PREFIX_TABLE.