Skip to main content

The Protocol

Given the developing nature of the protocol and its intent, the command lines are composed of a command (case ignored) followed by white space, the argument(s) and a <CRLF>. The white space is required if any arguments are supplied but the arguments are optional. White space following the command and any optional arguments are ignored.

<cmdline> := <cmd> [<WS> <args>] [<WS>] <CRLF>

<WS> := [<WS>] <WS> | <TAB> | <SPACE>

Coded response lines have the rigid format of a 3-digit decimal code followed by a space or a dash followed by text composed of characters within the ASCII range 32 to 126 (octal 40 to 176) with <CRLF> at the end of the line. The dash after the 3-digit code indicates at least one more response line will be supplied while the space indicates the current response line is the last one.

<rspline> := <digit><digit><digit><cont><rtext><CRLF>

<cont> := <SPACE> | "-"

<rtext> := ASCII characters in the range 32 to 126.

Some of the successful response text to certain commands have rigid formats so programs can extract path information. The commands that have format restrictions are clearly noted and the response format is documented with the command.

The response codes are in the range from 200 to 599 inclusively. The following paragraphs provide the break down for each digit.

The first, most significant, digit is the success indicator. It breaks down into the simple success and total failure responses but includes the ability to communicate a temporary failure condition and the need for further information that has worked so well for SMTP [5] and other similiar protocols. The codes are:

2xx  Positive reply.

3xx Intermedate reply. Positive acknowlegement but more
information is neccessary.

4xx Temporary error. Try again later.

5xx Permanent error. Do not retry.

The second digit is used to classify the response to provide a flavor for certain types of success. The flavor is apparent in providing the response on whether a host name is known by a domain name server or not. The codes are:

x0x  Command related response.

x1x Connection related response.

x2x Database related response.

x3x Domain transition related response.

x4x Data added response.

x5x Data deleted response.

x6x Data modified response.