Table of Contents |
LDAP4D Directory at A Dog And His Boy |
LDAP4D Directory - Protocol Handling |
|
About this section... |
This section describes the methods used to perform selected
protocol operations specified in RFC 2251. To simplify usage and development of this component many
aspects of LDAP v3 are not implemented. Primarily, LDAP4D Directory is
designed to return search results for email clients. |
LDAPD_BindResponse |
||||||||||||||||||||||||||
Syntax: |
blob := LDAPD_BindResponse ( iResultCode:LI ; tMatchedDN:T tErrorMessage:T ) |
|||||||||||||||||||||||||
Description: |
Create a BER encoded bind response. |
|||||||||||||||||||||||||
Warning: |
none | |||||||||||||||||||||||||
Note: |
SASL Authentication option is NOT supported. See See RFC 2251 4.1.10. |
|||||||||||||||||||||||||
Params: |
|
|||||||||||||||||||||||||
Example: |
$oBlob := LDAPD_BindResponse(0;$tPassword;"Woohoo! Success") |
LDAPD_GetMessageID |
||||||||||||||||
Syntax: |
messageID := LDAPD_GetMessageID (->blob) |
|||||||||||||||
Description: |
Get the message ID from an input stream. |
|||||||||||||||
Warning: |
This will consume the message ID (or as much as it gets
through) from the blob. Check LDAPD_iError to see if the function executed successfully. |
|||||||||||||||
Note: |
The message ID pulled from a SearchRequest should be used when sending results (SearchResultEntry and SearchResDone) back to the client. |
|||||||||||||||
Params: |
|
|||||||||||||||
Example: |
$iMessageID := LDAPD_GetMessageID(->oBlob) |
LDAPD_ParseBindRequest |
||||||||||||||||
Syntax: |
result := LDAP_ParseBindRequest (->oBlob) |
|||||||||||||||
Description: |
Given a presumed BER encoded blob, pull out an expected
BindRequest |
|||||||||||||||
Warning: |
This will consume the bind request (or as much as it gets
through) from the blob. |
|||||||||||||||
Note: |
Generally called from one of the request handlers. |
|||||||||||||||
Params: |
|
|||||||||||||||
Example: |
$flag := LDAPD_ParseBindRequest (->oBlob) |
LDAPD_ParseSearchRequest |
|||||||||||||||||||||||||||||||||||||||||||||||||||
Syntax: |
$flag := LDAPD_ParseSearchRequest ( pBlob:P; pAttributeNames:P; pAttributeFieldPointers:P; pSearchAttributes:P; pSearchValues:P; pSearchOperators:P; pAttributeModifiers:P; pRequestedAttributes:P ) |
||||||||||||||||||||||||||||||||||||||||||||||||||
Description: |
Given a presumed BER encoded blob, parse an expected
SearchRequest and put acquired values into arrays so that a search can
be built. |
||||||||||||||||||||||||||||||||||||||||||||||||||
Warning: |
This will consume the search request (or as much as it gets through) from the blob. | ||||||||||||||||||||||||||||||||||||||||||||||||||
Note: |
Generally called from one of the request handlers. If successful, LDAP_SearchFilter
will be populated. SearchValues will be paired with SearchAttributes.
SearchOperators will correspond with values in the LDAP_SearchFilter and will
have the following values "and", "or", "not".
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Params: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Example: |
$flag :=LDAPD_ParseSearchRequest(->oBlob) |
LDAPD_SearchResultEntry |
||||||||||||||||||||||||||
Syntax: |
result := LDAPD_SearchResultEntry ( distinguishedName;T ; pAttributeTypes:P ; pAttributeValues:P ) |
|||||||||||||||||||||||||
Description: |
Create a BER encoded LDAP SearchResultEntry that can then be bundled into an LDAP message and sent back to requesting client. |
|||||||||||||||||||||||||
Warning: |
Only single attribute values are supported. |
|||||||||||||||||||||||||
Note: |
`$1 = text = distinguished name |
|||||||||||||||||||||||||
Params: |
|
|||||||||||||||||||||||||
Example: |
$tText :=LDAPD_SearchResultEntry("uid=tswenson, o=dogboy";->at_attributeArray;->at_attributeValues) |
LDAPD_SearchResultDone |
||||||||||||||||||||||||||
Syntax: |
blob := LDAPD_SearchResultDone ( distinguishedName;T ) |
|||||||||||||||||||||||||
Description: |
Create a BER encoded SearchResDone message content. |
|||||||||||||||||||||||||
Warning: |
||||||||||||||||||||||||||
Note: |
Send this with LDAPD_MessageSend |
|||||||||||||||||||||||||
Params: |
|
|||||||||||||||||||||||||
Example: |
$blob := LDAP_SearchResultDone($tDN;"some made up DN";"") |