Network Working Group M. Rose
Request for Comments: 1202 Performance Systems International, Inc.
February 1991
Directory Assistance Service
1. Introduction
The OSI Directory [1] provides a powerful infrastructure for the retrieval of information objects. This infrastructure can be used to support, e.g., white pages applications, application entity lookup, and so on. The Directory service is provided to applications through the Directory Access Protocol (DAP), which binds a Directory User Agent (DUA) to a Directory System Agent (DSA).
Rose [Page 1]
RFC 1202 Directory Assistance Service February 1991
| Directory Service
| provided via DAP
|
+-----------+ | +-----------+
| | | | |
| DUA | <----------+----------> | DSA |
| | | | |
+-----------+ | +-----------+
|
Directory User |
The DAP is an OSI application layer protocol which uses the rich OSI upper-layer infrastructure. Unfortunately, the coding investment to implement the DAP is significant. As such, it is difficult to host applications using the Directory on smaller workstations and personal computers.
Rose [Page 2]
RFC 1202 Directory Assistance Service February 1991
| Directory Service
split-DUA | provided via DAP
|
+-----------+ | +-----------+
| | | | |
| Directory | <----------+----------> | DSA |
| Assistant | | | |
| | | +-----------+
+-----------+ |
/|\ |
| |
| DA-service |
| provide via |
| DA-protocol |
| |
------+------ |
| |
| |
| |
| |
| |
\|/ |
+-----------+ |
| | |
| DA-client | |
| | |
+-----------+ |
|
Directory User |
1.1. An Aside
This memo documents an already existing protocol, which was originally used to provide a split-DUA model within the same host. In the absence of detailed historical and implementational understanding, some of the mechanisms described may not appear intuitive.
2. Protocol
The DA service operates using two TCP connections: a control connection, and a data connection. The control connection defines the lifetime of an instance of the DA service; throughout this lifetime, several data connections may be established. However, at any given instant, between zero and one data connections will be in progress. The DA service is provided by the "Directory Assistant", which consists of two entities: a DA-server, which manages the control connection; and, a DAP-listener, which responds to commands on the data connection. The DA-server oversees the behavior of the DAP- listener.
Rose [Page 3]
RFC 1202 Directory Assistance Service February 1991 2.1. Control ConnectionData sent over the control connection consists of a series of transactions. NVT-ASCII is used to express these transactions. Each transaction consists of the client sending a directive--a line of text terminated by CR-LF; the DA-server returns a response--a line of text terminated by CR-LF. All responses from a DA-server start with either "+OK" or "-ERR" depending on whether the transaction was successful.
2.1.1. Initialization
A DA-server listens on TCP port 411 for incoming connections. Upon establishing a control connection, the DA-server returns a response indicating whether the service has been started. If successful, the response contains an IP-address and a TCP port, expressed in NVT- ASCII, and separated by one or more instances of the space character. This information corresponds to the TCP-endpoint that the DAP- listener will use for the data connection.
2.1.2. Transactions
All transactions with the DA-server consist of a command followed by zero or more arguments, separated by the space character.
2.1.2.1. INTR command
The INTR command takes no arguments.
Rose [Page 4]
RFC 1202 Directory Assistance Service February 1991 2.1.2.2. STAT commandThe STAT command takes no arguments.
2.1.2.3. QUIT command
The QUIT command takes no arguments.
2.2. Data Connection
Data sent over a data connection consists of a single DAP- transaction. NVT-ASCII is used to express these transactions. Each transaction consists of the client sending a command--a line of text terminated by the LF-character; the DAP-listener returns zero or more responses, each with a specific termination sequence. All responses from a DAP-listener start with a single identifying character. If the character is a digit (0-9), then the termination sequence consists of a closing the data connection; otherwise, if the character is a lower-case letter (a-z), then the response is interactive and is terminated by the LF-character.
2.2.1. Transactions
All transactions with the DAP-listener consist of a command followed by zero or more arguments, separated by the space character. Double-quotes may be used to prevent separation of tokens.
Rose [Page 5]
RFC 1202 Directory Assistance Service February 1991
See [2] for a complete list of commands and arguments.
2.2.2. Responses
There are two kinds of responses: numeric-responses, which consist of arbitrary text; and, letter-responses, which consist of brief text, and expect further interaction from the client.
2.2.2.1. Numeric Responses
If the response is '1', then the DAP-transaction terminated normally; if the response is '2', then the DAP-transaction failed; if the response is '3', then the DAP-transaction was a search returning more than one result and one of the -hitone or -list option was selected for the search; if the response is '4', then the DAP-transaction terminated normally and the remainder of this line consists of the name of an entry (see the 'd' Response below); if the response is '5', then all children of an entry were found by the DAP-transaction. Once the response is completely sent, the DAP-listener closes the data connection.
2.2.2.2. 'm' Response
The 'm' response contains a one-line message which should be presented to the user.
2.2.2.3. 'y' Response
The 'y' response contains a yes/no question which should be presented to the user. After querying the user, the response (either 'y' or 'n'), followed by the LF-character, should be sent to the DAP- listener. The client should then continue reading from the existing data connection.
Rose [Page 6]
RFC 1202 Directory Assistance Service February 1991 2.2.2.4. 'p' ResponseThe 'p' response contains a password-prompt which should be presented to the user. After querying the user, the client returns a response consisting of 'p' followed by the password supplied by the user followed by the LF-character. The client should then continue reading from the existing data connection.
2.2.2.5. 'e' Response
The 'e' response is used to ask the user to edit some text. Following the 'e' character is a decimal number in ASCII followed by the LF-character, indicating the number of octets that should be presented to the user for editing (these octets may include LF- characters).
2.2.2.6. 'l' Response
The 'l' response contains an entry for a selection list to be presented to the user. The form of this entry consists of two strings separated by the '$' character, and terminated by the LF- character. The first string is a user-friendly name, suitable for display to the user; the second string is a fully-qualified Distinguished Name in textual format. At this point, the client returns a response consisting of 'l' followed by the LF-character.
Rose [Page 7]
RFC 1202 Directory Assistance Service February 1991
The client should continue to accumulate selection entries until an LF-character.
2.2.2.7. 'd' Response
The 'd' response contains a name that the client may be interested in. The form of this name consists of two strings separated by the '$' character, and terminated by the LF-character. The first string is a user-friendly name, suitable for display to the user; the second string is a fully-qualified Distinguished Name in textual format.
2.2.2.8. 'P' Response
The 'P' response is used to transmit a picture to the client. Following the 'P' character is a decimal number in ASCII followed by a name and then the LF-character. The decimal number indicates the size of the picture. The name contains three strings separated by the '$' character. The first string is the name of the attribute corresponding to the picture, in textual format; the second string is a user-friendly name, suitable for display to the user; and, the third string is a fully-qualified DistingiushedName in textual format.
Rose [Page 8]
RFC 1202 Directory Assistance Service February 1991
Regardless of the outcome, the client should then continue reading from the existing data connection.
3. Example Interaction
In the text that follows, "S:" refers to the DA-server, "L:" refers to the DAP-listener, "C:" refers to the client talking to the DA- server, and, "I:" refers to the client talking to the DAP-listener.
Rose [Page 9]
RFC 1202 Directory Assistance Service February 1991
<followed by much data>
4. References
[1] Information Processing - Open Systems Interconnection - The
Rose [Page 10]
RFC 1202 Directory Assistance Service February 1991 5. Security ConsiderationsSecurity considerations are not discussed in this memo.
6. Author's Address
Marshall T. Rose PSI, Inc. PSI California Office P.O. Box 391776 Mountain View, CA 94039