Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
where:
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 (2.2.5.8) |
INT32 |
Enumeration (2.5.5.9) |
INT32 |
Integer (2.5.5.9) |
INT32 |
LargeInteger (2.5.5.16) |
INT64 |
Object(Presentation-Address) (2.5.5.13) |
|
Object(Replica-Link) (2.5.5.10) |
OctetString |
String(IA5) (2.5.5.5) |
String8 |
String(Numeric) (2.5.5.6) |
String8 |
String(Object-Identifier) (2.5.5.2) |
|
String(Octet) (2.5.5.10) |
OctetString |
String(Printable) (2.5.5.5) |
String8 |
String(Unicode) (2.5.5.12) |
String16 |
String(UTC-Time) (2.5.5.11) |
|
String(Generalized-Time) (2.5.5.11) |
DSTIME |
Object(DS-DN) (2.5.5.1) |
|
Object(DN-String) (2.5.5.14) |
|
Object(DN-Binary) (2.5.5.7) |
SYNTAX_DISTNAME_BINARY |
Object(Access-Point) (2.5.5.14) |
SYNTAX_DISTNAME_BINARY |
Object(OR-Name) (2.5.5.7) |
SYNTAX_DISTNAME_BINARY |
String(NT-Sec-Desc) (2.5.5.15) |
SECURITY_DESCRIPTOR |
String(SID) (2.5.5.17) |
|
String(Teletex) (2.5.5.4) |
String8 |
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.