home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1000s / rfc1037.txt < prev    next >
Text File  |  1987-12-16  |  192KB  |  4,819 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                      B. Greenberg
  8. Request for Comments:  1037                                    S. Keene
  9.                                                           December 1987
  10.  
  11.  
  12.                     NFILE -  A File Access Protocol
  13.  
  14.  
  15. STATUS OF THIS MEMO
  16.  
  17.    This document includes a specification of the NFILE file access
  18.    protocol and its underlying levels of protocol, the Token List
  19.    Transport Layer and Byte Stream with Mark.  The goal of this
  20.    specification is to promote discussion of the ideas described here,
  21.    and to encourage designers of future file protocols to take advantage
  22.    of these ideas.  A secondary goal is to make the specification
  23.    available to sites that might benefit from implementing NFILE.  The
  24.    distribution of this document is unlimited.
  25.  
  26.                              TABLE OF CONTENTS
  27.                                                                     Page
  28.    1.  INTRODUCTION                                                    3
  29.  
  30.    2.  NFILE PROTOCOL LAYERING                                         4
  31.  
  32.    3.  OVERVIEW OF AN NFILE SESSION                                    5
  33.  
  34.    4.  NFILE CONTROL AND DATA CONNECTIONS                              6
  35.  
  36.    5.  NFILE FILE OPENING MODES                                        7
  37.  
  38.    6.  NFILE CHARACTER SET                                             9
  39.  
  40.    7.  CONVENTIONS USED IN THIS DOCUMENT                              10
  41.  
  42.        7.1  Mapping Data Types Into Token List Representation         10
  43.        7.2  Format of NFILE Commands and Responses                    10
  44.        7.3  Data Channel Handles and Direct File Identifiers          13
  45.        7.4  Syntax of File and Directory Pathname Arguments           13
  46.        7.5  Format of NFILE File Property/Value Pairs                 14
  47.  
  48.    8.  NFILE COMMANDS                                                 16
  49.  
  50.        8.1  ABORT Command                                             16
  51.        8.2  CHANGE-PROPERTIES Command                                 16
  52.        8.3  CLOSE Command                                             17
  53.        8.4  COMPLETE Command                                          19
  54.        8.5  CONTINUE Command                                          20
  55.  
  56.  
  57.  
  58. Greenberg & Keene                                               [Page 1]
  59.  
  60. RFC 1037             NFILE - A File Access Protocol        December 1987
  61.  
  62.  
  63.        8.6  CREATE-DIRECTORY Command                                  21
  64.        8.7  CREATE-LINK Command                                       21
  65.        8.8  DATA-CONNECTION Command                                   22
  66.        8.9  DELETE Command                                            23
  67.        8.10  DIRECT-OUTPUT Command                                    23
  68.        8.11  DIRECTORY Command                                        24
  69.             8.11.1  NFILE DIRECTORY Data Format                       26
  70.        8.12  DISABLE-CAPABILITIES Command                             27
  71.        8.13  ENABLE-CAPABILITIES Command                              28
  72.        8.14  EXPUNGE Command                                          28
  73.        8.15  FILEPOS Command                                          29
  74.             8.15.1  Implementation Hint for FILEPOS Command           30
  75.        8.16  FINISH Command                                           30
  76.        8.17  HOME-DIRECTORY Command                                   31
  77.        8.18  LOGIN Command                                            32
  78.        8.19  MULTIPLE-FILE-PLISTS Command                             34
  79.        8.20  OPEN Command                                             35
  80.             8.20.1  NFILE OPEN Optional Keyword/Value Pairs           39
  81.             8.20.2  NFILE OPEN Response Return Values                 45
  82.        8.21  PROPERTIES Command                                       47
  83.        8.22  READ Command                                             49
  84.        8.23  RENAME Command                                           50
  85.        8.24  RESYNCHRONIZE-DATA-CHANNEL Command                       51
  86.             8.24.1  Implementation Hints for RESYNCHRONIZE-DATA-      51
  87.                     CHANNEL Command
  88.        8.25  UNDATA-CONNECTION Command                                52
  89.  
  90.    9.  NFILE RESYNCHRONIZATION PROCEDURE                              53
  91.  
  92.        9.1  NFILE Control Connection Resynchronization                54
  93.        9.2  NFILE Data Connection Resynchronization                   55
  94.  
  95.    10.  NFILE ERRORS AND NOTIFICATIONS                                58
  96.  
  97.        10.1  Notifications From the NFILE Server                      58
  98.        10.2  NFILE Command Response Errors                            59
  99.        10.3  NFILE Asynchronous Errors                                60
  100.        10.4  NFILE Three-letter Error Codes                           61
  101.  
  102.    11.  TOKEN LIST TRANSPORT LAYER                                    65
  103.  
  104.        11.1  Introduction to the Token List Transport Layer           65
  105.        11.2  Token List Stream                                        66
  106.             11.2.1  Types of Tokens and Token Lists                   66
  107.             11.2.2  Token List Stream Example                         68
  108.             11.2.3  Mapping of Lisp Objects to Token List Stream      70
  109.                     Representation
  110.             11.2.4  Aborting and the Token List Stream                71
  111.  
  112.  
  113.  
  114. Greenberg & Keene                                               [Page 2]
  115.  
  116. RFC 1037             NFILE - A File Access Protocol        December 1987
  117.  
  118.  
  119.        11.3  Token List Data Stream                                   72
  120.  
  121.    12.  BYTE STREAM WITH MARK                                         73
  122.  
  123.        12.1  Discussion of Byte Stream with Mark                      73
  124.        12.2  Byte Stream with Mark Abortable States                   75
  125.  
  126.    13.  POSSIBLE FUTURE EXTENSIONS                                    77
  127.  
  128.    APPENDIX A.  NORMAL TRANSLATION MODE                               79
  129.  
  130.    APPENDIX B.  RAW TRANSLATION MODE                                  83
  131.  
  132.    APPENDIX C.  SUPER-IMAGE TRANSLATION MODE                          84
  133.  
  134.    NOTES                                                              86
  135.  
  136.                               LIST OF TABLES
  137.  
  138.    TABLE 1.    TRANSLATIONS FROM NFILE CHARACTERS TO UNIX CHARACTERS  80
  139.    TABLE 2.    TRANSLATIONS FROM UNIX CHARACTERS TO NFILE CHARACTERS  80
  140.    TABLE 3.    TRANSLATIONS FROM NFILE TO PDP-10 CHARACTERS           81
  141.    TABLE 4.    TRANSLATIONS FROM PDP-10 CHARACTERS TO NFILE           82
  142.                CHARACTERS
  143.    TABLE 5.    SUPER-IMAGE TRANSLATION FROM NFILE TO ASCII            84
  144.    TABLE 6.    SUPER-IMAGE TRANSLATION FROM ASCII TO NFILE            85
  145.  
  146. 1.  INTRODUCTION
  147.  
  148.    NFILE stands for "New File Protocol".  NFILE was originally designed
  149.    as a replacement for an older protocol named QFILE, with the goal of
  150.    solving robustness problems of QFILE, hence the name "New File
  151.    Protocol".
  152.  
  153.    NFILE was designed and implemented at Symbolics by Bernard S.
  154.    Greenberg.  Mike McMahon made important contributions, especially in
  155.    the design and implementation of the Byte Stream with Mark and Token
  156.    List Transport layers.  NFILE has been used successfully for file
  157.    access between Symbolics computers since 1985.  NFILE servers have
  158.    been written for UNIX hosts as well.  NFILE is intended for use by
  159.    any type of file system, not just the native Symbolics file system.
  160.  
  161.    NFILE is a file access protocol that supports a large set of
  162.    operations on files and directories on remote systems, including:
  163.  
  164.             - Reading and writing entire files
  165.             - Reading and writing selected portions of files
  166.             - Deleting and renaming files
  167.  
  168.  
  169.  
  170. Greenberg & Keene                                               [Page 3]
  171.  
  172. RFC 1037             NFILE - A File Access Protocol        December 1987
  173.  
  174.  
  175.             - Creating links
  176.             - Listing, creating, and expunging directories
  177.             - Listing and changing the properties of files
  178.             - Enabling and disabling access capabilities on a remote
  179.               host
  180.  
  181.    NFILE supports file transfer of binary or character files.
  182.  
  183.    The NFILE server provides information about any errors that occur in
  184.    the course of a command.  In addition, NFILE has a robust scheme for
  185.    handling aborts on the user side.
  186.  
  187.    This specification defines NFILE user version 2 and server version 2.
  188.    We do not envision NFILE as an unchanging protocol, but rather as a
  189.    protocol that could continue to develop if additional requirements
  190.    are identified though the process of this Request for Comments.  The
  191.    design of NFILE makes room for various useful extensions.  Some of
  192.    the extensions that we are considering are described later on in this
  193.    document:  See the section "Possible Future Extensions", section 13.
  194.  
  195. 2.  NFILE PROTOCOL LAYERING
  196.  
  197.    NFILE is a layered file protocol.  The layers are:
  198.  
  199.              +-----------------------------------------------+
  200.              |client program or user interface               |
  201.              +-----------------------------------------------+
  202.              |NFILE                                          |
  203.              +-----------------------------------------------+
  204.              |Token List Transport Layer                     |
  205.              +-----------------------------------------------+
  206.              |Byte Stream with Mark                          |
  207.              +-----------------------------------------------+
  208.              |reliable host-host byte transmission protocol  |
  209.              +-----------------------------------------------+
  210.  
  211.    Byte Stream with Mark is a simple protocol that guarantees that an
  212.    out-of-band signal can be transmitted in the case of program
  213.    interruption.  Byte Stream with Mark is to be layered upon extant
  214.    byte stream protocols.  An important goal of the NFILE design was
  215.    that NFILE could be built on any byte stream.  It is currently
  216.    implemented on TCP and Chaosnet.  See the section "Byte Stream with
  217.    Mark", section 12.
  218.  
  219.    The Token List Transport Layer is a protocol that facilitates the
  220.    transmission of simple structured data, such as lists.  See the
  221.    section "Token List Transport Layer", section 11.
  222.  
  223.  
  224.  
  225.  
  226. Greenberg & Keene                                               [Page 4]
  227.  
  228. RFC 1037             NFILE - A File Access Protocol        December 1987
  229.  
  230.  
  231.    The NFILE commands and command responses are transmitted in "token
  232.    lists".  See the section "NFILE Commands", section 8.
  233.  
  234.    This specification does not include a client program or user
  235.    interface to the protocol.  In the Symbolics implementation, the
  236.    normal file operations transparently invoke NFILE, when the remote
  237.    host is known to support NFILE.  Another possible interface to NFILE
  238.    would be through a dedicated client program that would issue NFILE
  239.    commands in response to explicit requests by the user.
  240.  
  241. 3.  OVERVIEW OF AN NFILE SESSION
  242.  
  243.    An NFILE session is a dialogue between two hosts.  The host that
  244.    initiates the NFILE session is known as the "user side", and the
  245.    other host is the "server side".  The user side sends all NFILE
  246.    commands.  The server receives each command, processes it, and
  247.    responds to it, indicating the success or failure of the command.
  248.  
  249.    The user side keeps track of commands sent and command responses
  250.    received by using "transaction identifiers" to identify each command.
  251.    The user side generates a transaction identifier (which must be
  252.    unique per this dialogue) for each command, and sends the transaction
  253.    identifier to the server along with the command.  Each NFILE server
  254.    response includes the transaction identifier of the command with
  255.    which the response is associated.  The server is not required to
  256.    respond to commands in the same order that the user gave them.
  257.  
  258.    The user side sends NFILE commands over a bidirectional network
  259.    connection called the "control connection".  The server sends its
  260.    command responses on the same control connection.  The control
  261.    connection governing the NFILE session is established at the
  262.    beginning of the session.  If the control connection is ever broken,
  263.    the NFILE session is ended.
  264.  
  265.    Whereas NFILE commands and responses are transmitted on the control
  266.    connection, file data is transferred over "data channels".  An "input
  267.    data channel" transfers data from server to user.  An "output data
  268.    channel" transfers data from user to server.  Each input data channel
  269.    is associated with an output data channel; together these two
  270.    channels comprise a "data connection".
  271.  
  272.    Often more than one NFILE activity is occurring at any given time.
  273.    For example, several files can be open and transferring data
  274.    simultaneously; one or more commands can be in process at the same
  275.    time; and the server can be simultaneously transmitting directory
  276.    lists and processing further commands.  This happens in an
  277.    implementation in which the user side has multiple processes, and
  278.    several processes share a single NFILE server.
  279.  
  280.  
  281.  
  282. Greenberg & Keene                                               [Page 5]
  283.  
  284. RFC 1037             NFILE - A File Access Protocol        December 1987
  285.  
  286.  
  287. 4.  NFILE CONTROL AND DATA CONNECTIONS
  288.  
  289.    The user and server communicate through a single control connection
  290.    and a set of data connections.  Data connections are established and
  291.    disestablished by NFILE commands.  The user side sends NFILE commands
  292.    to the server over the control connection.  The server responds to
  293.    every user command over this control connection.  The actual file
  294.    data is transmitted over the data connections.
  295.  
  296.    User aborts can disrupt the normal flow of data on the control
  297.    connection and data connections.  An important aspect of any file
  298.    protocol is the way it handles user aborts.  NFILE uses a
  299.    resynchronization procedure to bring the affected control connection
  300.    or data channel from an unknown, unsafe state into a known state.
  301.    After resynchronization, the control connection or data channel can
  302.    be reused.  See the section "NFILE Resynchronization Procedure",
  303.    section 9.
  304.  
  305.    THE CONTROL CONNECTION
  306.  
  307.    An NFILE session is begun when the NFILE user program connects to a
  308.    remote host and establishes a network connection.  This initial
  309.    connection is the control conection of the dialogue.  If TCP is used
  310.    as the underlying protocol, contact NFILE's well-known port, 59.  If
  311.    Chaos is used, use the contact name "NFILE".
  312.  
  313.    The control connection is the vehicle used by the user to send its
  314.    commands, and the server to send its command responses.  These types
  315.    of communication occur over the NFILE control connection:
  316.  
  317.          - The user side sends NFILE commands.
  318.          - The server sends command responses.
  319.          - The server sends "notifications" and "asynchronous errors".
  320.            See the section "NFILE Errors and Notifications", section 10.
  321.          - During resynchronization (a special circumstance) either the
  322.            user or server sends a mark.
  323.  
  324.    All commands, command responses, and other data flowing over the
  325.    NFILE control connection are transmitted in the format of "top-level
  326.    token lists".  The control connection expects never to receive "loose
  327.    tokens"; that is, tokens not contained in token lists.
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Greenberg & Keene                                               [Page 6]
  339.  
  340. RFC 1037             NFILE - A File Access Protocol        December 1987
  341.  
  342.  
  343.    DATA CONNECTIONS
  344.  
  345.    Data connections are established and discarded at user request, by
  346.    means of two NFILE commands:  DATA-CONNECTION and UNDATA-CONNECTION.
  347.    Each data connection is associated with a specific control
  348.    connection, which is the same control connection that caused the data
  349.    connection to be established.
  350.  
  351.    Each data connection is composed of two "data channels".  Each data
  352.    channel is capable of sending data in one direction.  The term "input
  353.    channel" refers to the data channel that transmits data from the
  354.    server to the user side; "output channel" refers to the data channel
  355.    that transmits data from the user to the server side.  Throughout the
  356.    NFILE documentation, the terms "input channel" and "output channel"
  357.    are seen from the perspective of the user side.  A single data
  358.    channel can be used for one data transfer after another.
  359.  
  360.    The format of the data transferred on the data channels is defined as
  361.    a "token list data stream".  See the section "Token List Data
  362.    Stream", section 11.3. When the end of data is reached, the keyword
  363.    token EOF is sent.  Occasionally, token lists are transmitted over
  364.    the data channels, such as asynchronous error descriptions.
  365.  
  366. 5.  NFILE FILE OPENING MODES
  367.  
  368.    The NFILE OPEN command opens a file for reading, writing, or "direct
  369.    access" at the server host.  That means, in general, asking the host
  370.    file system to access the file and obtaining a file number, pointer,
  371.    or other quantity for subsequent rapid access to the file; this is
  372.    called an "opening".  The term "opening" translates to a file stream
  373.    in Symbolics terminology, a JFN in TOPS-20 terminology, and a file
  374.    descriptor in UNIX terminology.  An opening usually keeps track of
  375.    how many bytes have been read or written, and other bookkeeping
  376.    information.
  377.  
  378.    NFILE supports two ways of transferring file data, "data stream mode"
  379.    and "direct access mode".  A single mode is associated with each
  380.    opening.  Note that an NFILE dialogue can have more than one opening,
  381.    and thus use both modes.
  382.  
  383.    DATA STREAM MODE:
  384.  
  385.    Data stream mode of file transfer is the default mode of NFILE's OPEN
  386.    command.  Data stream mode is appropriate when the entire file is
  387.    transferred, either from user to server, or from server to user.
  388.    Data stream mode is used more often than direct access mode.
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Greenberg & Keene                                               [Page 7]
  395.  
  396. RFC 1037             NFILE - A File Access Protocol        December 1987
  397.  
  398.  
  399.    The OPEN command includes a "handle" argument, which identifies the
  400.    data channel to be used to transfer the data.  The handle is used in
  401.    subsequent commands to reference this particular opening.  When a
  402.    data stream opening is requested with the OPEN command, the file is
  403.    opened and the data begins to flow immediately.
  404.  
  405.    The sending side transmits the entire contents of the specified file
  406.    over the specified data channel as rapidly as the network permits.
  407.    When the sending side reaches the end of the file, it transmits a
  408.    special control token to signal end of file.  The receiving side
  409.    expects an uninterrupted stream of bytes to appear immediately on its
  410.    side of the data channel.
  411.  
  412.    The user gives the CLOSE command to terminate a data stream transfer.
  413.    CLOSE results in closing the file.
  414.  
  415.    DIRECT ACCESS MODE:
  416.  
  417.    Direct access mode enables reading or writing data from a given
  418.    starting point in a file through a specified number of bytes.  In
  419.    direct access mode, data is requested and sent in individual
  420.    transactions.  To request a direct access mode opening, the OPEN
  421.    command is used with a DIRECT-FILE-ID argument.  (In data stream
  422.    mode, no DIRECT-FILE-ID is supplied.)  The direct file identifier is
  423.    used in subsequent commands to reference the direct access opening.
  424.  
  425.    When a file is opened in direct access mode, the flow of data does
  426.    not start immediately.  Rather, the user gives either a READ command
  427.    (to request data to flow from server to user) or a DIRECT-OUTPUT
  428.    command (to request data to flow from user to server).  When reading,
  429.    the READ command allows the user to specify the starting point and
  430.    the number of bytes of data to transfer.  When writing, the FILEPOS
  431.    command can be used to specify the starting point, before the
  432.    DIRECT-OUTPUT command is given.  The user can give many READ and
  433.    DIRECT-OUTPUT commands, one after another.
  434.  
  435.    The user side terminates the direct access transfer by using the
  436.    CLOSE command.  The ABORT command can be given to terminate without
  437.    transmitting all of the specified bytes.
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Greenberg & Keene                                               [Page 8]
  451.  
  452. RFC 1037             NFILE - A File Access Protocol        December 1987
  453.  
  454.  
  455. 6.  NFILE CHARACTER SET
  456.  
  457.    The NFILE character set <1> is an extension of standard ASCII.  NFILE
  458.    command and response names use only the standard ASCII characters.
  459.    However, the protocol supports the transfer of the non-ASCII
  460.    characters in the NFILE character set; these characters might be
  461.    stored in files, or might be used in pathnames.
  462.  
  463.    Servers on machines that do not natively use the NFILE character set
  464.    must perform character set translations for character openings,
  465.    depending on the requested translation mode.  No translation is
  466.    required for binary openings.  There are three translation modes for
  467.    character openings:  NORMAL, RAW, and SUPER-IMAGE.  Each mode
  468.    specifies a way to translate between the server's native set and the
  469.    NFILE character set.
  470.  
  471.    NORMAL mode is the default of the OPEN command.  The translation for
  472.    NORMAL mode ensures that a file containing characters in the NFILE
  473.    character set can be written to a remote host and read back intact.
  474.    OPEN has optional keyword arguments to specify RAW or SUPER-IMAGE.
  475.    RAW mode means to perform no translation whatsoever.  SUPER-IMAGE
  476.    mode is intended for use by PDP-10 family machines only.  It is
  477.    included largely as an illustration of a system-dependent extension.
  478.  
  479.    The details of each translation mode are given in Appendices:
  480.  
  481.          See the section "NORMAL Translation Mode", Appendix A.  See the
  482.          section "RAW Translation Mode", Appendix B.  See the section
  483.          "SUPER-IMAGE Translation Mode", Appendix C.
  484.  
  485.    The use of the NFILE character set brings up a difficulty involved
  486.    with determining an exact position within a character file.  Some
  487.    NFILE characters expand to more than one native character on some
  488.    servers.  Thus, for character files, when we speak of a given
  489.    position in a file or the length of a file, we must specify whether
  490.    we are speaking in "NFILE units" or "server units", because the
  491.    counting of characters is different.  This causes major problems in
  492.    file position reckoning for character files.  Specifically, it is
  493.    futile for a user side to carefully monitor file position during
  494.    output by counting characters, when character translation is in
  495.    effect.  The server's operating system interface for "position to
  496.    point x in a file" necessarily operates in server units, but the user
  497.    side has counted in NFILE units.  The user side cannot try to
  498.    second-guess the translation-counting process without losing host-
  499.    independence.  See the section "FILEPOS NFILE Command".
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Greenberg & Keene                                               [Page 9]
  507.  
  508. RFC 1037             NFILE - A File Access Protocol        December 1987
  509.  
  510.  
  511. 7.  CONVENTIONS USED IN THIS DOCUMENT
  512.  
  513. 7.1  Mapping Data Types Into Token List Representation
  514.  
  515.    Throughout this NFILE specification, the data types of arguments,
  516.    return values, asynchronous error descriptions, and notifications are
  517.    described as being strings, integers, dates, time intervals, and so
  518.    on.  However, each conceptual data type must be mapped into the
  519.    appropriate token list representation for transmission.  The mapping
  520.    of conceptual data types to token list representation is shown here:
  521.  
  522.     Conceptual Type     Token List Representation
  523.  
  524.     ----------------------------------------------------------------
  525.  
  526.     Keyword             A keyword token
  527.  
  528.     Keyword list        A token list of keyword tokens
  529.  
  530.     Integer             A numeric data token
  531.  
  532.     String              A data token containing the characters of the
  533.                         string in the NFILE character set.
  534.  
  535.     Boolean Truth       The token known as BOOLEAN-TRUTH.
  536.  
  537.     Boolean False       The empty token list.
  538.  
  539.     Date                A numeric data token.  The date is expressed in
  540.                         Universal Time format, which measures a time as
  541.                         the number of seconds since January 1, 1900, at
  542.                         midnight GMT.
  543.  
  544.     Date-or-never       Can be either a date or the empty token list,
  545.                         representing "never".  "Never" is used for
  546.                         values such as the time a directory was last
  547.                         expunged, if it has never been expunged.
  548.  
  549.     Time interval       A numeric data token.  The time interval is
  550.                         expressed in seconds.  A time interval
  551.                         indicating "never" is represented by the empty
  552.                         token list.
  553.  
  554. 7.2  Format of NFILE Commands and Responses
  555.  
  556.    Each command description begins by giving the command format and
  557.    response format.  Here is the beginning of the DATA-CONNECTION
  558.    command description:
  559.  
  560.  
  561.  
  562. Greenberg & Keene                                              [Page 10]
  563.  
  564. RFC 1037             NFILE - A File Access Protocol        December 1987
  565.  
  566.  
  567.    Command:  (DATA-CONNECTION tid new-input-handle new-output-handle)
  568.  
  569.    Response: (DATA-CONNECTION tid connection-identifier)
  570.  
  571.    The command descriptions follow these conventions:
  572.  
  573.     1. NFILE commands and responses are transmitted as top-level token
  574.        lists.
  575.  
  576.        Top-level token lists are enclosed in parentheses in these
  577.        command descriptions.  These parentheses are not sent literally
  578.        across the control or data connections, but are a shorthand
  579.        representation of special control tokens that delimit top-level
  580.        token lists.  Specifically, TOP-LEVEL-LIST-BEGIN starts a top-
  581.        level token list; TOP-LEVEL-LIST-END ends a top-level token list.
  582.  
  583.     2. NFILE command names are keywords.
  584.  
  585.        The command name is required in every command and command
  586.        response.  All NFILE command names are keywords.  Keywords appear
  587.        in the NFILE documentation as their names in uppercase.  For
  588.        example, DATA-CONNECTION and DELETE are two command names.
  589.  
  590.     3. A unique transaction identifier (tid) identifies each command.
  591.  
  592.        The transaction identifier is a string made up by the user side
  593.        to identify this particular transaction, which is composed of the
  594.        command and the response associated with this command.  The
  595.        transaction identifier is abbreviated in the command descriptions
  596.        as tid.  Transaction identifiers are limited to fifteen
  597.        characters in length.  The transaction identifier is required in
  598.        every command and command response.
  599.  
  600.    OPTIONAL ARGUMENTS
  601.  
  602.    Many NFILE commands have "optional arguments".  Optional arguments
  603.    can be supplied (with appropriate values), or left out.  If optional
  604.    arguments are left out, their omission must be made explicit by means
  605.    of substituting the empty token list in their place.  The only
  606.    exception to that rule is for trailing optional arguments or return
  607.    values, which can be omitted without including the empty token list.
  608.  
  609.    For example, the text of the DELETE command description explains that
  610.    either a handle or a pathname must be supplied, but not both;
  611.    therefore, one of them is an optional argument.  Here is the command
  612.    format of DELETE:
  613.  
  614.          (DELETE tid handle pathname)
  615.  
  616.  
  617.  
  618. Greenberg & Keene                                              [Page 11]
  619.  
  620. RFC 1037             NFILE - A File Access Protocol        December 1987
  621.  
  622.  
  623.     If you supply a handle and no pathname, the command format is:
  624.  
  625.          (DELETE tid handle)
  626.  
  627.     If you supply a pathname and no handle, the command format is:
  628.  
  629.          (DELETE tid empty-token-list pathname)
  630.  
  631.    The empty token list in the token list stream appears as a LIST-BEGIN
  632.    followed immediately by a LIST-END.
  633.  
  634.    OPTIONAL KEYWORD/VALUE PAIRS
  635.  
  636.    Four NFILE commands have "optional keyword/value pairs".  These
  637.    commands are: COMPLETE, LOGIN, OPEN, and READ.  Optional
  638.    keyword/value pairs can be either included in the command or omitted
  639.    entirely.  There is no need to substitute the empty token list for
  640.    ommitted optional keyword tokens, unlike optional arguments.  The
  641.    order of the option keyword/value pairs is not significant.
  642.  
  643.    If included, optional keyword/value pairs are a sequence of
  644.    alternating keywords and values.  The values associated with the
  645.    keywords can be keywords, lists, strings, Booleans, integers, dates,
  646.    date-or-never's, and time intervals.  The text of each command
  647.    description states what type of value is appropriate for each
  648.    optional keyword.
  649.  
  650.    Optional keyword/value pairs appear in the text as the keyword only,
  651.    in uppercase letters.  For example, here is the format of the LOGIN
  652.    command:
  653.  
  654.    Command Format:
  655.  
  656.          (LOGIN tid user password FILE-SYSTEM USER-VERSION)
  657.  
  658.    FILE-SYSTEM and USER-VERSION are two optional keywords associated
  659.    with the LOGIN command.  The user side can supply USER-VERSION, and
  660.    omit FILE-SYSTEM as shown in this example:
  661.  
  662.          (LOGIN x105 tjones let-me-in USER-VERSION 2)
  663.  
  664.    As seen above, the optional keyword/value pair USER-VERSION, if
  665.    supplied in a command, consists of the keyword USER-VERSION followed
  666.    by the value to be used for that keyword (in this example, 2).
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Greenberg & Keene                                              [Page 12]
  675.  
  676. RFC 1037             NFILE - A File Access Protocol        December 1987
  677.  
  678.  
  679. 7.3  Data Channel Handles and Direct File Identifiers
  680.  
  681.    Several NFILE commands require an argument that specifies an opening.
  682.    This kind of argument is called a handle in the command description.
  683.    It is always a string type argument.  A handle can be either a data
  684.    channel handle or a direct file identifier, depending on the mode of
  685.    the opening:
  686.  
  687.  
  688.    Data Stream
  689.  
  690.    The handle must identify a data channel that is bound to an opening.
  691.  
  692.    Direct Access
  693.  
  694.    In general, the handle must be a direct file identifier.  A direct
  695.    file identifier specifies a direct access opening.  It is the same as
  696.    the value supplied in the DIRECT-FILE-ID keyword/value pair in the
  697.    OPEN command.  It is used for all operations that identify an opening
  698.    rather than a data channel.
  699.  
  700.    Two NFILE commands applicable to direct access openings are
  701.    exceptions to the general rule.  The handle supplied in ABORT and
  702.    CONTINUE cannot be a direct file identifier, but must be a data
  703.    channel handle instead.
  704.  
  705. 7.4  Syntax of File and Directory Pathname Arguments
  706.  
  707.    Some arguments and return values in the NFILE command descriptions
  708.    represent file pathnames.  These are strings in the pathname syntax
  709.    native to the server host.  These pathnames contain no host
  710.    identifiers of any kind.  These pathnames must be fully defaulted, in
  711.    the sense that they have a directory and file name (and file type, if
  712.    the server operating system supports file types).  If appropriate, a
  713.    device is referenced in the pathname.  If the server file system
  714.    supports version numbers, there is always an explicit version number,
  715.    even if that number or other specification is that system's
  716.    representation of "newest" or "oldest".
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Greenberg & Keene                                              [Page 13]
  731.  
  732. RFC 1037             NFILE - A File Access Protocol        December 1987
  733.  
  734.  
  735.    Here are some examples of file pathnames, for different server hosts:
  736.  
  737.    Server Host     Example of File Pathname
  738.  
  739.    ------------------------------------------------------------
  740.  
  741.       UNIX            /usr/max/life.c
  742.  
  743.       TOPS-20         ps:<max>life.bin.17
  744.  
  745.       VMS             MACD:[MAX]LIFE.FOR;3
  746.  
  747.       Symbolics LMFS  >max>life.lisp.newest
  748.  
  749.    ------------------------------------------------------------
  750.  
  751.    The CREATE-DIRECTORY and HOME-DIRECTORY commands take a directory as
  752.    an argument.  In NFILE commands, a directory is represented by a
  753.    string that names the directory.  In most cases this string is in the
  754.    syntax native to the server host.  However in some cases the native
  755.    format is modified somewhat to clarify that the string names a
  756.    directory, and not a file.  For example, a directory on UNIX is
  757.    represented by "/usr/max/", not "/usr/max".
  758.  
  759.    Here are some examples of directory pathnames for different server
  760.    hosts:
  761.  
  762.    Server Host     Example of Directory Pathname
  763.  
  764.    ------------------------------------------------------------
  765.  
  766.       UNIX            /usr/max/
  767.  
  768.       TOPS-20         <max>
  769.  
  770.       VMS             MACD:[MAX]
  771.  
  772.       Symbolics LMFS  >max>hacks>
  773.  
  774.    ------------------------------------------------------------
  775.  
  776. 7.5  Format of NFILE File Property/Value Pairs
  777.  
  778.    Several NFILE commands request information regarding the properties
  779.    of files or directories.  These commands include:  DIRECTORY,
  780.    MULTIPLE-FILE-PLISTS, PROPERTIES, and CHANGE-PROPERTIES.  This
  781.    section describes how file property information is conveyed over the
  782.    token list stream.
  783.  
  784.  
  785.  
  786. Greenberg & Keene                                              [Page 14]
  787.  
  788. RFC 1037             NFILE - A File Access Protocol        December 1987
  789.  
  790.  
  791.    File property information is usually sent in property/value pairs,
  792.    where the property identifies the property, and the following value
  793.    gives the value of that property for the specified file.
  794.  
  795.    Each property is denoted either by a keyword or an integer.  You can
  796.    mix both ways of specifying properties (keyword or integer) within a
  797.    single description.  An integer is interpreted as an index into the
  798.    Property Index Table, an array of property keywords.  The server can
  799.    optionally send a Property Index Table to the user during the
  800.    execution of the LOGIN command, although it is not required.  This
  801.    greatly reduces the length of transmissions.
  802.  
  803.    In command arguments, file properties cannot be specified with
  804.    integers; keywords must be used to specify file properties in command
  805.    arguments.  Integers can be used to denote file properties only in
  806.    command responses.
  807.  
  808.    We now list the keywords associated with file properties.  This list
  809.    is not intended to be restrictive.  If a programmer implementing
  810.    NFILE needs a new keyword, a new keyword (not on this list) can be
  811.    invented.  The type of value of any new keywords is by default
  812.    string.  The keywords are sorted here by conceptual data type:
  813.  
  814.     Data type       Keywords denoting file properties
  815.  
  816.    ----------------------------------------------------------------
  817.  
  818.     Integers        BLOCK-SIZE, BYTE-SIZE, GENERATION-RETENTION-COUNT,
  819.                     LENGTH-IN-BLOCKS, LENGTH-IN-BYTES,
  820.                     DEFAULT-GENERATION-RETENTION-COUNT
  821.  
  822.     Dates           CREATION-DATE, MODIFICATION-DATE
  823.  
  824.     Date-or-never's REFERENCE-DATE, INCREMENTAL-DUMP-DATE,
  825.                     COMPLETE-DUMP-DATE, DATE-LAST-EXPUNGED,
  826.                     EXPIRATION-DATE
  827.  
  828.     Time intervals  AUTO-EXPUNGE-INTERVAL
  829.  
  830.     Keyword Lists   SETTABLE-PROPERTIES, LINK-TRANSPARENCIES,
  831.                     DEFAULT-LINK-TRANSPARENCIES
  832.  
  833.     Boolean values  DELETED, DONT-DELETE, DONT-DUMP, DONT-REAP,
  834.                     SUPERSEDE-PROTECT, NOT-BACKED-UP, OFFLINE,
  835.                     TEMPORARY, CHARACTERS, DIRECTORY
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842. Greenberg & Keene                                              [Page 15]
  843.  
  844. RFC 1037             NFILE - A File Access Protocol        December 1987
  845.  
  846.  
  847.     Strings         ACCOUNT, AUTHOR, LINK-TO, PHYSICAL-VOLUME,
  848.                     PROTECTION, VOLUME-NAME, PACK-NUMBER, READER,
  849.                     DISK-SPACE-DESCRIPTION, and any keywords not
  850.                     on this list
  851.  
  852.    Note that these keyword names are intended to imply the semantics of
  853.    the properties.  For a discussion of the semantics of CREATION-DATE:
  854.    See the section "NFILE OPEN Response Return Values", section 8.20.2.
  855.    The "Reference Guide to Streams, Files, and I/O" in the Symbolics
  856.    documentation set details the semantics that Symbolics associates
  857.    with these properties.
  858.  
  859. 8.  NFILE COMMANDS
  860.  
  861.    It is important to understand the conventions used in each of the
  862.    following command descriptions.  See the section "Conventions Used in
  863.    This Document", section 7.
  864.  
  865. 8.1  ABORT Command
  866.  
  867.    Command:  (ABORT tid input-handle)
  868.  
  869.    Response: (ABORT tid)
  870.  
  871.    ABORT cleanly interrupts and prematurely terminates a single direct
  872.    access mode data transfer initiated with READ.  The required input-
  873.    handle string argument identifies a data channel on which an input
  874.    transfer is currently taking place; this must be a direct access
  875.    transfer.  input-handle must identify a data channel; it cannot be a
  876.    direct file identifier.
  877.  
  878.    Upon receiving the ABORT command, the server checks to see if a
  879.    transfer is still active on that channel.  If so, the server
  880.    terminates the transfer by telling the data connection logical
  881.    process to stop transferring bytes of data.  The user side needs to
  882.    issue this command only when there are outstanding unread bytes.
  883.    This excludes the case of the data channel having been disestablished
  884.    or reallocated by the user side.
  885.  
  886.    Whether or not a transfer is active on that channel, the user side
  887.    puts the data channel into the unsafe state.  Before the data channel
  888.    can be used again, it must be resynchronized.
  889.  
  890. 8.2  CHANGE-PROPERTIES Command
  891.  
  892.    Command:  (CHANGE-PROPERTIES tid handle pathname property-pairs)
  893.  
  894.    Response: (CHANGE-PROPERTIES tid)
  895.  
  896.  
  897.  
  898. Greenberg & Keene                                              [Page 16]
  899.  
  900. RFC 1037             NFILE - A File Access Protocol        December 1987
  901.  
  902.  
  903.    CHANGE-PROPERTIES changes one or more properties of a file.  Either a
  904.    handle or a pathname must be given, but not both.  Whichever one is
  905.    given must be supplied as a string.  handle identifies a data channel
  906.    that is bound to an open file; it can be a direct file identifier.
  907.    pathname identifies a file on the server machine.
  908.  
  909.    property-pairs is a required token list of keyword/value pairs, where
  910.    the name of the property to be changed is the keyword, and the
  911.    desired new property value is the value.
  912.  
  913.    The properties that can be changed are host-dependent, as are any
  914.    restrictions on the values of those properties.  The properties that
  915.    can be changed are the same as those returned as settable-properties,
  916.    in the command response for the PROPERTIES command.
  917.  
  918.    The server tries to modify all the properties listed in property-
  919.    pairs to the desired new values.  There is currently no definition
  920.    about what should be done if the server can successfully change some
  921.    properties but not others.
  922.  
  923.    For further information on file property keywords and associated
  924.    values:  See the section "Format of NFILE File Property/Value Pairs",
  925.    section 7.5.
  926.  
  927. 8.3  CLOSE Command
  928.  
  929.    Command:  (CLOSE tid handle abort-p)
  930.  
  931.    Response: (CLOSE tid truename binary-p other-properties)
  932.  
  933.    CLOSE terminates a data transfer, and frees a data channel.  The
  934.    handle must be a data channel handle for a data stream opening, or a
  935.    direct file identifier for a direct access opening.  If a data
  936.    channel is given, a transfer must be active on that handle.  If
  937.    abort-p is supplied as Boolean truth, the file is close-aborted, as
  938.    described below.
  939.  
  940.    "Closing the file" has different implications specific to each
  941.    operating system.  It generally implies invalidation of the pointer
  942.    or logical identifier obtained from the operating system when the
  943.    file was "opened", and freeing of operating system and/or job
  944.    resources associated with active file access.  For output files, it
  945.    involves ensuring that every last bit sent by the user has been
  946.    successfully written to disk.  The server should not send a
  947.    successful response until all these things have completed
  948.    successfully.
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Greenberg & Keene                                              [Page 17]
  955.  
  956. RFC 1037             NFILE - A File Access Protocol        December 1987
  957.  
  958.  
  959.    In either data stream or direct access mode, the user can request the
  960.    server to close-abort the file, instead of simply closing it.  To
  961.    close-abort a file means to close it in such a way, if possible, that
  962.    it is as if the file had never been opened.  In the specific case of
  963.    a file being created, it must appear as if the file had never been
  964.    created.  This might be more difficult to implement on certain
  965.    operating systems than others, but tricks with temporary names and
  966.    close-time renamings by the server can usually be used to implement
  967.    close-abort in these cases.  In the case of a file being appended to,
  968.    close-abort means to forget the appended data.
  969.  
  970.    AN UNSUCCESSFUL CLOSE OPERATION
  971.  
  972.    For the normal CLOSE operation (not a close-abort), after writing
  973.    every last bit sent by the user to disk, and before closing the file,
  974.    the server checks the data channel specified by handle to see if an
  975.    asynchronous error is outstanding on that channel.  That is, the
  976.    server must determine whether it has sent an asynchronous error
  977.    description to the user, to which the user has not yet responded with
  978.    a CONTINUE command.  If so, the server is unable to close the file,
  979.    and therefore sends a command error response indicating that an error
  980.    is pending on the channel.  The appropriate three-letter error code
  981.    is EPC.  See the section "NFILE Errors and Notifications", section
  982.    10.
  983.  
  984.    A SUCCESSFUL CLOSE OPERATION
  985.  
  986.    The return values for OPEN and CLOSE are syntactically identical, but
  987.    the values might change between the time of the file being opened and
  988.    when it is closed.  For example, the truename return value is
  989.    supplied after all the close-time renaming of output files is done
  990.    and the version numbers resolved (for operating systems supporting
  991.    version numbers).  Therefore, on some systems the truename of a file
  992.    has one value at the time it is opened, and a different value when it
  993.    has been closed.  For a description of the CLOSE return values:  See
  994.    the section "NFILE OPEN Response Return Values", section 8.20.2.
  995.  
  996.    If the user gives the CLOSE command with abort-p supplied as Boolean
  997.    truth, thus requesting a close-abort of the file, the server need not
  998.    check whether an asynchronous error description is outstanding on the
  999.    channel.  The server simply close-aborts the file.
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Greenberg & Keene                                              [Page 18]
  1011.  
  1012. RFC 1037             NFILE - A File Access Protocol        December 1987
  1013.  
  1014.  
  1015. 8.4  COMPLETE Command
  1016.  
  1017.    Command:  (COMPLETE tid string pathname DIRECTION NEW-OK DELETED)
  1018.  
  1019.    Response: (COMPLETE tid new-string success)
  1020.  
  1021.    COMPLETE performs file pathname completion.
  1022.  
  1023.    string is a partial filename typed by the user and pathname is the
  1024.    default name against which it is being typed.  Both string and
  1025.    pathname are required arguments, and are of type string.  The
  1026.    remaining arguments are optional keyword/value pairs.
  1027.  
  1028.    NEW-OK is Boolean; if followed by Boolean truth, the server should
  1029.    allow either a file that already exists, or a file that does not yet
  1030.    exist.  The default of NEW-OK is false; that is, the server does not
  1031.    consider files that do not already exist.
  1032.  
  1033.    DELETED is a Boolean type argument; if followed by Boolean truth, the
  1034.    server is instructed to look for files that have been deleted but not
  1035.    yet expunged, as well as non-deleted files.  The default is to ignore
  1036.    soft-deleted files.
  1037.  
  1038.    DIRECTION can be followed by READ, to indicate that the file is to be
  1039.    read.  If the file is to be written, DIRECTION can be followed by
  1040.    WRITE.  The default is READ.
  1041.  
  1042.    The filename is completed according to the files present in the host
  1043.    file system, and the expanded string new-string is returned. New-
  1044.    string is always a string containing a file name:  either the
  1045.    original string, or a new, more specific string.  The value of
  1046.    success indicates the status of the completion. The keyword value OLD
  1047.    or NEW means complete success, whereas the empty token list means
  1048.    failure.  The following values of success are possible:
  1049.  
  1050.    Value               Meaning
  1051.  
  1052.    ----------------------------------------------------------------
  1053.  
  1054.    OLD                 Success:  the string completed to the name of
  1055.                        a file that exists.
  1056.  
  1057.    NEW                 Success:  the string completed to the name of
  1058.                        a file that could be created.
  1059.  
  1060.    Empty token list    Failure due to one of these reasons:
  1061.  
  1062.                        The file is on a file system that does not
  1063.  
  1064.  
  1065.  
  1066. Greenberg & Keene                                              [Page 19]
  1067.  
  1068. RFC 1037             NFILE - A File Access Protocol        December 1987
  1069.  
  1070.  
  1071.                        support completion.  new-string is supplied as
  1072.                        the unchanged string.
  1073.  
  1074.                        There is no possible completion.  new-string
  1075.                        is supplied as the unchanged string.
  1076.  
  1077.                        There is more than one possible completion.
  1078.                        The given string is completed up to the first
  1079.                        point of ambiguity, and the result is supplied
  1080.                        as new-string.
  1081.  
  1082.                        A directory name was completed.  Completion
  1083.                        was not successful because additional
  1084.                        components to the right of this directory
  1085.                        remain to be specified.  The string is
  1086.                        completed through the directory name and the
  1087.                        delimiter that follows it, and the result is
  1088.                        returned in new-string.
  1089.  
  1090.    The semantics of COMPLETE are not documented here.  See the
  1091.    "Reference Guide to Streams, Files, and I/O" in the Symbolics
  1092.    documentation set for the recommended semantics of COMPLETE.
  1093.  
  1094. 8.5  CONTINUE Command
  1095.  
  1096.    Command:  (CONTINUE tid handle)
  1097.  
  1098.    Response: (CONTINUE tid)
  1099.  
  1100.    CONTINUE resumes a data transfer that was temporarily suspended due
  1101.    to an asynchronous error.  Each asynchronous error description has an
  1102.    optional argument of RESTARTABLE, indicating whether it makes any
  1103.    sense to try to continue after this particular error occurred.
  1104.    CONTINUE tries to resume the data transfer if the error is
  1105.    potentially recoverable, according to the RESTARTABLE argument in the
  1106.    asynchronous error description.  For a discussion of asynchronous
  1107.    errors:  See the section "NFILE Errors and Notifications", section
  1108.    10.
  1109.  
  1110.    handle is a required string-type argument that refers to the handle
  1111.    of the data channel that received an asynchronous error.  That data
  1112.    channel could have been in use for a data stream or direct access
  1113.    transfer.  handle cannot be a direct file identifier.
  1114.  
  1115.    If the asynchronous error description does not contain the
  1116.    RESTARTABLE argument, and the user issues the CONTINUE command
  1117.    anyway, the server gives a command error response.
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Greenberg & Keene                                              [Page 20]
  1123.  
  1124. RFC 1037             NFILE - A File Access Protocol        December 1987
  1125.  
  1126.  
  1127. 8.6  CREATE-DIRECTORY Command
  1128.  
  1129.    Command:  (CREATE-DIRECTORY tid pathname property-pairs)
  1130.  
  1131.    Response: (CREATE-DIRECTORY tid dir-truename)
  1132.  
  1133.    CREATE-DIRECTORY creates a directory on the remote file system.  The
  1134.    required pathname argument is a string identifying the pathname of
  1135.    the directory to be created.  The return value dir-truename is the
  1136.    pathname of the directory that was successfully created.  Both of
  1137.    these pathnames are directory pathnames:  See the section "Syntax of
  1138.    File and Directory Pathname Arguments", section 7.4.
  1139.  
  1140.    property-pairs is a keyword/value list of properties that further
  1141.    define the attributes of the directory to be created.  The allowable
  1142.    keywords and associated values are operating system dependent;
  1143.    typically they indicate arguments to be given to the native primitive
  1144.    for creating directories.
  1145.  
  1146.    If property-pairs is supplied as the empty token list, default access
  1147.    and creation attributes apply and should be assured by the server.
  1148.    See the section "Format of NFILE File Property/Value Pairs", section
  1149.    7.5.
  1150.  
  1151. 8.7  CREATE-LINK Command
  1152.  
  1153.    Command:  (CREATE-LINK tid pathname target-pathname properties)
  1154.  
  1155.    Response: (CREATE-LINK tid link-truename)
  1156.  
  1157.    CREATE-LINK creates a link on the remote file system.
  1158.  
  1159.    pathname is the pathname of the link to be created; target-pathname
  1160.    is the place in the file system to which the link points.  Both are
  1161.    required arguments.  The return value link-truename names the
  1162.    resulting link.
  1163.  
  1164.    If a server on a file system that does not support links receives the
  1165.    CREATE-LINK command, it sends a command error response.
  1166.  
  1167.    The arguments pathname and target-pathname, and the return value
  1168.    link-truename, are all strings in the full pathname syntax of the
  1169.    server host.  See the section "Syntax of File and Directory Pathname
  1170.    Arguments", section 7.4.
  1171.  
  1172.    The required properties argument is a token list of keyword/value
  1173.    pairs. These properties and their values specify certain attributes
  1174.    to be given to the link.  The allowable keywords and associated
  1175.  
  1176.  
  1177.  
  1178. Greenberg & Keene                                              [Page 21]
  1179.  
  1180. RFC 1037             NFILE - A File Access Protocol        December 1987
  1181.  
  1182.  
  1183.    values are operating system dependent; typically they indicate
  1184.    arguments to be given to the native primitive for creating links.
  1185.  
  1186.    If no property pairs are given in the command, the server should
  1187.    apply a reasonable default set of attributes to the link.  See the
  1188.    section "Format of NFILE File Property/Value Pairs", section 7.5.
  1189.  
  1190. 8.8  DATA-CONNECTION Command
  1191.  
  1192.    Command:  (DATA-CONNECTION tid new-input-handle new-output-handle)
  1193.  
  1194.    Response: (DATA-CONNECTION tid connection-identifier)
  1195.  
  1196.    DATA-CONNECTION enablesthe user side to initiate the establishment of
  1197.    a new data connection.  The user side supplies two required string
  1198.    arguments, new-input-handle and  new-output-handle.  These arguments
  1199.    are used by subsequent commands to reference the two data channels
  1200.    that constitute the data connection now being created.  new-input-
  1201.    handle describes the server-to-user data channel, and new-output-
  1202.    handle describes the user-to-server channel.  new-input-handle and
  1203.    new-output-handle cannot refer to any data channels already in use.
  1204.  
  1205.    Upon receiving the DATA-CONNECTION command, the server arranges for a
  1206.    logical port (called socket or contact name on some networks) to be
  1207.    made available on the foreign host machine.  When the server has made
  1208.    that port available, it must inform the user of its identity.  The
  1209.    server relays that information in the command response, in the
  1210.    required connection-identifier, a string.  The server then listens on
  1211.    the port named by connection-identifier, and waits for the user side
  1212.    to connect to it.
  1213.  
  1214.    Upon receiving the success command response, the user side supplies
  1215.    the connection-identifier to the local network implementation, in
  1216.    order to connect to the specified port.  The data connection is not
  1217.    fully established until the user side connects successfully to that
  1218.    port.  This command is unusual in that the successful command
  1219.    response does not signify the completion of the command; it indicates
  1220.    only that the server has fulfilled its responsibility in the process
  1221.    of establishing a data connection.
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234. Greenberg & Keene                                              [Page 22]
  1235.  
  1236. RFC 1037             NFILE - A File Access Protocol        December 1987
  1237.  
  1238.  
  1239.    The connection-identifier informs the user of the correct identity of
  1240.    the logical port that the server has provided.  NFILE expects the
  1241.    connection-identifier to be a string.  For TCP this string is the
  1242.    port number represented in decimal.  For Chaosnet, this string is the
  1243.    contact name.  The connection-identifier is used only once; in all
  1244.    subsequent NFILE commands that need to reference either of the data
  1245.    channels that constitute this data connection, the new-input-handle
  1246.    and new-output-handle are used.
  1247.  
  1248.    For background information:  See the section "NFILE Control and Data
  1249.    Connections", section 4.
  1250.  
  1251. 8.9  DELETE Command
  1252.  
  1253.    Command:  (DELETE tid handle pathname)
  1254.  
  1255.    Response: (DELETE tid)
  1256.  
  1257.    DELETE deletes a file on the remote file system.
  1258.  
  1259.    Either a handle or a pathname must be supplied, but not both.  If
  1260.    given, the handle must be a data channel handle for a data stream
  1261.    opening, or a direct file identifier for a direct access opening.
  1262.    pathname is a string in the full pathname syntax of the server host.
  1263.    See the section "Syntax of File and Directory Pathname Arguments",
  1264.    section 7.4.
  1265.  
  1266.    With a pathname supplied, the DELETE command causes the specified
  1267.    file to be deleted.  DELETE has different results depending on the
  1268.    operating system involved.  That is, DELETE causes soft deletion on
  1269.    TOPS-20 and LMFS, and hard deletion on UNIX and Multics.  If an
  1270.    attempt is made to delete a delete-through link on a Symbolics LMFS,
  1271.    its target is deleted instead.
  1272.  
  1273.    If the handle argument is supplied to DELETE, the server deletes the
  1274.    open file bound to the data channel specified by handle at close
  1275.    time.  This is true in both the output and input cases.
  1276.  
  1277. 8.10  DIRECT-OUTPUT Command
  1278.  
  1279.    Command:  (DIRECT-OUTPUT tid direct-handle output-handle)
  1280.  
  1281.    Response: (DIRECT-OUTPUT tid)
  1282.  
  1283.    DIRECT-OUTPUT starts and stops output data flow for a direct access
  1284.    file opening.  DIRECT-OUTPUT explicitly controls binding and
  1285.    unbinding of an output data channel to a direct access opening.
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Greenberg & Keene                                              [Page 23]
  1291.  
  1292. RFC 1037             NFILE - A File Access Protocol        December 1987
  1293.  
  1294.  
  1295.    direct-handle is a required argument, and output-handle is optional.
  1296.  
  1297.    If supplied, output-handle is a request to bind an output data
  1298.    channel (indicated by output-handle) to the direct access opening
  1299.    designated by the direct-handle.  The specified output data channel
  1300.    must be free.  The server binds the data channel and begins accepting
  1301.    data from that connection and writing it to the opening.
  1302.  
  1303.    If the output-handle is omitted, this is a request to unbind the
  1304.    channel and terminate the active output transfer.
  1305.  
  1306. 8.11  DIRECTORY Command
  1307.  
  1308.    Command:  (DIRECTORY tid input-handle pathname control-keywords
  1309.               properties)
  1310.  
  1311.    Response: (DIRECTORY tid)
  1312.  
  1313.    DIRECTORY returns a directory listing including the identities and
  1314.    attributes for logically related groups of files, directories, and
  1315.    links.  If the command is successful, a single token list containing
  1316.    the requested information is sent over the data channel specified by
  1317.    input-handle, and the data channel is then implicitly freed by both
  1318.    sides <2>.  For details on the format of the token list:  See the
  1319.    section "NFILE DIRECTORY Data Format", section 8.11.1.
  1320.  
  1321.    pathname specifies the files that are to be described; it is a string
  1322.    in the full pathname syntax of the server host.  See the section
  1323.    "Syntax of File and Directory Pathname Arguments", section 7.4.
  1324.  
  1325.    The pathname generally contains wildcard characters, in operating-
  1326.    system-specific format, describing potential file name matches.  Most
  1327.    operating systems provide a facility that accepts such a pathname and
  1328.    returns information about all files matching this pathname.  Some
  1329.    operating systems allow wildcard (potential multiple) matches in the
  1330.    directory or device portions of the pathname; other operating systems
  1331.    do not.  There is no clear contract at this time about what is
  1332.    expected of servers on systems that do not allow wildcard matches (or
  1333.    some kinds of wild card matches), when presented with a wildcard.
  1334.  
  1335.    properties is a token list of keywords that are the names of
  1336.    properties.  If properties is omitted or supplied as the empty token
  1337.    list, the server sends along all properties.  If any properties are
  1338.    supplied, the user is requesting the server to send only those
  1339.    properties.
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Greenberg & Keene                                              [Page 24]
  1347.  
  1348. RFC 1037             NFILE - A File Access Protocol        December 1987
  1349.  
  1350.  
  1351.    control-keywords ARGUMENT TO DIRECTORY
  1352.  
  1353.    control-keywords is a token list of keywords.  The control-keywords
  1354.    affect the way the DIRECTORY command works on the server machine.
  1355.    Although some of the options below request the server to limit (by
  1356.    some filter) the data to be returned, it is never an error if the
  1357.    server returns more information than is requested.
  1358.  
  1359.    The following keywords are recognized:
  1360.  
  1361.    DELETED
  1362.  
  1363.    Includes soft-deleted files in the directory list.  Without this
  1364.    option, they must not be included. Such files have the DELETED
  1365.    property indicated as true" among their properties.  DELETED is
  1366.    ignored on systems that do not support soft deletion.
  1367.  
  1368.    DIRECTORIES-ONLY
  1369.  
  1370.    This option changes the semantics of DIRECTORY fairly drastically.
  1371.    Normally, the server returns information about all files,
  1372.    directories, and links whose pathnames match the supplied pathname.
  1373.    This means that for each file, directory, or link to be listed, its
  1374.    directory name must match the potentially wildcarded) directory name
  1375.    in the supplied pathname, its file name must match the file name in
  1376.    the supplied pathname, and so on.
  1377.  
  1378.    When DIRECTORIES-ONLY is supplied, the server is to list only
  1379.    directories, not whose pathnames match the supplied pathname, but
  1380.    whose pathnames expressed as directory pathnames match the
  1381.    (potentially wildcarded) directory portion of the supplied pathname.
  1382.    The description of the PROBE-DIRECTORY keyword that can be supplied
  1383.    as the direction argument of the OPEN command discusses this:  See
  1384.    the section "OPEN Command", section 8.20.
  1385.  
  1386.    It is not yet established what servers on hosts that do not support
  1387.    this type of action natively are to do when presented with
  1388.    DIRECTORIES-ONLY and a pathname with a wildcard directory component.
  1389.  
  1390.    FAST Speeds up the operation and data transmission by not listing any
  1391.    properties at all for the files concerned; that is, only the
  1392.    truenames are returned.
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Greenberg & Keene                                              [Page 25]
  1403.  
  1404. RFC 1037             NFILE - A File Access Protocol        December 1987
  1405.  
  1406.  
  1407.    NO-EXTRA-INFO
  1408.  
  1409.    Specifies that the server is to suppress listing those properties
  1410.    that are generally more difficult or expensive to obtain.  This
  1411.    typically eliminates listing of directory-specific properties such as
  1412.    information about default generation counts and expunge dates.
  1413.  
  1414.    SORTED
  1415.  
  1416.    This causes the directory listing to be sorted.  The sorting is done
  1417.    alphabetically by directory, then by file name, then file type, then
  1418.    file version (by increasing version number).
  1419.  
  1420. 8.11.1  NFILE DIRECTORY Data Format
  1421.  
  1422.    If the NFILE DIRECTORY command completes successfully, a single token
  1423.    list containing the requested directory information is sent on the
  1424.    data channel specified by the input-handle argument in the DIRECTORY
  1425.    command.  This section describes the format of that single token
  1426.    list, and gives further detail on the properties argument to
  1427.    DIRECTORY.
  1428.  
  1429.    The token list is a top-level token list, so it is delimited by TOP-
  1430.    LEVEL-LIST-BEGIN and TOP-LEVEL-LIST-END.  The top-level token list
  1431.    contains embedded token lists.  The first embedded token list
  1432.    contains the empty token list followed by property/value pairs
  1433.    describing property information of the file system as a whole rather
  1434.    than of a specific file.  NFILE requires one property of the file
  1435.    system to be present: DISK-SPACE-DESCRIPTION is a string describing
  1436.    the amount of free file space available on the system.  The following
  1437.    embedded token lists contain the pathname of a file, followed by
  1438.    property/value pairs describing the properties of that file.
  1439.  
  1440.    The following example shows the format of the top-level token list
  1441.    returned by DIRECTORY, for two files.  It is expected that the server
  1442.    return several property/value pairs for each file; the number of
  1443.    pairs returned is not constrained.  In this example, two
  1444.    property/value pairs are returned for the file system, two pairs are
  1445.    returned for the first file, and only one pair is returned for the
  1446.    second file.
  1447.  
  1448.              TOP-LEVEL-LIST-BEGIN
  1449.              LIST-BEGIN       - first embedded token list starts
  1450.              LIST-BEGIN       - an empty embedded token list starts
  1451.              LIST-END         - the empty embedded token list ends
  1452.              prop1 value1     - property/value pairs of file system
  1453.              prop2 value2
  1454.              LIST-END
  1455.  
  1456.  
  1457.  
  1458. Greenberg & Keene                                              [Page 26]
  1459.  
  1460. RFC 1037             NFILE - A File Access Protocol        December 1987
  1461.  
  1462.  
  1463.              LIST-BEGIN
  1464.              pathname1        - pathname of the first file
  1465.              prop1 value1     - property/value pairs of first file
  1466.              prop2 value2
  1467.              LIST-END
  1468.              LIST-BEGIN
  1469.              pathname2        - pathname of the second file
  1470.              prop1 value1     - property/value pairs of second file
  1471.              LIST-END
  1472.              TOP-LEVEL-LIST-END
  1473.  
  1474.    The following example is designed to illustrate the structure of the
  1475.    top-level token list by depicting TOP-LEVEL-LIST-BEGIN and TOP-
  1476.    LEVEL-LIST-END by parentheses and LIST-BEGIN and LIST-END by squarbe
  1477.    rackets.  respectively. The indentation, blank spaces, and newlines
  1478.    in the example are not part of the token list, but are used here to
  1479.    make the structure of the token list clear.
  1480.  
  1481.                    ([   [ ]    prop1 value1 prop2 value2]
  1482.                     [pathname1 prop1 value1 prop2 value2]
  1483.                     [pathname2 prop1 value1])
  1484.  
  1485.    The pathname is a string in the full pathname syntax of the server
  1486.    host.  See the section "Syntax of File and Directory Pathname
  1487.    Arguments", section 7.4.
  1488.  
  1489.    For further information on file property/value pairs:  See the
  1490.    section "Format of NFILE File Property/Value Pairs", section 7.5.
  1491.  
  1492. 8.12  DISABLE-CAPABILITIES Command
  1493.  
  1494.    Command:  (DISABLE-CAPABILITIES tid capability)
  1495.  
  1496.    Response: (DISABLE-CAPABILITIES tid cap-1 success-1
  1497.                   cap-2 success-2 cap-3 success-3 ...)
  1498.  
  1499.    DISABLE-CAPABILITIES causes an access capability to be disabled on
  1500.    the server machine.  capability is a string naming the capability to
  1501.    be disabled.  The meaning of the capability is dependent on the
  1502.    operating system.
  1503.  
  1504.    The return values cap-1, cap-2, and so on, are strings specifying
  1505.    names of capabilities.  If the capability named by cap-1 was
  1506.    successfully disabled, the corresponding success-1 is supplied as
  1507.    Boolean truth; otherwise it is the empty token list.
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514. Greenberg & Keene                                              [Page 27]
  1515.  
  1516. RFC 1037             NFILE - A File Access Protocol        December 1987
  1517.  
  1518.  
  1519.    Although the user can specify only one capability to disable, it is
  1520.    conceivable that the result of disabling that particular capability
  1521.    is the disabling of other, related capabilities.  That is why the
  1522.    command response can contain information on more than one capability.
  1523.  
  1524. 8.13  ENABLE-CAPABILITIES Command
  1525.  
  1526.    Command:  (ENABLE-CAPABILITIES tid capability password)}
  1527.  
  1528.    Response: (ENABLE-CAPABILITIES tid cap-1 success-1
  1529.               cap-2 success-2 cap-3 success-3 ...)
  1530.  
  1531.    ENABLE-CAPABILITIES causes an access capability to be enabled on the
  1532.    server machine.  The password argument is optional, and should be
  1533.    included only if it is needed to enable this particular capability.
  1534.    Both password and capability are strings.  The meaning of the
  1535.    capability is dependent on the operating system.
  1536.  
  1537.    The return values cap-1, cap-2 and so on, are strings specifying
  1538.    names of capabilities.  If the capability named by cap-1 was
  1539.    successfully enabled, the corresponding success-1 is supplied as
  1540.    Boolean truth; otherwise it is the empty token list.
  1541.  
  1542.    Although the user can specify only one capability to enable, it is
  1543.    conceivable that the result of enabling that particular capability is
  1544.    the enabling of other, related capabilities.  That is why the command
  1545.    response can contain information on more than one capability.
  1546.  
  1547. 8.14  EXPUNGE Command
  1548.  
  1549.    Command:  (EXPUNGE tid directory-pathname)
  1550.  
  1551.    Response: (EXPUNGE tid server-storage-units-freed)
  1552.  
  1553.    EXPUNGE causes the directory specified by pathname to be expunged.
  1554.    Expunging means that any files that have been soft deleted are to be
  1555.    permanently removed.
  1556.  
  1557.    For file systems that do not support soft deletion, the command is to
  1558.    be ignored; a success command response is sent, but no action is
  1559.    performed on the file system.  In this case, the number-of-server-
  1560.    storage-units-freed return value should be omitted.
  1561.  
  1562.    directory-pathname is a required string argument in the directory
  1563.    pathname format; it must refer to a directory on the server file
  1564.    system, and not to a file.  See the section "Syntax of File and
  1565.    Directory Pathname Arguments", section 7.4.
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Greenberg & Keene                                              [Page 28]
  1571.  
  1572. RFC 1037             NFILE - A File Access Protocol        December 1987
  1573.  
  1574.  
  1575.    The return value server-storage-units-freed is an integer specifying
  1576.    how many records, blocks, or whatever unit is used to measure file
  1577.    storage on the server host system, were recovered.  This return value
  1578.    should be omitted if the server does not know how many storage units
  1579.    were freed.
  1580.  
  1581.    The protocol does not define whether directory-pathname is really a
  1582.    pathname as directory or a wildcard pathname of files to be expunged.
  1583.    The protocol does not define whether or not wildcards are permitted,
  1584.    or required to be supported, in the directory portion of the pathname
  1585.    (representing an implicit request to expunge many directories).
  1586.  
  1587. 8.15  FILEPOS Command
  1588.  
  1589.    Command:  (FILEPOS tid handle position resync-uid)
  1590.  
  1591.    Response: (FILEPOS tid)
  1592.  
  1593.    FILEPOS sets the file access pointer to a given position, relative to
  1594.    the beginning of the file.  FILEPOS is used to indicate the position
  1595.    of the next byte of data to be transferred.
  1596.  
  1597.    The handle indicates the file to be affected.  handle must be a data
  1598.    channel handle for a data stream opening, or a direct file identifier
  1599.    for a direct access opening.  Both handle and position are required
  1600.    arguments.
  1601.  
  1602.    position is an integer indicating to which point in the file the file
  1603.    access pointer is to be reset.  position is either a byte number
  1604.    according to the current byte size being used, or characters for
  1605.    character openings.  Position zero is the beginning of the file.  If
  1606.    this is a character opening, position is measured in server units,
  1607.    not in NFILE character set units.
  1608.  
  1609.    If the FILEPOS command is given on an input data channel (that is, a
  1610.    data channel currently sending data from server to user), the
  1611.    affected data channel must be resynchronized after the FILEPOS is
  1612.    accomplished, in order to identify the start of the new data.  The
  1613.    resync-uid is a unique identifier associated with the
  1614.    resynchronization of the data channel; it is unique with respect to
  1615.    this dialogue.  resync-uid must be supplied if handle is an input
  1616.    handle, but it is not supplied otherwise.  For more information on
  1617.    the resynchronization procedure:  See the section "NFILE Data
  1618.    Connection Resynchronization", section 9.2.
  1619.  
  1620.    In the output case, the user must somehow indicate to the server, on
  1621.    the output data channel, when there is no more data.  The user side
  1622.    sends the keyword token EOF to do so.  Upon receiving that control
  1623.  
  1624.  
  1625.  
  1626. Greenberg & Keene                                              [Page 29]
  1627.  
  1628. RFC 1037             NFILE - A File Access Protocol        December 1987
  1629.  
  1630.  
  1631.    token, the server is required to position the file pointer according
  1632.    to the position given.  When the new file position is established,
  1633.    the server resumes accepting data at the new file position.
  1634.  
  1635.    In most cases, using the direct access mode of transfer is more
  1636.    convenient and efficient than repeated use of FILEPOS with a data
  1637.    stream opening.
  1638.  
  1639.    There are problems inherent in trying to set a file position of a
  1640.    character-oriented file on a foreign host, if one machine is a
  1641.    Symbolics computer and the other is not.  For example, character set
  1642.    translation must take place.  See the section "NFILE Character Set",
  1643.    section 6.  Because of these difficulties, FILEPOS might not be
  1644.    supported in the future on character files.  FILEPOS is not
  1645.    problematic for binary files.
  1646.  
  1647. 8.15.1  Implementation Hint for FILEPOS Command
  1648.  
  1649.    The server processing of this command (by the control connection
  1650.    handler) must not attempt to wait for the resynchronization procedure
  1651.    to complete.  It is possible that the user could abort between
  1652.    sending the FILEPOS command and reading for the mark and
  1653.    resynchronization identifier.  That scenario could leave the sender
  1654.    of the resynchronization identifier, on the server side, blocked for
  1655.    output indefinitely.
  1656.  
  1657.    Only two commands received on the control connection can break the
  1658.    data channel out of the blocked state described above:  CLOSE with
  1659.    abort-p supplied as Boolean truth, and RESYNCHRONIZE-DATA-CHANNEL.
  1660.    Therefore, the control connection must not wait for the data channel
  1661.    to finish performing the resynchronization procedure.  This wait
  1662.    should instead be performed by the process managing the data channel.
  1663.  
  1664. 8.16  FINISH Command
  1665.  
  1666.    Command:  (FINISH tid handle)
  1667.  
  1668.    Response: (FINISH tid truename binary-p other-properties)
  1669.  
  1670.    FINISH closes a file and reopens it immediately with the file
  1671.    position pointer saved, thus leaving it open for further I/O.  If
  1672.    possible, the implementation should do the closing and opening in an
  1673.    indivisible operation, such that no other process can get access to
  1674.    the file.
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682. Greenberg & Keene                                              [Page 30]
  1683.  
  1684. RFC 1037             NFILE - A File Access Protocol        December 1987
  1685.  
  1686.  
  1687.    The arguments, results, and their meaning are identical to those of
  1688.    the CLOSE command.  See the section "CLOSE Command", section 8.3.
  1689.    FINISH requires a handle, which has the same meaning as the handle of
  1690.    the CLOSE command.
  1691.  
  1692.    In the output case, for both direct mode and data stream mode of
  1693.    openings, the server writes out all buffers and sets the byte count
  1694.    of the file.  The user sends the keyword token EOF on the data
  1695.    channel, to indicate that the end of data has been reached.  The
  1696.    server leaves the file in such a state that if the system or server
  1697.    crashes anytime after the FINISH command has completed, it would
  1698.    later appear as though the file had been closed by this command.
  1699.    However, the file is not left in a closed state now; it is left open
  1700.    for further I/O operations.  FINISH is a reliability feature.
  1701.  
  1702.    FINISH is somewhat pointless in the input case, but valid.  The
  1703.    native Symbolics file system (LMFS) implements FINISH on an output
  1704.    file by an internal operation that effectively goes through the work
  1705.    of closing but leaves the file open for appending.
  1706.  
  1707.    ERRORS ON FINISH
  1708.  
  1709.    After writing every last bit sent by the user to disk, and before
  1710.    closing the file, the server checks the data channel specified by
  1711.    handle to see if an asynchronous error is outstanding on that
  1712.    channel.  That is, the server must determine whether it has sent an
  1713.    asynchronous error to the user, to which the user has not yet
  1714.    responded with a CONTINUE command.  If so, the server is unable to
  1715.    finish the file, and it must send a command error response response,
  1716.    indicating that an error is pending on the channel.  The appropriate
  1717.    three-letter error code is EPC.  See the section "NFILE Errors and
  1718.    Notifications", section 10.
  1719.  
  1720. 8.17  HOME-DIRECTORY Command
  1721.  
  1722.    Command:  (HOME-DIRECTORY tid user)
  1723.  
  1724.    Response: (HOME-DIRECTORY tid directory-pathname)
  1725.  
  1726.    HOME-DIRECTORY returns the full pathname of the home directory on the
  1727.    server machine for the given user.
  1728.  
  1729.    user is a string that should be recognizable as a user's login name
  1730.    on the server operating system.  directory-pathname is a string in
  1731.    the directory pathname format.  See the section "Syntax of File and
  1732.    Directory Pathname Arguments", section 7.4.
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738. Greenberg & Keene                                              [Page 31]
  1739.  
  1740. RFC 1037             NFILE - A File Access Protocol        December 1987
  1741.  
  1742.  
  1743. 8.18  LOGIN Command
  1744.  
  1745.    Command:  (LOGIN tid user password FILE-SYSTEM USER-VERSION)
  1746.  
  1747.    Response: (LOGIN tid keyword/value-pairs)
  1748.  
  1749.    LOGIN logs the given user in to the server machine, using the
  1750.    password if necessary.  Both user and password are string arguments;
  1751.    user is required, password is optional.  An omitted password is valid
  1752.    if the host allows the specified user to log in without a password.
  1753.    Depending on the operating system and server, it might be necessary
  1754.    to log in to run a program (in this case the NFILE server program) on
  1755.    the host.  LOGIN establishes a user identity that is used by the
  1756.    operating system to establish the file author and determine file
  1757.    access rights during the current session.
  1758.  
  1759.    The server has the option to reject with an error any command except
  1760.    LOGIN if a successful LOGIN command has not been performed.  This is
  1761.    recommended.  Many operating systems perform the login function in a
  1762.    different process and/or environment than user programs.  The portion
  1763.    of the NFILE server running in the special login environment could
  1764.    conceivably be capable only of processing the LOGIN command; this is
  1765.    the reason for having the LOGIN command in NFILE.
  1766.  
  1767.    FILE-SYSTEM and USER-VERSION are optional keyword/value pairs.  The
  1768.    FILE-SYSTEM keyword/value pair selects the identity of the file
  1769.    system to which all following commands in this session are to be
  1770.    directed.  This argument has meaning only if the server host machine
  1771.    has multiple file systems, and the targeted file system is other than
  1772.    the default file system that a user would get by initiating a
  1773.    dialogue with that host.  The FILE-SYSTEM argument is an arbitrary
  1774.    token list.  If the server does not recognize it, the server gives an
  1775.    appropriate command error response.
  1776.  
  1777.    Currently, the only use of FILE-SYSTEM is for Symbolics servers to
  1778.    select one of the front-end processor hosts instead of the LMFS,
  1779.    which is the default.  In this case, the first element in the token
  1780.    list is the keyword FEP, and the second element in the token list is
  1781.    an integer, indicating the desired FEP disk unit number.  If the
  1782.    server discovers there is no such file system, the server gives a
  1783.    command error response including the three-letter code NFS, meaning
  1784.    "no file system".  See the section "NFILE Errors and Notifications",
  1785.    section 10.
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794. Greenberg & Keene                                              [Page 32]
  1795.  
  1796. RFC 1037             NFILE - A File Access Protocol        December 1987
  1797.  
  1798.  
  1799.    The user tells the server what version of NFILE it is running by
  1800.    including the optional USER-VERSION keyword/value pair.  The value
  1801.    associated with USER-VERSION can be a string, an integer, or a token
  1802.    list.  This document describes NFILE user version 2 and server
  1803.    version 2.
  1804.  
  1805.    Upon receiving the representation of the user version, the server can
  1806.    either adjust certain parameters to handle this particular version,
  1807.    or simply ignore the user version altogether.  Currently, the only
  1808.    released versions of NFILE are user version 2 and server version 2.
  1809.  
  1810.    LOGIN RETURN VALUES:  keyword/value-pairs
  1811.  
  1812.    The keyword/value-pairs is a token list composed of keywords followed
  1813.    by their values.  The server includes any or all of the following
  1814.    keywords and their values; they are all optional.  The following
  1815.    keywords are recognized:
  1816.  
  1817.    NAME
  1818.  
  1819.    The value associated with NAME is a string specifying the user
  1820.    identity, in the server host's terms.
  1821.  
  1822.    PERSONAL-NAME
  1823.  
  1824.    The value associated with PERSONAL-NAME is a string representing the
  1825.    user's personal name, last name first.  For example:  "McGillicuddy,
  1826.    Aloysius X.".
  1827.  
  1828.    HOMEDIR-PATHNAME
  1829.  
  1830.    The value associated with HOMEDIR-PATHNAME is a string in the
  1831.    pathname as directory format, indicating the home directory of the
  1832.    user.  See the section "Syntax of File and Directory Pathname
  1833.    Arguments", section 7.4.
  1834.  
  1835.    GROUP-AFFILIATION
  1836.  
  1837.    The value associated with GROUP-AFFILIATION is a string specifying
  1838.    the group to which the user belongs, when this concept is
  1839.    appropriate.
  1840.  
  1841.    SERVER-VERSION
  1842.  
  1843.    The value associated with SERVER-VERSION can be a string, an integer,
  1844.    or a token list.  The value is a representation of the version of the
  1845.    server is running.  Upon receiving the server version, the user can:
  1846.    adjust certain parameters to handle this particular version; accept
  1847.  
  1848.  
  1849.  
  1850. Greenberg & Keene                                              [Page 33]
  1851.  
  1852. RFC 1037             NFILE - A File Access Protocol        December 1987
  1853.  
  1854.  
  1855.    the version; or close the connection.  Currently, the only released
  1856.    versions of NFILE are user version 2 and server version 2.
  1857.  
  1858.    PROPERTY-INDEX-TABLE
  1859.  
  1860.    The value associated with PROPERTY-INDEX-TABLE is a token list of
  1861.    keywords.  This return value enables the server to inform the user
  1862.    which file properties are meaningful on its file system.  The
  1863.    keywords in PROPERTY-INDEX-TABLE can be used by the DIRECTORY command
  1864.    (a user request for information on file properties of a specified
  1865.    directory or directories).  The server can specify a certain property
  1866.    by giving an integer that is the index of that file property into the
  1867.    PROPERTY-INDEX-TABLE.  This reduces the volume of data sent during
  1868.    directory listings.  The first element in PROPERTY-INDEX-TABLE is
  1869.    indexed by the number 0.  See the section "DIRECTORY Command",
  1870.    section 8.11.
  1871.  
  1872. 8.19  MULTIPLE-FILE-PLISTS Command
  1873.  
  1874.    Command:  (MULTIPLE-FILE-PLISTS tid input-handle paths
  1875.               characters properties)
  1876.  
  1877.    Response: (MULTIPLE-FILE-PLISTS tid)
  1878.  
  1879.    MULTIPLE-FILE-PLISTS returns file property information of one or more
  1880.    files.  The server sends the information in a data structure (the
  1881.    format is described later in this section) on the given input-handle.
  1882.    paths is an embedded token list composed of the pathnames in which
  1883.    the user is interested.  Each pathname in this list is a string in
  1884.    the full pathname syntax of the server host.  Unlike for the
  1885.    DIRECTORY command, wildcards are not allowed in these pathnames.  See
  1886.    the section "Syntax of File and Directory Pathname Arguments",
  1887.    section 7.4.
  1888.  
  1889.    characters is either Boolean truth (indicating that each file is a
  1890.    character file), the empty token list (each file is a binary file),
  1891.    or the keyword DEFAULT.  DEFAULT indicates that the server itself is
  1892.    to figure out whether a file is a character or binary file.  For more
  1893.    information on the meaning of the DEFAULT keyword:  See the section
  1894.    "OPEN Command", section 8.20.  The value of characters can influence
  1895.    some servers' idea of a file's length.
  1896.  
  1897.    properties is a token list of keywords indicating which properties
  1898.    the user wants returned.  The server is always free to return more
  1899.    properties than those requested in the properties argument.  If
  1900.    properties is supplied as the empty token list, the server should
  1901.    transmit all known properties on the files.
  1902.  
  1903.  
  1904.  
  1905.  
  1906. Greenberg & Keene                                              [Page 34]
  1907.  
  1908. RFC 1037             NFILE - A File Access Protocol        December 1987
  1909.  
  1910.  
  1911.    The server transmits as much of the requested information as possible
  1912.    on the given input-handle.  The information is contained in a top-
  1913.    level token list of elements.  Each element corresponds with a
  1914.    supplied pathname; the order of the original pathlist must be
  1915.    retained in the returned token list.  An element is an empty token
  1916.    list if the corresponding file or any of its containing directories
  1917.    does not exist.  The elements that correspond to successfully located
  1918.    files are lists composed of truename followed by any properties.
  1919.    properties are keyword/value pairs.  truename is a string in the full
  1920.    pathname syntax of the server host.
  1921.  
  1922.    The following example shows TOP-LEVEL-LIST-BEGIN and TOP-LEVEL-LIST-
  1923.    END as parentheses, and LIST-BEGIN and LIST-END with square brackets.
  1924.  
  1925.    For example, the user supplied a pathlist argument resembling:
  1926.  
  1927.                             [file1 file2 file3]
  1928.  
  1929.    The server could not locate file1 or file3, but did locate file2, and
  1930.    found the length and author of file2.  The top-level token list
  1931.    transmitted by the server is:
  1932.  
  1933.         ( [] [ truename-of-file2 LENGTH 381 AUTHOR williams ] [] )
  1934.  
  1935.    For further detail on how file properties and values are expressed:
  1936.    See the section "Format of NFILE File Property/Value Pairs", section
  1937.    7.5.
  1938.  
  1939. 8.20  OPEN Command
  1940.  
  1941.    Command:  (OPEN tid handle pathname direction binary-p
  1942.                 TEMPORARY RAW SUPER-IMAGE DELETED PRESERVE-DATES
  1943.                 SUBMIT DIRECT-FILE-ID ESTIMATED-LENGTH BYTE-SIZE
  1944.                 IF-EXISTS IF-DOES-NOT-EXIST)
  1945.  
  1946.    Response: (OPEN tid truename binary-p other-properties)
  1947.  
  1948.    OPEN opens a file for reading, writing, or direct access at the
  1949.    server host.  That means, in general, asking the host file system to
  1950.    access the file and obtaining a file number, pointer, or other
  1951.    quantity for subsequent rapid access to the file; this is called an
  1952.    "opening".  See the section "NFILE File Opening Modes", section 5.
  1953.  
  1954.    The OPEN command has the most complicated syntax of any NFILE
  1955.    command.  The OPEN command has required arguments, an optional
  1956.    argument, and many optional keyword/value pairs.  For details on the
  1957.    syntax of each of these parts of the OPEN command:  See the section
  1958.    "Conventions Used in This Document", section 7.
  1959.  
  1960.  
  1961.  
  1962. Greenberg & Keene                                              [Page 35]
  1963.  
  1964. RFC 1037             NFILE - A File Access Protocol        December 1987
  1965.  
  1966.  
  1967.    The following arguments are required:  pathname, direction, and
  1968.    binary-p.  handle is an optional argument, which must either be
  1969.    supplied or explicitly omitted by means of substituting in its place
  1970.    the empty token list.
  1971.  
  1972.    The OPEN command has many optional keyword/value pairs, which encode
  1973.    conceptual arguments to the server file system for the OPEN
  1974.    operation.  A detailed description of all the supported OPEN optional
  1975.    keywords is given below.
  1976.  
  1977.    The OPEN return values reflect information about the file opened,
  1978.    when the opening is successful.  In the case of a probe-type opening,
  1979.    this information is returned when the given file (or link, or
  1980.    directory) exists and is accessible, even though the file (or link,
  1981.    or directory) is not actually opened.  For detail on the OPEN return
  1982.    values: See the section "NFILE OPEN Response Return Values", section
  1983.    8.20.2.
  1984.  
  1985.    THE pathname OPEN ARGUMENT
  1986.  
  1987.    The pathname is a required argument specifying the file to be opened.
  1988.    pathname is a string in the full pathname syntax of the server host.
  1989.    See the section "Syntax of File and Directory Pathname Arguments",
  1990.    section 7.4.
  1991.  
  1992.    For some purposes (for example, when the OPEN argument direction is
  1993.    supplied as PROBE-DIRECTORY), only the directory specified by this
  1994.    pathname is utilized.  See the section "NFILE OPEN Optional
  1995.    Keyword/Value Pairs", section 8.20.1.
  1996.  
  1997.    THE handle OPEN ARGUMENT
  1998.  
  1999.    The handle argument of the OPEN command specifies a data channel to
  2000.    be used for the transfer.  Subsequent commands in this session use
  2001.    the same handle to specify this opening.  It is the user side's
  2002.    responsibility to ensure that handle refers to an existing and free
  2003.    data channel that does not require resynchronization before use.  A
  2004.    handle must be supplied, unless a probe-type opening is desired (that
  2005.    is, the direction is supplied as PROBE, PROBE-DIRECTORY, or PROBE-
  2006.    LINK) or a direct access opening is being requested (that is, a
  2007.    DIRECT-FILE-ID is supplied).  In those cases, the empty token list is
  2008.    supplied for handle.
  2009.  
  2010.    THE direction OPEN ARGUMENT
  2011.  
  2012.    The direction argument must be supplied as one of these keywords:
  2013.    INPUT, OUTPUT, IO, PROBE, PROBE-DIRECTORY, and PROBE-LINK.  The
  2014.    meanings of the direction keywords are as follows:
  2015.  
  2016.  
  2017.  
  2018. Greenberg & Keene                                              [Page 36]
  2019.  
  2020. RFC 1037             NFILE - A File Access Protocol        December 1987
  2021.  
  2022.  
  2023.    INPUT
  2024.  
  2025.       Specifies that the file is to be opened for input server-to-user
  2026.       transfer).  To request a direct access opening, supply a value for
  2027.       DIRECT-FILE-ID. If no DIRECT-FILE-ID is supplied, the opening is a
  2028.       data stream opening.
  2029.  
  2030.    OUTPUT
  2031.  
  2032.       Specifies that the file is to be opened for output user-to-server
  2033.       transfer).  To request a direct access opening, supply a value for
  2034.       DIRECT-FILE-ID. If no DIRECT-FILE-ID is supplied, the opening is a
  2035.       data stream opening.
  2036.  
  2037.    IO
  2038.  
  2039.       Specifies that interspersed input and output will be performed on
  2040.       the file.  This is only meaningful in direct access mode.  A
  2041.       DIRECT-FILE-ID must also be supplied.  See the section "NFILE OPEN
  2042.       Optional Keyword/Value Pairs", section 8.20.1.
  2043.  
  2044.    If direction is supplied as PROBE, PROBE-LINK, or PROBE-DIRECTORY,
  2045.    the opening is said to be a probe-type opening.  The DIRECT-FILE-ID
  2046.    option is meaningless and an error for probe-type openings.  The file
  2047.    handle must be supplied as an empty token list for probe-type
  2048.    openings.
  2049.  
  2050.    PROBE
  2051.  
  2052.       Specifies that the file is not to be opened at all, but simply
  2053.       checked for existence.  If the file does not exist or is not
  2054.       accessible, the error indications and actions are identical to
  2055.       those that would be given for an INPUT opening.  If the file does
  2056.       exist, the successful command response contains the same
  2057.       information as it would have if the file had been opened for
  2058.       INPUT.  If it is a link, the link is followed to its target.
  2059.  
  2060.    PROBE-LINK
  2061.  
  2062.       Like PROBE, with one difference.  PROBE-LINK specifies that if the
  2063.       pathname is found to refer to a link, that link is not to be
  2064.       followed, and information about the link itself is to be returned.
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074. Greenberg & Keene                                              [Page 37]
  2075.  
  2076. RFC 1037             NFILE - A File Access Protocol        December 1987
  2077.  
  2078.  
  2079.    PROBE-DIRECTORY
  2080.  
  2081.       PROBE-DIRECTORY requests information about the directory
  2082.       designated by the pathname argument.  In the PROBE-DIRECTORY case,
  2083.       the pathname argument refers to the directory on which information
  2084.       is requested.  In all other cases, the pathname refers to a file
  2085.       to be opened.  If pathname contains a file name and file type,
  2086.       these parts of the pathname are ignored for PROBE-DIRECTORY
  2087.       openings as long as they are syntactically valid.
  2088.  
  2089.    THE binary-p OPEN ARGUMENT
  2090.  
  2091.    The value of binary-p affects the mode in which the server opens the
  2092.    file, as well as informing it whether or not character set
  2093.    translation must be performed.
  2094.  
  2095.    If binary-p is supplied as the empty token list, the opening is said
  2096.    to be a character opening.  The server performs character set
  2097.    translation between its native character set and the NFILE character
  2098.    set.  The data is transferred over the data connection one character
  2099.    per eight-bit byte.  See the section "NFILE Character Set", section
  2100.    6.
  2101.  
  2102.    If binary-p is supplied as Boolean truth, the opening is said to be a
  2103.    binary opening.  The user side supplies the byte size via the BYTE-
  2104.    SIZE option; if not supplied, the default byte size is 16 bits.  If
  2105.    byte size is less than 9, the file data is transferred byte by byte.
  2106.    If the byte size is 9 or greater, the server transfers each byte of
  2107.    the file as two eight-bit bytes, low-order first.
  2108.  
  2109.    binary-p can also be supplied as the keyword DEFAULT.  DEFAULT
  2110.    specifies that the server itself is to determine whether to transfer
  2111.    binary or character data.  DEFAULT is meaningful only for input
  2112.    openings; it is an error for OUTPUT, IO, or probe-type openings.  For
  2113.    file systems that maintain the innate binary or character nature of a
  2114.    file, the server simply asks the file system which case is in force
  2115.    for the file specified by pathname.
  2116.  
  2117.    When binary-p is supplied as DEFAULT, on file systems that do not
  2118.    maintain thisinformation, the server is required to perform a
  2119.    heuristic check for Symbolicsobject fileson the first two 16-bit
  2120.    bytes of the file.  If the file isdetermined to be aSymbolics object
  2121.    file, the server performs a BINARY openingwith BYTE-SIZE of16;
  2122.    otherwise, it performs a CHARACTER opening.
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130. Greenberg & Keene                                              [Page 38]
  2131.  
  2132. RFC 1037             NFILE - A File Access Protocol        December 1987
  2133.  
  2134.  
  2135.    The details of the check are as follows: if the first 16-bit byte is
  2136.    the octal number170023 and the second 16-bit byte is any number
  2137.    between 0 and 77 octal(inclusive), the file is recognized as a
  2138.    Symbolics object file.  In any othercase, it is not.
  2139.  
  2140. 8.20.1  NFILE OPEN Optional Keyword/Value Pairs
  2141.  
  2142.    The OPEN command has many optional keyword/value pairs that encode
  2143.    conceptual arguments to the file system for the OPEN operation.
  2144.  
  2145.    The following options are used often:
  2146.  
  2147.    BYTE-SIZE
  2148.  
  2149.       Must be followed by an integer between 1 and 16, inclusive, or the
  2150.       empty token list.  BYTE-SIZE is meaningful only for binary
  2151.       openings.  BYTE-SIZE can be ignored for probe-type openings.  It
  2152.       can be omitted entirely for character openings, but if supplied,
  2153.       must be followed by the empty token list.  If binary-p is supplied
  2154.       as DEFAULT, BYTE-SIZE can be omitted entirely, or followed by the
  2155.       empty token list.
  2156.  
  2157.       If a binary opening is requested and BYTE-SIZE is not supplied,
  2158.       the assumed value is 16 for output openings. For input binary
  2159.       openings, the default is the host file system's stored conception
  2160.       of the file's byte size (for those hosts that natively support
  2161.       byte size).  For file systems that do not natively support
  2162.       natively byte size, the default byte-size on binary input is 16.
  2163.  
  2164.       For file systems that maintain the innate byte-size of each file,
  2165.       the server should supply this number to the appropriate operating
  2166.       system interface that performs the semantics of opening the file.
  2167.       For other operating systems, a file written with a given byte size
  2168.       must produce the same bytes in the same order when read with that
  2169.       byte size.  In this case, the server or host operating system can
  2170.       choose any packing scheme that complies with this rule.
  2171.  
  2172.       Operating systems that do not support byte size must ensure that
  2173.       binary files written from user ends of the current protocol can be
  2174.       read back correctly.  However, the server can choose packing
  2175.       schemes that allow all bits of the server host's word to be
  2176.       accessed and concur with other packing schemes used by native host
  2177.       software.
  2178.  
  2179.       For example, Multics supports 36 bit words and 9 bit bytes.  A
  2180.       packing scheme appropriate for a Multics NFILE server is:
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186. Greenberg & Keene                                              [Page 39]
  2187.  
  2188. RFC 1037             NFILE - A File Access Protocol        December 1987
  2189.  
  2190.  
  2191.                Byte Size                Packing Scheme
  2192.  
  2193.                7, 8, or 9 bits          four per 36-bit word
  2194.                10, 11, or 12 bits       three per 36-bit word
  2195.                13, 14, 15, or 16 bits   two per 36-bit word
  2196.  
  2197.       In the first packing scheme in the table, native Multics
  2198.       character-oriented software can access each logical byte
  2199.       sequentially.  In the last packing scheme, each Symbolics byte is
  2200.       in a halfword, easily accessible and visible in an octal
  2201.       representation.  To achieve maximum data transfer rate and access
  2202.       all bits of a Multics word, a byte size of 12 must be specified.
  2203.  
  2204.    DELETED
  2205.  
  2206.       If supplied as Boolean truth, DELETED specifies that deleted"
  2207.       files are to be treated as though they were not "deleted".
  2208.       DELETED is meaningful only for operating systems that support
  2209.       "soft deletion" and subsequent "undeletion" of files.  Other
  2210.       operating systems must ignore this option.  Normally, deleted
  2211.       files are not visible to the OPEN operation; this option makes
  2212.       them visible.
  2213.  
  2214.       DELETED can also be followed by the empty token list, which has
  2215.       the same effect as omitting the DELETED keyword/value pair
  2216.       entirely.  For output openings, DELETED is meaningless and an
  2217.       error if supplied.
  2218.  
  2219.    DIRECT-FILE-ID
  2220.  
  2221.       If supplied, the DIRECT-FILE-ID indicates that the opening is to
  2222.       be a direct access mode opening.  If not supplied, the opening is
  2223.       a data stream opening.  The value of DIRECT-FILE-ID is a string
  2224.       generated by the user, that has not been used as a DIRECT-FILE-ID
  2225.       in this dialogue, and does not designate any data channel.  The
  2226.       DIRECT-FILE-ID is a unique identifier for the direct access
  2227.       opening.  It is used for all operations that identify an opening
  2228.       rather than a data channel.  The DIRECT-FILE-ID is used to
  2229.       identify a direct access opening, just as a file handle is used to
  2230.       identify a data stream opening.  The PROPERTIES, CLOSE, and RENAME
  2231.       commands use the DIRECT-FILE-ID in this way.  There are only two
  2232.       NFILE commands applicable to direct access openings (ABORT and
  2233.       CONTINUE) that do not use the DIRECT-FILE-ID, but use a data
  2234.       channel handle instead.
  2235.  
  2236.    PRESERVE-DATES
  2237.  
  2238.       If supplied as Boolean truth, PRESERVE-DATES specifies that the
  2239.  
  2240.  
  2241.  
  2242. Greenberg & Keene                                              [Page 40]
  2243.  
  2244. RFC 1037             NFILE - A File Access Protocol        December 1987
  2245.  
  2246.  
  2247.       server is to attempt to prevent the operating system from updating
  2248.       the "reference date" or date-time used" of the file.  This is
  2249.       meaningful only for input openings, and is an error otherwise.
  2250.  
  2251.       The Symbolics operating system invokes this option for operations
  2252.       such as View File in the editor, where it wishes to assert that
  2253.       the user did not "read" the file, but just "looked at it".
  2254.       Servers on operating systems that do not support reference dates
  2255.       or users revising or suppressing update of the reference dates
  2256.       must ignore this option.
  2257.  
  2258.    ESTIMATED-LENGTH
  2259.  
  2260.       The value of ESTIMATED-LENGTH is an integer estimating the length
  2261.       of the file to be transferred. This option is meaningful and
  2262.       permitted only for output openings.  ESTIMATED-LENGTH enables the
  2263.       user end to suggest to the server's file system how long the file
  2264.       is going to be.  This can be useful for file systems that must
  2265.       preallocate files or file maps or that accrue performance benefits
  2266.       from knowing this information at nthe time the file is first
  2267.       opened.  This estimate, if supplied, is not required to be exact.
  2268.       It is ignored by servers to which it is not useful or interesting.
  2269.       The units of the estimate are characters for character openings,
  2270.       and bytes of the agreed-upon byte size for binary openings.  The
  2271.       character units should be server units, if possible, but since
  2272.       this is only an estimate, NFILE character units are acceptable.
  2273.       See the section "NFILE Character Set", section 6.
  2274.  
  2275.    IF-EXISTS
  2276.  
  2277.       Meaningful only for output openings, ignored otherwise, but not
  2278.       diagnosed as an error.  The value of IF-EXISTS is a keyword that
  2279.       specifies the action to Be taken if a file of the given name
  2280.       already exists.  The semantics of the values are derived from the
  2281.       Common Lisp specification and repeated here for completeness.  If
  2282.       the file does not already exist, the IF-EXISTS option and its
  2283.       value are ignored.
  2284.  
  2285.       If the user side does not give the IF-EXISTS option, The action to
  2286.       be taken if a file of the given name already exists depends on
  2287.       whether or not the file system supports file versions.  If it
  2288.       does, the default is ERROR (if an explicit version is given in the
  2289.       file pathname) or NEW-VERSION (if the version in the file pathname
  2290.       is the newest version).  For file systems not supporting versions,
  2291.       the default is SUPERSEDE.  These actions are described below.
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298. Greenberg & Keene                                              [Page 41]
  2299.  
  2300. RFC 1037             NFILE - A File Access Protocol        December 1987
  2301.  
  2302.  
  2303.       IF-EXISTS provides the mechanism for overwriting or appending to
  2304.       files.  With the default setting of IF-EXISTS, new files are
  2305.       created by every output opening.
  2306.  
  2307.       Operating systems supporting soft deletion can take different
  2308.       actions if a "deleted" file already exists with the same name (and
  2309.       type and version, where appropriate) as a file to be created.  The
  2310.       Symbolics file system (LMFS) effectively uses SUPERSEDE, even if
  2311.       not asked to do so.  Other servers and file systems are urged to
  2312.       do similarly.  Recommended action is to not allow deleted files to
  2313.       prevent successful file creation (with specific version number)
  2314.       even if an IF-EXISTS option weaker than SUPERSEDE, RENAME, or
  2315.       RENAME-AND-DELETE is specified or implied.
  2316.  
  2317.       Here are the possible values and their meanings:
  2318.  
  2319.       ERROR
  2320.  
  2321.          Reports an error.
  2322.  
  2323.       NEW-VERSION
  2324.  
  2325.          Creates a new file with the same file name but with a larger
  2326.          version number.  This is the default when the version component
  2327.          of the filename is newest.  File systems without version
  2328.          numbers can implement this by effectively treating it as
  2329.          SUPERSEDE.
  2330.  
  2331.       RENAME
  2332.  
  2333.          Renames the existing file to some other name and then creates a
  2334.          new file with the specified name.  On most file systems, this
  2335.          renaming happens at the time of a successful close.
  2336.  
  2337.       RENAME-AND-DELETE
  2338.  
  2339.          Renames the existing file to some other name and then deletes
  2340.          it (but does not expunge it, on those systems that distinguish
  2341.          deletion from expunging).  Then it creates a new file with the
  2342.          specified name.  On most file systems, this renaming happens at
  2343.          the time of a successful close.
  2344.  
  2345.       OVERWRITE
  2346.  
  2347.          Output operations on the opening destructively modify the
  2348.          existing file.  New data replaces old data at the beginning of
  2349.          the file; however, the file is not truncated to length zero
  2350.          upon opening.
  2351.  
  2352.  
  2353.  
  2354. Greenberg & Keene                                              [Page 42]
  2355.  
  2356. RFC 1037             NFILE - A File Access Protocol        December 1987
  2357.  
  2358.  
  2359.       TRUNCATE
  2360.  
  2361.          Output operations on the opening destructively modify the
  2362.          existing file.  The file pointer is initially positioned at the
  2363.          beginning of the file; at that time, TRUNCATE truncates the
  2364.          file to length zero and frees disk storage occupied by it.
  2365.  
  2366.       APPEND
  2367.  
  2368.          Output operations on the opening destructively modify the
  2369.          existing file.  New data is placed at the current end of the
  2370.          file.
  2371.  
  2372.       SUPERSEDE
  2373.  
  2374.          Supersedes the existing file.  This means that the old file is
  2375.          removed or deleted and expunged.  The new file takes its place.
  2376.          If possible, the file system does not destroy the old file
  2377.          until the new file is closed, against the possibility that the
  2378.          file will be close-aborted.  This differs from NEW-VERSION in
  2379.          that SUPERSEDE creates a new file with the same name as the old
  2380.          one, rather than a file name with a higher version number.
  2381.  
  2382.          There are currently no standards on what a server can do if it
  2383.          cannot implement some of these actions.
  2384.  
  2385.    IF-DOES-NOT-EXIST
  2386.  
  2387.       Meaningful for input openings, never meaningful for probe-type
  2388.       openings, and sometimes meaningful for output openings.  IF-DOES-
  2389.       NOT-EXIST takes a value token, which specifies the action to be
  2390.       taken if the file does not already exist.  Like IF-EXISTS, it is a
  2391.       derivative of Common Lisp.  The default is as follows: If this is
  2392.       a probe-type opening or read opening, or if the IF-EXISTS option
  2393.       is specified as OVERWRITE, TRUNCATE, or APPEND, the default is
  2394.       ERROR.  Otherwise, the default is CREATE.
  2395.  
  2396.       These are the values for IF-DOES-NOT-EXIST:
  2397.  
  2398.       ERROR
  2399.  
  2400.          Reports an error.
  2401.  
  2402.       CREATE
  2403.  
  2404.          Creates an empty file with the specified name and then proceeds
  2405.          as if it already existed.
  2406.  
  2407.  
  2408.  
  2409.  
  2410. Greenberg & Keene                                              [Page 43]
  2411.  
  2412. RFC 1037             NFILE - A File Access Protocol        December 1987
  2413.  
  2414.  
  2415.    The following optional keyword/value pairs are rarely used, if ever:
  2416.  
  2417.    RAW
  2418.  
  2419.       If supplied as Boolean truth, RAW specifies that character set
  2420.       translation is not to be performed, but that characters are to be
  2421.       transferred intact, without inspection.  This option is meaningful
  2422.       only for character openings; it is an error otherwise.  It is also
  2423.       an error to supply RAW as Boolean truth for probe-type openings.
  2424.       RAW can also be followed by the empty token list, which has the
  2425.       same effect as if the RAW keyword/value pair were omitted
  2426.       entirely.  See the section "RAW Translation Mode", Appendix B.
  2427.  
  2428.    SUPER-IMAGE
  2429.  
  2430.       If supplied as Boolean truth, SUPER-IMAGE specifies that Rubout
  2431.       quoting is not to be performed.  This operation is meaningful only
  2432.       for character openings; it is an error otherwise.  It is also an
  2433.       error for probe-type openings.  SUPER-IMAGE can also be followed
  2434.       by the empty token list, which has the same effect as if the
  2435.       SUPER-IMAGE keyword/value pair were omitted entirely.
  2436.  
  2437.       SUPER-IMAGE mode causes the server to read or write character
  2438.       files where ASCII Rubout characters are a significant part of the
  2439.       file content, not where they are an escape for this protocol.
  2440.       However, other translations must still be performed:  See the
  2441.       section SUPER-IMAGE Translation Mode", Appendix C.
  2442.  
  2443.    TEMPORARY
  2444.  
  2445.       Used by the TOPS-20 server only.  TEMPORARY says to use GJ%TMP in
  2446.       the GTJFN.  This is useful mainly when writing files, and
  2447.       indicates that the foreign operating system is to treat the file
  2448.       as temporary.  See TOPS-20 documentation for more about the
  2449.       implications of this option.  Other servers can ignore it.  This
  2450.       option is meaningless and an error for input or probe-type
  2451.       openings.  TEMPORARY can also be followed by the empty token list,
  2452.       which has the same effect as if the TEMPORARY keyword/value pair
  2453.       were omitted entirely.
  2454.  
  2455.    SUBMIT
  2456.  
  2457.       SUBMIT is meaningful for output only.  If supplied as Boolean
  2458.       truth, SUBMIT causes the server to submit the contents of the file
  2459.       being written to the operating system as a job, after the file is
  2460.       closed.  VMS is an example of an operating system that could
  2461.       conveniently support SUBMIT.  SUBMIT can also be followed by the
  2462.       empty token list, which has the same effect as if the SUBMIT
  2463.  
  2464.  
  2465.  
  2466. Greenberg & Keene                                              [Page 44]
  2467.  
  2468. RFC 1037             NFILE - A File Access Protocol        December 1987
  2469.  
  2470.  
  2471.       keyword/value pair were omitted entirely.  Servers that do not
  2472.       implement this option should give an error response if requested
  2473.       to submit a file to the operating system.
  2474.  
  2475. 8.20.2  NFILE OPEN Response Return Values
  2476.  
  2477.    The results of a successful OPEN operation are reported in the
  2478.    command response.  Here is the specification of the OPEN response
  2479.    format:
  2480.  
  2481.    Response Format:
  2482.  
  2483.       (OPEN tid truename binary-p other-properties)
  2484.  
  2485.    The return values for OPEN and CLOSE are syntactically identical, but
  2486.    the values can change in the time interval between open and close.
  2487.  
  2488.    truename is a string representing the pathname of the file in the
  2489.    full pathname syntax of the server host.  It should be determined by
  2490.    the server once it has opened the file, via some request to its
  2491.    operating system.  The request can be of the form:  "What file
  2492.    corresponds to this JFN, file number, pointer, etc.?"  If the
  2493.    operating system supports version numbers, this string always
  2494.    contains an explicit version number.  It always contains a directory
  2495.    name, a file name, and so on.
  2496.  
  2497.    Some operating systems might not know the truename of an output file
  2498.    until it is closed.  It is permissible not to supply an explicit
  2499.    version number in the pathname in the OPEN response in this specific
  2500.    case.  On these systems the truename when the file is opened is
  2501.    different than the truename after it has been closed.
  2502.  
  2503.    The return value binary-p indicates whether the opening is a binary
  2504.    or character opening.  For binary openings, binary-p is supplied as
  2505.    Boolean truth; for character openings it is the empty token list.
  2506.  
  2507.    other-properties is a list of keyword/value pairs.  other-properties
  2508.    must contain CREATION-DATE and LENGTH.  AUTHOR should be included if
  2509.    the server operating system has a convenient mechanism for
  2510.    determining the author of the sfile.  The other properties described
  2511.    here can be included if desired.
  2512.  
  2513.    AUTHOR
  2514.  
  2515.    The value of AUTHOR is a string representing the name of the author
  2516.    of the file.  This is some kind of user identifier, whose format is
  2517.    system-specific.  As with CREATION-DATE (see below), AUTHOR is
  2518.    supposed to represent the logical determinor of the current data
  2519.  
  2520.  
  2521.  
  2522. Greenberg & Keene                                              [Page 45]
  2523.  
  2524. RFC 1037             NFILE - A File Access Protocol        December 1987
  2525.  
  2526.  
  2527.    content of the file, not necessarily the agency that actually created
  2528.    the file.
  2529.  
  2530.    BYTE-SIZE
  2531.  
  2532.    The byte-size agreed upon via the rules described for the BYTE-SIZE
  2533.    option.  The value of BYTE-SIZE is an integer.  For details on the
  2534.    ramifications of BYTE-SIZE:  See the section "NFILE OPEN Optional
  2535.    Keyword/Value Pairs", section 8.20.1.  This parameter is only
  2536.    meaningful for BINARY openings.  However, if FILEPOS is returned in
  2537.    the other-properties list, BYTE-SIZE should also be included, even
  2538.    for character openings.
  2539.  
  2540.    CREATION-DATE
  2541.  
  2542.    The creation date of the file.  The date is expressed in Universal
  2543.    Time format, which measures a time as the number of seconds since
  2544.    January 1, 1900, at midnight GMT.  Creation date does not necessarily
  2545.    mean the time the file system created the directory entry or records
  2546.    of the file.  For systems that support modification or appending to
  2547.    files, it is usually the modification date of the file.  Creation
  2548.    date can mean the date that the bit count or byte count of the file
  2549.    was set by an application program.
  2550.  
  2551.    Some types of file systems support a user-settable quantity
  2552.    (CREATION-DATE) which the user can set to an arbitrary time, to
  2553.    indicate that the contents of this file were written a long time ago
  2554.    by someone else on another computer.  The default value of this
  2555.    quantity, if the user has not set it, is the time someone last
  2556.    modified the information in the file.  This quantity, in the OPEN
  2557.    response for an output file, is disregarded by the user side, but
  2558.    nevertheless must be present.
  2559.  
  2560.    The Symbolics computer system software uses this quantity as a unique
  2561.    identifier of file contents, for a given file name, type, and
  2562.    version, to prove that a file has not changed since it last recorded
  2563.    this quantity for a file.
  2564.  
  2565.    FILEPOS
  2566.  
  2567.    An integer giving the position of the logical file pointer, in
  2568.    characters or bytes as appropriate for the type of opening.  This is
  2569.    always zero for an input opening and for an output opening creating a
  2570.    new file.  For an output opening appending to an existing file,
  2571.    FILEPOS is the number of characters or bytes, as appropriate,
  2572.    currently in the file.  This number, for character openings, is
  2573.    measured in server units: See the section "NFILE Character Set",
  2574.    section 6.
  2575.  
  2576.  
  2577.  
  2578. Greenberg & Keene                                              [Page 46]
  2579.  
  2580. RFC 1037             NFILE - A File Access Protocol        December 1987
  2581.  
  2582.  
  2583.    LENGTH
  2584.  
  2585.    An integer reporting the length of the file, in characters for
  2586.    character openings and in bytes of the agreed-upon size for binary
  2587.    openings.  LENGTH should be reported as zero for output openings,
  2588.    even if appending to an existing file.  The server usually only knows
  2589.    the length for a character opening in server units; thus, it reports
  2590.    length in server units.
  2591.  
  2592. 8.21  PROPERTIES Command
  2593.  
  2594.    Command:  (PROPERTIES tid handle pathname control-keywords
  2595.    properties)
  2596.  
  2597.    Response: (PROPERTIES tid property-element settable-properties)
  2598.  
  2599.    PROPERTIES requests the property information about one file.  The
  2600.    file is identified by the pathname argument or the handle argument,
  2601.    but not both.  If pathname is supplied, it is a string in the full
  2602.    pathname syntax of the server host.  See the section "Syntax of File
  2603.    and Directory Pathname Arguments", section 7.4.
  2604.  
  2605.    If handle is supplied, its value is a string identifying an opening,
  2606.    which implicitly identifies a file.  For direct access mode openings,
  2607.    handle must be a direct file identifier.
  2608.  
  2609.    control-keywords is reserved in the current design.  However, it is a
  2610.    required argument, and must be supplied as the empty token list.  Its
  2611.    presence in the NFILE specification allows for future expansion.  In
  2612.    the future the value of control-keywords might affect the listing
  2613.    mode.
  2614.  
  2615.    properties is a token list of keywords indicating the properties the
  2616.    user wants returned.  (In command arguments, properties cannot be
  2617.    specified with integers, such as indices into the Property Index
  2618.    Table).  For a list of keywords associated with file properties:  See
  2619.    the section "Format of NFILE File Property/Value Pairs", section 7.5.
  2620.  
  2621.    The server is always free to return more properties than those
  2622.    requested in the properties argument.  If properties is supplied as
  2623.    the empty token list, the server transmits all known properties of
  2624.    the file.
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634. Greenberg & Keene                                              [Page 47]
  2635.  
  2636. RFC 1037             NFILE - A File Access Protocol        December 1987
  2637.  
  2638.  
  2639.    PROPERTIES COMMAND RESPONSE
  2640.  
  2641.    The server returns the property information for the given file in the
  2642.    command response.  The PROPERTIES command does not use any data
  2643.    channels.  If the specified file does not exist or is not accessible,
  2644.    the server signals an error and includes an appropriate three-letter
  2645.    error code in the command error response.  See the section "NFILE
  2646.    Errors and Notifications", section 10.
  2647.  
  2648.    The return value property-element is a token list.  The first element
  2649.    in that token list is the pathname of the file, in the full pathname
  2650.    syntax of the server host.  The following elements of the property-
  2651.    element token list are property/value pairs.  The server is expected
  2652.    to return several property/value pairs; the number of pairs is not
  2653.    constrained.  For further details on file properties and their
  2654.    associated values:  See the section "Format of NFILE File
  2655.    Property/Value Pairs", section 7.5.
  2656.  
  2657.    The return value settable-properties is a token list of keywords.
  2658.    The number of keywords is not constrained.  (Note that integers
  2659.    cannot be used in settable-properties to indicate the file property;
  2660.    keywords are to be used instead.)  Each keyword supplied in
  2661.    settable-properties identifies a property considered settable by the
  2662.    server.  The server is implicitly guaranteeing a mechanism for
  2663.    changing the properties reported as settable.  The user can change
  2664.    any of the settable properties for this file by using the CHANGE-
  2665.    PROPERTIES command.  See the section "CHANGE-PROPERTIES Command",
  2666.    section 8.2.
  2667.  
  2668.    The following example shows the format of the PROPERTIES command
  2669.    response.  Remember that the number of property/value pairs and
  2670.    keywords is not constrained; this example has two property/value
  2671.    pairs and three settable-properties keywords returned:
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690. Greenberg & Keene                                              [Page 48]
  2691.  
  2692. RFC 1037             NFILE - A File Access Protocol        December 1987
  2693.  
  2694.  
  2695.              TOP-LEVEL-LIST-BEGIN
  2696.              PROPERTIES         - name of the command
  2697.              tid                - transaction identifier
  2698.              LIST-BEGIN
  2699.              pathname of file
  2700.              prop1 value1       - file's property/value pairs
  2701.              prop2 value2
  2702.              LIST-END
  2703.              LIST-BEGIN
  2704.              keyword-1          - file's settable properties
  2705.              keyword-2
  2706.              keyword-3
  2707.              LIST-END
  2708.              TOP-LEVEL-LIST-END
  2709.  
  2710.    The following example is designed to better show the structure of the
  2711.    top-level token list by depicting TOP-LEVEL-LIST-BEGIN and TOP-
  2712.    LEVEL-LIST-END by parentheses and LIST-BEGIN and LIST-END by square
  2713.    brackets.  The indentation and newlines in the example are not part
  2714.    of the token list, but are used here to make the structure of the
  2715.    token list clear.
  2716.  
  2717.              (PROPERTIES tid [ pathname prop1 value1 prop2 value2 ...]
  2718.                              [ keyword1 keyword2 keyword3 ... ]
  2719.  
  2720. 8.22  READ Command
  2721.  
  2722.    Command: (READ tid direct-file-id input-handle count FILEPOS)
  2723.  
  2724.    Response: (READ tid)
  2725.  
  2726.    READ requests input data flow for direct access openings.  The
  2727.    direct-file-id is the same as the DIRECT-FILE-ID argument that was
  2728.    given when opening the file; it designates the opening from which the
  2729.    characters or bytes are to be transferred.  The input-handle
  2730.    specifies which data channel should be used for the transfer of data
  2731.    from server to user.  The data channel should have been already
  2732.    established, cannot have been disestablished, and must not currently
  2733.    be in use.
  2734.  
  2735.    count is an integer specifying how many bytes (or NFILE characters,
  2736.    as appropriate) to read.  count can be supplied as the empty token
  2737.    list, meaning read to the end of the file.  If the user specifies the
  2738.    empty token list or a count greater than the number of bytes
  2739.    remaining in the file, the server sends the keyword EOF to mark the
  2740.    end of the file.
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746. Greenberg & Keene                                              [Page 49]
  2747.  
  2748. RFC 1037             NFILE - A File Access Protocol        December 1987
  2749.  
  2750.  
  2751.    FILEPOS is an optional keyword/value pair.  If the keyword FILEPOS is
  2752.    supplied, it must be followed by an integer.  Before data is
  2753.    transferred, the opening is positioned to the point specified by the
  2754.    value of FILEPOS.  The position of the point is measured in server
  2755.    units for character openings; for binary openings it is measured in
  2756.    binary bytes.  See the section "FILEPOS NFILE Command".
  2757.  
  2758.    Upon receiving the READ command, the server binds the data channel to
  2759.    the opening and immediately begins transferring data.  The server
  2760.    stops when all data has been transferred.  After the server sends the
  2761.    last requested byte, it unbinds the data channel, freeing it for
  2762.    other use.  When the user side has processed the last byte, the user
  2763.    side assumes that the data channel can now be reused for another data
  2764.    transfer.
  2765.  
  2766. 8.23  RENAME Command
  2767.  
  2768.    Command:  (RENAME tid handle pathname to-pathname)
  2769.  
  2770.    Response: (RENAME tid from-pathname to-pathname)
  2771.  
  2772.    RENAME requests the server to give a file a new name.  This is
  2773.    NFILE's interface to the system's native rename operation, with all
  2774.    of its system-specific semantics and constraints.
  2775.  
  2776.    Either a handle or a pathname (but not both) specifies the file that
  2777.    is to receive a new name.  The argument to-pathname designates that
  2778.    new name.  The return value from-pathname gives the full original
  2779.    name of the file, and to-pathname gives the full new name of the
  2780.    file.  For systems that support version numbers, the return values
  2781.    can differ in version number from the values of the arguments given
  2782.    to RENAME.
  2783.  
  2784.    The arguments pathname and to-pathname and the return values from-
  2785.    pathname and to-pathname are strings in the full pathname syntax of
  2786.    the server host.  See the section "Syntax of File and Directory
  2787.    Pathname Arguments", section 7.4.
  2788.  
  2789.    If the file to be renamed is specified by a pathname, the file should
  2790.    be renamed immediately.  If the file is specified by handle, it is
  2791.    acceptable to wait until close-time to rename the file.
  2792.  
  2793.    Some operating systems can rename only within a directory.
  2794.    Nevertheless, the to-pathname of the RENAME must be fully specified;
  2795.    the server on these systems must check for and reject an attempted
  2796.    cross-directory rename.
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802. Greenberg & Keene                                              [Page 50]
  2803.  
  2804. RFC 1037             NFILE - A File Access Protocol        December 1987
  2805.  
  2806.  
  2807. 8.24  RESYNCHRONIZE-DATA-CHANNEL Command
  2808.  
  2809.    The command and response format for this command varies, depending on
  2810.    whether the handle argument indicates an input or output data
  2811.    channel.
  2812.  
  2813.    For an Input Handle:
  2814.  
  2815.    Command:  (RESYNCHRONIZE-DATA-CHANNEL tid handle)
  2816.  
  2817.    Response: (RESYNCHRONIZE-DATA-CHANNEL tid identifier)
  2818.  
  2819.    For an Output Handle:
  2820.  
  2821.    Command:  (RESYNCHRONIZE-DATA-CHANNEL tid handle identifier)
  2822.  
  2823.    Response: (RESYNCHRONIZE-DATA-CHANNEL tid)
  2824.  
  2825.    RESYNCHRONIZE-DATA-CHANNEL begins a prescribed procedure between user
  2826.    and server over the unsafe data channel specified by handle.  The
  2827.    resynchronization procedure clears the data channel of any unwanted
  2828.    data, and restores the data channel to a safe state, ready to
  2829.    transfer data again.
  2830.  
  2831.    All arguments to RESYNCHRONIZE-DATA-CHANNEL are required.
  2832.  
  2833.    For a detailed description of how the user and server coordinate the
  2834.    resynchronization of data channels:  See the section "NFILE Data
  2835.    Connection Resynchronization", section 9.2.
  2836.  
  2837. 8.24.1  Implementation Hints for RESYNCHRONIZE-DATA-CHANNEL Command
  2838.  
  2839.    In general, both the user and server should should be implemented
  2840.    with the knowledge that a transmission can be aborted.  That is, the
  2841.    receiving side must be careful not to act upon a transmission (that
  2842.    is, to perform any action or side effect) until the transmission has
  2843.    been successfully received in entirety.  This protects the user
  2844.    program from the possibility that an abort can occur after a
  2845.    transmission has been partially sent.
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858. Greenberg & Keene                                              [Page 51]
  2859.  
  2860. RFC 1037             NFILE - A File Access Protocol        December 1987
  2861.  
  2862.  
  2863.    RESYNCHRONIZING AN OUTPUT DATA CHANNEL
  2864.  
  2865.    The server will probably want to dispatch the looping and reading to
  2866.    the logical data process.  Looping reading for the resynchronization
  2867.    identifier in the control connection handler is not a viable option.
  2868.    If the user side fails to send the resynchronization identifier (for
  2869.    example, due to a user abort) the control connection handler can
  2870.    never be broken out of this loop.
  2871.  
  2872.    Should the user side send the control connection handler command
  2873.    first, or send the marks and identifiers first?
  2874.  
  2875.    Sending the marks first is problematic, because the data channel at
  2876.    the other end might not be reading them (for it has not yet been so
  2877.    instructed by the control connection handler).  The user might then
  2878.    become blocked for output, thus prohibiting sending of the
  2879.    RESYNCHRONIZE-DATA-CHANNEL command.
  2880.  
  2881.    On the other hand, sending the control connection handler command
  2882.    first requires that the user side can send the marks and identifiers
  2883.    between sending the control connection handler command and receiving
  2884.    a response for it.  The response will never come until the marks and
  2885.    identifiers have been successfully received.  The user implementation
  2886.    must allow for this one case of a command where a subroutine that
  2887.    "sends a command and waits for a response" is inapplicable.
  2888.  
  2889.    RESYNCHRONIZING AN INPUT DATA CHANNEL
  2890.  
  2891.    The server control process should dispatch the data process to send
  2892.    the mark, and not wait, lest the data process become blocked for
  2893.    output due to a user abort.  The control process must go back to its
  2894.    command loop, to possibly receive a command that might break the data
  2895.    process out of that block.
  2896.  
  2897. 8.25  UNDATA-CONNECTION Command
  2898.  
  2899.    Command:  (UNDATA-CONNECTION tid input-handle output-handle)
  2900.  
  2901.    Response: (UNDATA-CONNECTION tid)
  2902.  
  2903.    UNDATA-CONNECTION explicitly disestablishes a data connection from
  2904.    the user side.  The user side has the option of disestablishing data
  2905.    connections at its discretion.  There is no place in the protocol
  2906.    where disestablishment of data connections is required, other than at
  2907.    the end of the session, where it is implicit.
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914. Greenberg & Keene                                              [Page 52]
  2915.  
  2916. RFC 1037             NFILE - A File Access Protocol        December 1987
  2917.  
  2918.  
  2919.    The data connection to be disestablished is the one designated by the
  2920.    input-handle and output-handle arguments.  These two handles must
  2921.    refer to the same data connection.
  2922.  
  2923.    It is not permitted to explicitly disestablish a data connection
  2924.    either of whose channels is active.  If the session is terminated by
  2925.    the breaking of the control connection, all file handles become
  2926.    meaningless, and the server must close all data connections known to
  2927.    it and close-abort all files opened on behalf of the user during the
  2928.    dialogue.
  2929.  
  2930.    In the Symbolics implementation, the user side disestablishes data
  2931.    connections that have not been used for a long time, such as twenty
  2932.    minutes or so.
  2933.  
  2934.    For more information about data connections:  See the section "NFILE
  2935.    Control and Data Connections", section 4.
  2936.  
  2937. 9.  NFILE RESYNCHRONIZATION PROCEDURE
  2938.  
  2939.    Ordinarily, the user side sends NFILE commands to the server side
  2940.    over the control connection; the server side responds to every user
  2941.    command, and file data is transmitted over the data channels.  This
  2942.    section describes a resynchronization procedure that takes place when
  2943.    something disturbs the usual course of events.
  2944.  
  2945.    First, if the server side aborts while sending or receiving data,
  2946.    nothing can be done to salvage the connection between the two hosts.
  2947.    The control connection and any data channels associated with this
  2948.    connection are broken.  This happens rarely, if at all.
  2949.  
  2950.    It is not unusual for the user side to abort file operations, either
  2951.    commands or data transfer.  On a Symbolics computer, the user can do
  2952.    this by pressing CONTROL-ABORT.  An important aspect of any file
  2953.    protocol is the way it handles the situation when the user side
  2954.    aborts file operations.
  2955.  
  2956.    An NFILE user side reacts to user side aborts by immediately marking
  2957.    the connection unsafe.  When a control connection is unsafe, it must
  2958.    be resynchronized before it can be used again.  Data channels can
  2959.    also be marked unsafe, and must also be resynchronized before further
  2960.    use.  The resynchronization process rids the connection (whether
  2961.    control or data connection) of bytes of data that are now unwanted,
  2962.    and thus cleans up the channel so it can be used again.
  2963.  
  2964.    The resynchronization procedure is somewhat complex, but it fulfills
  2965.    a genuine need.  For those interested, a brief design discussion is
  2966.    included as note <3>.
  2967.  
  2968.  
  2969.  
  2970. Greenberg & Keene                                              [Page 53]
  2971.  
  2972. RFC 1037             NFILE - A File Access Protocol        December 1987
  2973.  
  2974.  
  2975. 9.1  NFILE Control Connection Resynchronization
  2976.  
  2977.    NFILE requires any unsafe control connection to undergo a
  2978.    resynchronization procedure before further use.  Therefore, the
  2979.    resynchronization does not necessarily occur immediately after the
  2980.    control connection is marked unsafe.  The user side initiates the
  2981.    control connection resynchronization when another operation on the
  2982.    control connection is attempted.
  2983.  
  2984.    A "mark" is defined in the context of Byte Stream with Mark:  See the
  2985.    section "Discussion of Byte Stream with Mark", section 12.1.
  2986.  
  2987.    USER SIDE STEPS:  CONTROL CONNECTION RESYNCHRONIZATION
  2988.  
  2989.        1. The user side sends a mark over the control connection to
  2990.           the server.
  2991.  
  2992.        2. The user side sends the ASCII characters USER-RESYNC-DUMMY
  2993.           (as a data token) to the server.
  2994.  
  2995.        3. The user side sends a second mark to the server.
  2996.  
  2997.        4. The user side declares the control connection safe (at the
  2998.           token list level).
  2999.  
  3000.        5. The user side generates and sends a unique data token to
  3001.           the server.
  3002.  
  3003.        6. The user side then waits, expecting to detect a mark
  3004.           followed by the unique data token.  The user side reads and
  3005.           discards all tokens and marks until the desired match is
  3006.           found.
  3007.  
  3008.    Once the user side detects the mark and unique data token, the
  3009.    control connection has been fully resynchronized, and can be used
  3010.    again.
  3011.  
  3012.  
  3013.    SERVER SIDE STEPS:  CONTROL CONNECTION RESYNCHRONIZATION
  3014.  
  3015.         1. The server side detects a mark.  The server is thus alerted
  3016.            that the control connection is unsafe, and that
  3017.            resynchronization is in progress.
  3018.  
  3019.         2. The server continues to read data coming from the user side
  3020.            until it detects the second mark, and the token following
  3021.            it.
  3022.  
  3023.  
  3024.  
  3025.  
  3026. Greenberg & Keene                                              [Page 54]
  3027.  
  3028. RFC 1037             NFILE - A File Access Protocol        December 1987
  3029.  
  3030.  
  3031.         3. The server checks to see if the token following the mark is
  3032.            USER-RESYNC-DUMMY.  This rare situation occurs if the user
  3033.            aborts during the course of the resynchronization itself.
  3034.            If so, the server side discards the USER-RESYNC-DUMMY
  3035.            token.  The control connection is still unsafe, and the
  3036.            user side restarts the resynchronization procedure; the
  3037.            server side therefore begins at Step 2 again.
  3038.  
  3039.         4. If the token following the mark is not USER-RESYNC-DUMMY
  3040.            (this is the expected circumstance), the server should have
  3041.            received a single data token that is the unique data token
  3042.            generated by the user side.
  3043.  
  3044.                a. The server sends a mark to the user side.
  3045.  
  3046.                b. The server declares the control connection safe (at
  3047.                   the token list level).
  3048.  
  3049.                c. The server sends the unique data token to the user
  3050.                   side.
  3051.  
  3052.         5. If the server detects something following the mark that was
  3053.            neither USER-RESYNC-DUMMY nor a single data token, a
  3054.            protocol error has occurred.
  3055.  
  3056. 9.2  NFILE Data Connection Resynchronization
  3057.  
  3058.    The NFILE data channel resynchronization procedure is similar to the
  3059.    NFILE control connection resynchronization.  Both procedures are
  3060.    based on a mark signalling the unsafe condition, then a second mark
  3061.    followed by a unique identifier.  One important difference between
  3062.    the two procedures is the circumstances in which they occur.  Control
  3063.    connections are put into unsafe states only when the user aborts
  3064.    during control connection I/O operations.  Data channels are made
  3065.    unsafe by a larger set of circumstances:
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082. Greenberg & Keene                                              [Page 55]
  3083.  
  3084. RFC 1037             NFILE - A File Access Protocol        December 1987
  3085.  
  3086.  
  3087.        - User aborts occur during the file protocol operations that
  3088.          assign and deassign data channels.  This is the most common
  3089.          cause of data channels becoming unsafe.
  3090.  
  3091.        - A server receives a CLOSE command (with abort-p supplied as
  3092.          Boolean truth) specifying an open file that has not finished
  3093.          transmitting data.  That is, file reading is aborted.
  3094.  
  3095.        - The ABORT command is issued, causing data channels to be
  3096.          made unsafe.
  3097.  
  3098.        - The FILEPOS command is issued, causing the input data
  3099.          channel to become unsafe.
  3100.  
  3101.    The resynchronization clears the data channel of unwanted data from
  3102.    aborted operations and puts the data channel in a known state.  The
  3103.    data channel resynchronization procedure is invoked when the user
  3104.    side gives the RESYNCHRONIZE-DATA-CHANNEL command over the control
  3105.    connection.
  3106.  
  3107.    The following policies can be used to improve response time, but are
  3108.    not required by the NFILE protocol:  The user side can initiate
  3109.    resynchronization only if it needs the data channel, having first
  3110.    tried to use a free data channel that does not require
  3111.    resynchronization.  Also, the user side can periodically
  3112.    resynchronize all unsafe data channels.
  3113.  
  3114.    In giving the RESYNCHRONIZE-DATA-CHANNEL command, the user side
  3115.    indicates which data channel should be resynchronized.  Data channels
  3116.    are unidirectional, which means that depending on the direction
  3117.    (either input or output) of the data channel, either the user side or
  3118.    the server side sends the resynchronization data.  This is another
  3119.    difference from the resynchronization of the control connection, in
  3120.    which the resynchronization data is always sent by the user side.
  3121.    The resynchronization steps for input data channels are different
  3122.    than the steps for output data channels.
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138. Greenberg & Keene                                              [Page 56]
  3139.  
  3140. RFC 1037             NFILE - A File Access Protocol        December 1987
  3141.  
  3142.  
  3143.    INPUT DATA CHANNEL RESYNCHRONIZATION
  3144.  
  3145.       1. The user side gives the RESYNCHRONIZE-DATA-CHANNEL command
  3146.          on the control connection, with only one argument, the
  3147.          handle of the data channel to be resynchronized.
  3148.  
  3149.       2. The server side of the data channel generates a unique
  3150.          identifier, and sends that data token in its regular
  3151.          command response to the user side.
  3152.  
  3153.       3. The server side sends a mark over the data channel.
  3154.  
  3155.       4. The server side sends the unique identifier token over the
  3156.          data channel.
  3157.  
  3158.       5. The user side reads until it detects a mark followed by the
  3159.          unique identifier token.  The resynchronization is then
  3160.          complete.  The data channel is no longer in an unsafe
  3161.          state.
  3162.  
  3163.    OUTPUT DATA CHANNEL RESYNCHRONIZATION
  3164.  
  3165.       1. The user side gives the RESYNCHRONIZE-DATA-CHANNEL command
  3166.          on the control connection, with two arguments: the handle
  3167.          of the data channel to be resynchronized, and a unique
  3168.          identifier that it has just generated.
  3169.  
  3170.       2. The user side of the data channel sends a mark.
  3171.  
  3172.       3. The user side of the data channel sends a dummy identifier
  3173.          token.  The dummy identifier can be any token that the
  3174.          server could not interpret as being the unique identifier.
  3175.          One suggestion is the data token DUMMY-IDENTIFIER.
  3176.  
  3177.       4. The server side of the data channel was alerted by the
  3178.          RESYNCHRONIZE-DATA-CHANNEL command that resynchronization
  3179.          is in progress.  The server side now reads the data,
  3180.          seeking the first mark.
  3181.  
  3182.       5. The server side reads and discards the first mark and the
  3183.          dummy identifier.
  3184.  
  3185.       6. The user side sends a second mark.
  3186.  
  3187.       7. The user side sends the unique identifier.
  3188.  
  3189.       8. The server side recognizes the mark and the unique
  3190.          identifier that follows, and the resynchronization is
  3191.  
  3192.  
  3193.  
  3194. Greenberg & Keene                                              [Page 57]
  3195.  
  3196. RFC 1037             NFILE - A File Access Protocol        December 1987
  3197.  
  3198.  
  3199.          complete.  The data channel is no longer in the unsafe
  3200.          state.
  3201.  
  3202. 10.  NFILE ERRORS AND NOTIFICATIONS
  3203.  
  3204.    NFILE recognizes two types of errors:  command response errors and
  3205.    asynchronous errors.  In addition to errors, NFILE supports
  3206.    notifications.
  3207.  
  3208.    Command response errors:
  3209.  
  3210.        - Signify an error that prevented the successful completion of
  3211.          the command; when such an error occurs, a command response
  3212.          error is sent instead of a normal command response.
  3213.        - Occur frequently in normal operations
  3214.  
  3215.    Asynchronous errors:
  3216.  
  3217.        - Are not related to any specific command
  3218.        - Are associated with an erring data channel
  3219.        - Typically indicate a problem in the transfer, such as
  3220.          running out of disk space or allocation, or an unreadable
  3221.          disk record
  3222.        - Occur rarely in normal operations
  3223.  
  3224.    Notifications:
  3225.  
  3226.        - Are not associated with an error
  3227.        - Are sent at the server's discretion
  3228.        - Provide general information, such as a warning that the
  3229.          system is going down
  3230.  
  3231. 10.1  Notifications From the NFILE Server
  3232.  
  3233.    The NFILE server can send asynchronous notifications to the user side
  3234.    over the control connection.  The text of the notification contains
  3235.    information of interest to the person using NFILE, such as a warning
  3236.    that the server's operating system will be going down soon.
  3237.    Notifications can come from the server side at any time that the
  3238.    server is not sending something else.
  3239.  
  3240.    The format of NFILE notifications is:
  3241.  
  3242.              (NOTIFICATION "" text)
  3243.  
  3244.    The empty string "" takes the place of a transaction identifier.
  3245.    Notifications are initiated by the server, and are not associated
  3246.    with any transaction originated by the user side.n
  3247.  
  3248.  
  3249.  
  3250. Greenberg & Keene                                              [Page 58]
  3251.  
  3252. RFC 1037             NFILE - A File Access Protocol        December 1987
  3253.  
  3254.  
  3255. 10.2  NFILE Command Response Errors
  3256.  
  3257.    When an error prevents the successful completion of an NFILE command,
  3258.    a command response error is sent instead of the normal command
  3259.    response.  A normal command response indicates success; a command
  3260.    response error indicates failure of the command.
  3261.  
  3262.    NFILE command response errors are sent from the server to the user
  3263.    across the control connection as top-level token lists, in this
  3264.    format:
  3265.  
  3266.              (ERROR tid three-letter-code error-vars message)
  3267.  
  3268.    ERROR is a keyword.  The tid is the transaction identifier of the
  3269.    command that encountered this error.  The arguments three-letter-
  3270.    code, error-vars, and message are all required.
  3271.  
  3272.    The three-letter-code provides the information on what kind of an
  3273.    error was encountered.  For a table of the three-letter codes and
  3274.    their meanings:  See the section "NFILE Three-letter Error Codes",
  3275.    section 10.4.
  3276.  
  3277.    message is a string that is displayed to the human user of the
  3278.    protocol.
  3279.  
  3280.    error-vars is a keyword/value list.  The three possible keywords are:
  3281.    PATHNAME, OPERATION, and NEW-PATHNAME.  Before transmitting an error,
  3282.    the server looks at the type of error to see if it can easily
  3283.    determine the value of any of the keywords.  If so, the server
  3284.    includes the keyword/value pair in its error.  If not, the
  3285.    keyword/value pair is omitted.  The value associated with OPERATION
  3286.    is the keyword naming the NFILE command that failed.  The values
  3287.    associated with PATHNAME and NEW-PATHNAME are strings in the full
  3288.    pathname syntax of the server host.
  3289.  
  3290.    For example, suppose the server on a file system with hierarchical
  3291.    directories could not access a file because its containing directory
  3292.    did not exist.  The command error response would use the PATHNAME
  3293.    keyword to indicate the first directory level that did not exist,
  3294.    instead of the full pathname which was supplied as the command
  3295.    argument.  This gives the user side valuable information that it
  3296.    otherwise would not have known.
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306. Greenberg & Keene                                              [Page 59]
  3307.  
  3308. RFC 1037             NFILE - A File Access Protocol        December 1987
  3309.  
  3310.  
  3311. 10.3  NFILE Asynchronous Errors
  3312.  
  3313.    When a data channel process, in either direction, encounters an error
  3314.    condition, the server sends an asynchronous error description. An
  3315.    asynchronous error description consists of a top-level token list.
  3316.    Typically, asynchronous errors indicate error conditions in the
  3317.    transfer, such as running out of disk space or allocation, or a
  3318.    unreadable disk record.
  3319.  
  3320.    The format of asynchronous error descriptions is:
  3321.  
  3322.          (ASYNC-ERROR handle three-letter-code error-vars message)
  3323.  
  3324.    ASYNC-ERROR is a keyword.  The handle argument identifies the erring
  3325.    data channel.  The arguments three-letter-code, error-vars, and
  3326.    message are all required.  Their meanings are the same as in NFILE
  3327.    command error responses: See the section "NFILE Command Response
  3328.    Errors", section 10.2.
  3329.  
  3330.    When the server detects an asynchronous error on an input data
  3331.    channel, the server sends an asynchronous error description on that
  3332.    data channel itself.  When an asynchronous error occurs on an output
  3333.    data channel, the asynchronous error description is sent on the
  3334.    control connection.
  3335.  
  3336.    Some asynchronous errors are restartable.  In this context,
  3337.    restartable means it makes sense to try to resume the operation.  One
  3338.    example of a restartable error is an attempt to write a file to a
  3339.    file system that is out of room.  The server side indicates whether
  3340.    an asynchronous error is restartable by prepending the keyword
  3341.    RESTARTABLE and the associated value Boolean truth to the error-vars
  3342.    list.  To proceed from a restartable error, the user side sends a
  3343.    CONTINUE command over the control connection.
  3344.  
  3345.    On any asynchronous error, either input or output, the data channel
  3346.    on the server side enters an "asynchronous error outstanding" state.
  3347.    The server can exit that state in one of two ways:  by receiving a
  3348.    CONTINUE command or a CLOSE command with the abort-p argument
  3349.    supplied as Boolean truth.
  3350.  
  3351.    On a normal CLOSE (not a close-abort), the server side checks the
  3352.    channel it was requested to close.  If an asynchronous error
  3353.    description has been sent on the data channel, but not yet processed
  3354.    by CONTINUE, the server side does not close the channel, but sends a
  3355.    command error response.  The same thing happens on a FINISH command
  3356.    received on a channel that has an asynchronous error pending.  In
  3357.    both cases, the three-letter code included in the command error
  3358.    response is EPC, for Error Pending on Channel.
  3359.  
  3360.  
  3361.  
  3362. Greenberg & Keene                                              [Page 60]
  3363.  
  3364. RFC 1037             NFILE - A File Access Protocol        December 1987
  3365.  
  3366.  
  3367. 10.4  NFILE Three-letter Error Codes
  3368.  
  3369.    Usually the server's operating system provides some description of an
  3370.    error that occurs.  NFILE has a mechanism for conveying that
  3371.    information to the user side.  Upon detecting an error, the NFILE
  3372.    server should characterize the error by choosing the three-letter
  3373.    code that best describes the error.  The three-letter code is an
  3374.    argument in both the command response error and asynchronous error
  3375.    messages from the server to the user.
  3376.  
  3377.    Each of the NFILE three-letter codes represents some system error.
  3378.    The set of codes enables all operating systems to use one error-
  3379.    reporting mechanism.  Some operating systems will never encounter
  3380.    certain of the error conditions.
  3381.  
  3382.    Some errors fit logically into two error codes.  For example, suppose
  3383.    the server could not delete a file because the file was not found.
  3384.    This error could be considered either CDF (Cannot Delete File) or FNF
  3385.    (File Not Found).  In this case, File Not Found gives more specific
  3386.    and valuable information than Cannot Delete File.  Since the protocol
  3387.    does not allow more than one error code to be reported when an error
  3388.    occurs, the server must choose the most appropriate error code, given
  3389.    the information available to it from the operating system.
  3390.  
  3391.    This is the set of three-letter codes:
  3392.  
  3393.      ACC   Access error.  This indicates a protection-violation error.
  3394.  
  3395.      ATD   Incorrect access to directory.  A directory could not be
  3396.            accessed because the user's access rights to it did not
  3397.            permit this type of access.
  3398.  
  3399.      ATF   Incorrect access to file.  A file could not be accessed
  3400.            because the user's access rights to it did not permit this
  3401.            type of access.
  3402.  
  3403.      BUG   File system bug.  This includes all protocol violations
  3404.            detected by the server, as well as by the host file system.
  3405.  
  3406.      CCD   Cannot create directory.  An error occurred in attempting to
  3407.            create a directory.
  3408.  
  3409.      CDF   Cannot delete file.  The file system reported that it cannot
  3410.            delete a file.
  3411.  
  3412.      CCL   Cannot create link.  An error occurred in attempting to
  3413.            create a link.
  3414.  
  3415.  
  3416.  
  3417.  
  3418. Greenberg & Keene                                              [Page 61]
  3419.  
  3420. RFC 1037             NFILE - A File Access Protocol        December 1987
  3421.  
  3422.  
  3423.      CIR   Circular link.  An operation was attempted on a pathname that
  3424.            designates a link that eventually links back to itself.
  3425.  
  3426.      CRF   Cannot rename file.  An error occurred in attempting to
  3427.            rename a file.
  3428.  
  3429.      CSP   Cannot set property.  An error occurred in attempting to
  3430.            change the properties of a file.  This could mean that you
  3431.            tried to set a property that only the file system is allowed
  3432.            to set, or a property that is not defined on this type of
  3433.            file system.
  3434.  
  3435.      DAE   Directory already exists.  A directory could not be created
  3436.            because a directory or file of this name already exists.
  3437.  
  3438.      DAT   Data error.  The file system contains unreadable data.  This
  3439.            could mean data errors detected by hardware or inconsistent
  3440.            data inside the file system.
  3441.  
  3442.      DEV   Device not found.  The device of the file was not found or
  3443.            does not exist.
  3444.  
  3445.      DND   "Do Not Delete" flag set.  An attempt was made to delete a
  3446.            file that is marked by a "Do Not Delete" flag.
  3447.  
  3448.      DNE   Directory not empty.  An invalid deletion of a nonempty
  3449.            directory was attempted.
  3450.  
  3451.      DNF   Directory not found.  The directory was not found or does not
  3452.            exist.  This refers specifically to the containing directory;
  3453.            if you are trying to access a directory, and the actual
  3454.            directory you are trying to access is not found, FNF (for
  3455.            File Not Found) should be indicated instead.
  3456.  
  3457.      EPC   Error pending on channel.  The server cannot close the
  3458.            channel in attempting to close or finish the channel.
  3459.  
  3460.      FAE   File already exists.  The file could not be created because a
  3461.            file or directory of this name already exists.
  3462.  
  3463.      FNF   File not found.  The file was not found in the containing
  3464.            directory.  The TOPS-20 and TENEX "no such file type" and "no
  3465.            such file version" errors should also report this condition.
  3466.  
  3467.      FOO   File open for output.  Opening a file that was already opened
  3468.            for output was attempted.
  3469.  
  3470.      FOR   Filepos out of range.  Setting the file pointer past the
  3471.  
  3472.  
  3473.  
  3474. Greenberg & Keene                                              [Page 62]
  3475.  
  3476. RFC 1037             NFILE - A File Access Protocol        December 1987
  3477.  
  3478.  
  3479.            end-of-file position or to a negative position was attempted.
  3480.  
  3481.      FTB   File too big.  File is larger than the maximum file size
  3482.            supported by the file system.
  3483.  
  3484.      HNA    Host not available The file server or file system is
  3485.            intentionally denying service to user.  This does not mean
  3486.            that the network connection failed; it means that the file
  3487.            system is explicitly not available.
  3488.  
  3489.      IBS    Invalid byte size.  The value of the "byte size" option was
  3490.            not valid.
  3491.  
  3492.      ICO   Inconsistent options.  Some of the options given in this
  3493.            operation are inconsistent with others.
  3494.  
  3495.      IOD   Invalid operation for directory.  The specified operation is
  3496.            invalid for directories, and the given pathname specifies a
  3497.            directory, in directory pathname as file format.
  3498.  
  3499.      IOL   Invalid operation for link.  The specified operation is
  3500.            invalid for links, and this pathname is the name of a link.
  3501.  
  3502.      IP?   Invalid password.  The specified password was invalid.
  3503.  
  3504.      IPS   Invalid pathname syntax.  This includes all invalid pathname
  3505.            syntax errors.
  3506.  
  3507.      IPV   Invalid property value.  The new value provided for the
  3508.            property is invalid.
  3509.  
  3510.      IWC   Invalid wildcard.  The pathname is not a valid wildcard
  3511.            pathname.
  3512.  
  3513.      LCK   File locked.  The file is locked.  It cannot be accessed,
  3514.            possibly because it is in use by some other process.
  3515.  
  3516.      LIP   Login problems.  A problem was encountered while trying to
  3517.            log in to the file system.
  3518.  
  3519.      MSC   Miscellaneous problems.
  3520.  
  3521.      NAV   Not available.  The file or device exists but is not
  3522.            available.  Typically, the disk pack is not mounted on a
  3523.            drive, the drive is broken, or the like.  Operator
  3524.            intervention is probably required to fix the problem, but
  3525.            retrying the operation is likely to succeed after the problem
  3526.            is solved.
  3527.  
  3528.  
  3529.  
  3530. Greenberg & Keene                                              [Page 63]
  3531.  
  3532. RFC 1037             NFILE - A File Access Protocol        December 1987
  3533.  
  3534.  
  3535.      NER   Not enough resources.  For example, a system limit on the
  3536.            number of open files or network connections has been reached.
  3537.  
  3538.      NET   Network problem.  The file server had some sort of trouble
  3539.            trying to create a new data connection, or perform some other
  3540.            network operation, and was unable to do so.
  3541.  
  3542.      NFS   No file system.  The file system was not available.  For
  3543.            example, this host does not have any file systems, or this
  3544.            host's file system cannot be initialized or accessed for some
  3545.            reason, or the file system simply does not exist.
  3546.  
  3547.      NLI   Not logged in.  A file operation was attempted before logging
  3548.            in.  Normally the file system interface always logs in before
  3549.            doing any operation, but this problem can occur in certain
  3550.            unusual cases in which logging in has been aborted.
  3551.  
  3552.  
  3553.      NMR   No more room.  The file system is out of room.  This can mean
  3554.            any of several things:
  3555.  
  3556.                       - The entire file system is full.
  3557.                       - The particular volume involved is full.
  3558.                       - The particular directory involved is full.
  3559.                       - The user's allocated quota has been exceeded.
  3560.  
  3561.      RAD   Rename across directories.  The devices or directories of the
  3562.            initial and target pathnames are not the same, but on this
  3563.            file system they are required to be.
  3564.  
  3565.      REF   Rename to existing file.  The target name of a rename
  3566.            operation is the name of a file that already exists.
  3567.  
  3568.      UKC   Unknown operation. An unsupported file system operation was
  3569.            attempted, or an unsupported command was attempted.
  3570.  
  3571.      UKP   Unknown property.  The property is unknown.
  3572.  
  3573.      UNK   Unknown user.  The specified user name is unknown to this
  3574.            host.
  3575.  
  3576.      UUO   Unimplemented option.  An option to a command is not
  3577.            implemented.
  3578.  
  3579.      WKF   Wrong kind of file.  This includes errors in which an invalid
  3580.            operation for a file, directory, or link was attempted.
  3581.  
  3582.      WNA   Wildcard not allowed.
  3583.  
  3584.  
  3585.  
  3586. Greenberg & Keene                                              [Page 64]
  3587.  
  3588. RFC 1037             NFILE - A File Access Protocol        December 1987
  3589.  
  3590.  
  3591. 11.  TOKEN LIST TRANSPORT LAYER
  3592.  
  3593.    PURPOSE:  The Token List Transport Layer is a protocol that
  3594.    facilitates the transmission of simple structured data, such as
  3595.    lists.
  3596.  
  3597. 11.1  Introduction to the Token List Transport Layer
  3598.  
  3599.    The Token List Transport Layer is a general-purpose protocol.  The
  3600.    Token List Transport Layer sends "tokens" through its underlying
  3601.    stream.  Each token usually represents a simple quantity, such as a
  3602.    string or integer.
  3603.  
  3604.    Tokens can be organized into "token lists".  Special tokens are
  3605.    provided to denote the starting and ending point of lists.  The token
  3606.    list transport layer differentiates between "top-level token lists",
  3607.    which are not contained in other lists, and "embedded token lists",
  3608.    which are contained in other lists.  Using lists makes it convenient
  3609.    to send structured records, such as commands and command responses of
  3610.    the client protocol.  The top-level token lists provide robustness.
  3611.  
  3612.    The Token List Transport Layer is a general term that includes two
  3613.    separate but related subjects:  the "token list stream" and the
  3614.    "token list data stream".  The token list stream is commonly used for
  3615.    applications that can easily organize the information to be
  3616.    transmitted into tokens and lists.  The token list data stream is
  3617.    more appropriate for transmitting a large volume of data that cannot
  3618.    easily be structured into tokens and lists, such as file data, which
  3619.    is simply a sequence of characters or bytes.
  3620.  
  3621.    The following table illustrates the main differences between token
  3622.    list streams and token list data streams:
  3623.  
  3624.                      Token List Data Stream      Token List Stream
  3625.                      ----------------------      -----------------
  3626.  
  3627.      Built on:     token list stream           Byte Stream with Mark
  3628.  
  3629.      Transmits:    stream data                 tokens, token lists
  3630.  
  3631.      Example
  3632.      of use:       NFILE data channels         NFILE control
  3633.                                                connection
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642. Greenberg & Keene                                              [Page 65]
  3643.  
  3644. RFC 1037             NFILE - A File Access Protocol        December 1987
  3645.  
  3646.  
  3647.    NFILE uses the the Token List Transport Layer, and provides an
  3648.    excellent example of its usefulness.  The NFILE commands and command
  3649.    responses are sent over the control connection in a token list
  3650.    stream.  File data is sent across each data channel in a token list
  3651.    data stream.
  3652.  
  3653. 11.2  Token List Stream
  3654.  
  3655. 11.2.1  Types of Tokens and Token Lists
  3656.  
  3657.    All numbers in the token list documentation are represented in
  3658.    decimal notation.  Bytes are 8 bits long.
  3659.  
  3660.    TYPES OF TOKENS
  3661.  
  3662.    Tokens are of the following types:
  3663.  
  3664.             1. Atomic tokens.
  3665.  
  3666.                Atomic tokens are of the following subtypes:
  3667.  
  3668.               - Data tokens.  A data token consists of a sequence of
  3669.                 bytes with an effectively infinite maximum length.  In
  3670.                 some contexts a data token represents a string; in
  3671.                 other contexts, a data token is other arbitrary data.
  3672.  
  3673.                 Each data token is preceded in the token list stream
  3674.                 by a representation of its length in bytes.
  3675.  
  3676.                 Data tokens that are under 200 bytes long are preceded
  3677.                 by one byte containing their length in bytes.  That
  3678.                 is, a data token of 34 bytes is preceded by one byte
  3679.                 of value 34.
  3680.  
  3681.                 Data tokens 200 bytes or over are preceded by the byte
  3682.                 known as PUNCTUATION-LONG, of value 201.  After the
  3683.                 201 comes a four-byte-long number (least significant
  3684.                 byte first) containing the length of the data token
  3685.                 that follows.
  3686.  
  3687.               - Numeric tokens.  A sequence of bytes that represent
  3688.                 and encode a nonnegative binary integer.  The largest
  3689.                 valid integer is 2^63 - 1.
  3690.  
  3691.                 Numeric tokens are either short integers (less than
  3692.                 256) or long integers (greater than or equal to 256).
  3693.                 Short integers are preceded by the byte known as
  3694.                 PUNCTUATION-SHORT-INTEGER, of value 206.
  3695.  
  3696.  
  3697.  
  3698. Greenberg & Keene                                              [Page 66]
  3699.  
  3700. RFC 1037             NFILE - A File Access Protocol        December 1987
  3701.  
  3702.  
  3703.                 Long integers are begun by PUNCTUATION-LONG-INTEGER,
  3704.                 of value 207.  One byte follows, containing the length
  3705.                 (in bytes) of the long integer.  The integer itself is
  3706.                 next, least significant byte first.
  3707.  
  3708.               - Keyword tokens.  A sequence of bytes that represent
  3709.                 and encode a named identifier of the implemented
  3710.                 protocol.  Keyword tokens are used by the client
  3711.                 protocol to convey a name; the only significance of a
  3712.                 keyword token is in its name.
  3713.  
  3714.                 Each keyword is preceded by the byte known as
  3715.                 PUNCTUATION-KEYWORD, of value 208.  The data token
  3716.                 following PUNCTUATION-KEYWORD represents the name of
  3717.                 the keyword as a string.  The characters are in
  3718.                 upper-case standard ASCII.
  3719.  
  3720.               - Boolean truth.  A special token that represents the
  3721.                 Boolean truth value.  This token is known as
  3722.                 BOOLEAN-TRUTH, of value 209 <4>.
  3723.  
  3724.    2. Control tokens.
  3725.  
  3726.    The token list stream supports four control tokens to delimit token
  3727.    lists, and one padding token.
  3728.  
  3729.                TOP-LEVEL-LIST-BEGIN  202   This control token
  3730.                                            appears at the start of
  3731.                                            each top-level token list.
  3732.  
  3733.                TOP-LEVEL-LIST-END    203   This control token
  3734.                                            appears at the end of
  3735.                                            each top-level token list.
  3736.                LIST-BEGIN            204   This control token
  3737.                                            appears at the start of
  3738.                                            each embedded token list.
  3739.  
  3740.                LIST-END              205   This control token
  3741.                                            appears at the end of
  3742.                                            each embedded token list.
  3743.  
  3744.                PUNCTUATION-PAD       200   This padding token should
  3745.                                            be ignored by the token
  3746.                                            list stream.  It can be
  3747.                                            sent to fill buffers.
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754. Greenberg & Keene                                              [Page 67]
  3755.  
  3756. RFC 1037             NFILE - A File Access Protocol        December 1987
  3757.  
  3758.  
  3759.    TOKEN LISTS
  3760.  
  3761.    A token list consists of a sequence of atomic tokens or token lists.
  3762.    Token lists are begun and ended by control tokens that delimit the
  3763.    token lists.  There are three types of token lists:
  3764.  
  3765.          1. Top-level token lists.
  3766.  
  3767.             Top-level token lists begin with TOP-LEVEL-LIST-BEGIN and
  3768.             end with TOP-LEVEL-LIST-END.  Top-level token lists are not
  3769.             contained in other lists.
  3770.  
  3771.          2. Embedded token lists.
  3772.  
  3773.             These token lists occur inside other token lists.  They
  3774.             begin with LIST-BEGIN and end with LIST-END.
  3775.  
  3776.          3. The empty token list.
  3777.  
  3778.             This is a special example of the embedded token list.  In
  3779.             some contexts, the empty token list represents Boolean
  3780.             falsity.  An embedded empty token list is composed of a
  3781.             LIST-BEGIN followed immediately by a LIST-END.  A top-level
  3782.             empty token list is composed of TOP-LEVEL-LIST-BEGIN
  3783.             followed immediately by TOP-LEVEL-LIST-END.
  3784.  
  3785. 11.2.2  Token List Stream Example
  3786.  
  3787.    This section contains an example of some data that can appear on a
  3788.    token list stream.  The example is a top-level token list encoding an
  3789.    NFILE DELETE command.
  3790.  
  3791.    The DELETE command is composed of the following pieces:  a TOP-
  3792.    LEVEL-LIST-BEGIN, the keyword DELETE, a data token containing the
  3793.    transaction identifier, a LIST-BEGIN, a LIST-END, a data token
  3794.    containing a pathname of a file to be deleted, and a TOP-LEVEL-LIST-
  3795.    END.  This example uses t105 as the transaction identifier, and
  3796.    /usr/max/temp as the pathname.
  3797.  
  3798.    All numbers in this section are expressed in decimal notation.
  3799.  
  3800.    The pieces of the command are displayed here in order:
  3801.  
  3802.             1. TOP-LEVEL-LIST-BEGIN
  3803.             2. The keyword token whose name is DELETE
  3804.             3. The data token containing the characters:  t105
  3805.             4. LIST-BEGIN
  3806.             5. LIST-END
  3807.  
  3808.  
  3809.  
  3810. Greenberg & Keene                                              [Page 68]
  3811.  
  3812. RFC 1037             NFILE - A File Access Protocol        December 1987
  3813.  
  3814.  
  3815.             6. The data token containing the characters:  /usr/max/temp
  3816.             7. TOP-LEVEL-LIST-END
  3817.  
  3818.    Now, let's translate each piece of the command into the bytes that
  3819.    are transmitted through the token list stream.
  3820.  
  3821.         1. TOP-LEVEL-LIST-BEGIN
  3822.  
  3823.            202     represents TOP-LEVEL-LIST-BEGIN
  3824.  
  3825.         2. The keyword token whose name is DELETE.
  3826.  
  3827.            A keyword token is introduced by PUNCTUATION-KEYWORD, which
  3828.            is represented in the token list stream as the byte 208.
  3829.  
  3830.            A data token follows, containing the string "DELETE".  A
  3831.            data token under 200 bytes long is introduced by one byte
  3832.            containing its length in bytes.  The length of this data
  3833.            token is 6 bytes.
  3834.  
  3835.            The data token continues with the standard ASCII character
  3836.            set representation of each character in the string DELETE:
  3837.  
  3838.                208     represents PUNCTUATION-KEYWORD
  3839.                006     represents the length of this data token
  3840.                068     represents "D"
  3841.                069     represents "E"
  3842.                076     represents "L"
  3843.                069     represents "E"
  3844.                084     represents "T"
  3845.                069     represents "E"
  3846.  
  3847.         3. The data token containing the characters:  t105
  3848.  
  3849.            This data token is begun by its length in bytes (4), and
  3850.            continues with the NFILE character set representation of
  3851.            each character in the string:
  3852.  
  3853.                004     represents the length of this data token
  3854.                116     represents "t"
  3855.                049     represents "1"
  3856.                048     represents "0"
  3857.                053     represents "5"
  3858.  
  3859.         4. LIST-BEGIN
  3860.  
  3861.                204     represents LIST-BEGIN
  3862.  
  3863.  
  3864.  
  3865.  
  3866. Greenberg & Keene                                              [Page 69]
  3867.  
  3868. RFC 1037             NFILE - A File Access Protocol        December 1987
  3869.  
  3870.  
  3871.         5. LIST-END
  3872.  
  3873.                205     represents LIST-END
  3874.  
  3875.         6. The data token containing the characters:  /usr/max/temp
  3876.  
  3877.                013     represents length of this data token
  3878.                047     represents "/"
  3879.                117     represents "u"
  3880.                115     represents "s"
  3881.                114     represents "r"
  3882.                047     represents "/"
  3883.                109     represents "m"
  3884.                097     represents "a"
  3885.                120     represents "x"
  3886.                047     represents "/"
  3887.                116     represents "t"
  3888.                101     represents "e"
  3889.                109     represents "m"
  3890.                112     represents "p"
  3891.  
  3892.         7. TOP-LEVEL-LIST-END
  3893.  
  3894.                203     represents TOP-LEVEL-LIST-END
  3895.  
  3896. 11.2.3  Mapping of Lisp Objects to Token List Stream Representation
  3897.  
  3898.    The Symbolics interface to the token list stream sends Lisp objects
  3899.    through the underlying Byte Stream with Mark and produces Lisp
  3900.    objects on the other end.  Not all Lisp objects can be sent in this
  3901.    way.  For example, compound objects other than lists are not handled.
  3902.    An appropriate analogy is the sending and reconstruction of list
  3903.    structure via printed representation.  These are the types of objects
  3904.    that can be sent, and their representations:
  3905.  
  3906.         - Lisp strings are represented as data tokens in the NFILE
  3907.           character set.  Only 8-bit strings can be sent <5>.
  3908.  
  3909.         - Keyword symbols are represented as keyword tokens.  Although
  3910.           identifiable and reconstructable as keyword symbols, only
  3911.           their names are sent.  Any properties, bindings, and the
  3912.           like are not sent.
  3913.  
  3914.         - T is represented as BOOLEAN-TRUTH.
  3915.  
  3916.         - NIL is represented as the empty token list.
  3917.  
  3918.         - Lists are represented as token lists.  Circular lists cannot
  3919.  
  3920.  
  3921.  
  3922. Greenberg & Keene                                              [Page 70]
  3923.  
  3924. RFC 1037             NFILE - A File Access Protocol        December 1987
  3925.  
  3926.  
  3927.           be sent.  See the footnote related to the ambiguity between
  3928.  
  3929.           NIL and the empty list:  See the section "Types of Tokens
  3930.           and Token Lists", section 11.2.1.
  3931.  
  3932.         - Integers are represented as numeric tokens.  Only
  3933.           nonnegative integers less than 2^63 can be sent.
  3934.  
  3935. 11.2.4  Aborting and the Token List Stream
  3936.  
  3937.    A token list stream accrues the benefits of the abort management
  3938.    policy of the Byte Stream with Mark on which it is built.  In order
  3939.    to fully realize this benefit, some simple rules must be obeyed by
  3940.    any implementation of the token list stream.
  3941.  
  3942.    The term "transmission" means either an atomic token or a complete
  3943.    top-level token list. A transmission starts with the control token
  3944.    TOP-LEVEL-BEGIN and ends with TOP-LEVEL-END.  The top-level token
  3945.    list can contain embedded token lists.
  3946.  
  3947.    The interface that writes to the token list stream must be capable of
  3948.    writing the representation of entire transmissions.  When this
  3949.    interface is called, it must effectively lock the token list stream,
  3950.    and exclude access by other processes until the entire transmission
  3951.    has been encoded and sent.
  3952.  
  3953.    If the sending is aborted while the stream is locked, the stream
  3954.    enters an "unsafe" state.  Trying to send data while the stream is
  3955.    unsafe signals an error.  The application and the token list stream
  3956.    must send a mark to cause resynchronization, and allow the token list
  3957.    stream to be used again.  When the reading side encounters this mark,
  3958.    it resynchronizes itself according to whatever client protocol is in
  3959.    use.
  3960.  
  3961.    Similarly, the interface that reads from the token list stream must
  3962.    be capable of reading entire transmissions.  When this interface is
  3963.    called, it must lock the stream, excluding access by other processes
  3964.    until the entire transmission has been read.
  3965.  
  3966.    If the reading is aborted while the stream is locked, the stream
  3967.    enters an unsafe state.  The only exit from this unsafe state is by
  3968.    means of receiving a mark.  When the stream is unsafe, the only valid
  3969.    operation that can be performed upon it is "read and discard all
  3970.    tokens until a mark is encountered; read and discard that mark;
  3971.    declare the stream safe again".
  3972.  
  3973.  
  3974.  
  3975.  
  3976.  
  3977.  
  3978. Greenberg & Keene                                              [Page 71]
  3979.  
  3980. RFC 1037             NFILE - A File Access Protocol        December 1987
  3981.  
  3982.  
  3983.    Depending on the client protocol, the receipt of a mark might cause
  3984.    the reading side to read for further marks.  NFILE implements the
  3985.    resynchronization of token list streams, and serves as a useful
  3986.    example: See the section "NFILE Control Connection
  3987.    Resynchronization", section 9.1.
  3988.  
  3989.    The Symbolics implementation provides the two mark-handling
  3990.    primitives in this way:
  3991.  
  3992.  
  3993.       1. Send token (or list) preceded by a mark.  When the stream
  3994.          is in the unsafe state (on the output side), this is the
  3995.          only permitted output operation (other than closing).
  3996.  
  3997.       2. Read through to a mark and read the token (or list)
  3998.          following the mark.  When the stream is in the unsafe state
  3999.          (on the input side), this is the only permitted input
  4000.          operation (other than closing).
  4001.  
  4002. 11.3  Token List Data Stream
  4003.  
  4004.    The token list data stream is a facility to transmit stream data
  4005.    through a token list stream.  The token list data stream imposes the
  4006.    following protocol on the data transmitted:
  4007.  
  4008.             - Data is sent in the format of loose data tokens, not
  4009.               contained in token lists.
  4010.  
  4011.             - The keyword token EOF indicates that the end of data has
  4012.               been reached.
  4013.  
  4014.             - Token lists can be transmitted through the token list
  4015.               data stream.
  4016.  
  4017.             - No loose tokens other than data tokens or the keyword
  4018.               token EOF can be sent.
  4019.  
  4020.             - Boundaries between data tokens are not signification.
  4021.               The data is considered to be a continuous stream, with
  4022.               the possible exception of marks.
  4023.  
  4024.    The token list data stream is most appropriate for sending file data.
  4025.    It is expected (but not required) that its typical mode of use is to
  4026.    send a large number of data tokens, with an occasional token list.
  4027.    The design intent was that token lists would be used by the
  4028.    application program to indicate exceptional situations.
  4029.  
  4030.    Data tokens, the keyword token EOF, and token lists are defined in
  4031.  
  4032.  
  4033.  
  4034. Greenberg & Keene                                              [Page 72]
  4035.  
  4036. RFC 1037             NFILE - A File Access Protocol        December 1987
  4037.  
  4038.  
  4039.    the token list stream documentation:  See the section "Types of
  4040.    Tokens and Token Lists", section 11.2.1.
  4041.  
  4042.    The NFILE file protocol provides a good example of the use of token
  4043.    list data streams.  NFILE sends file data through token list data
  4044.    streams; each NFILE data channel is a token list data stream.  Errors
  4045.    such as disk errors during the reading of a file are conveyed as
  4046.    token lists through the token list data stream.
  4047.  
  4048. 12.  BYTE STREAM WITH MARK
  4049.  
  4050.    PURPOSE:  Byte Stream with Mark is a simple layer of protocol that
  4051.    guarantees that an out-of-band signal can be transmitted in the case
  4052.    of program interruption.  Byte Stream with Mark is designed to
  4053.    provide end-to-end stream consistency in the face of user program
  4054.    aborts.
  4055.  
  4056. 12.1  Discussion of Byte Stream with Mark
  4057.  
  4058.    INTRODUCTION
  4059.  
  4060.    Byte Stream with Mark is a reliable, bidirectional byte stream with
  4061.    one out-of-band (but not out-of-sequence) signal called a "mark".
  4062.    The design of Byte Stream with Mark ensures that the mark is always
  4063.    recognizable on the receiving end.  The Byte Stream with Mark is
  4064.    built on an underlying stream, which must support the transmission of
  4065.    8-bit bytes.  Byte Stream with Mark has been implemented to run on
  4066.    TCP and Chaos.  Marks are implemented differently on the two
  4067.    protocols.
  4068.  
  4069.    Marks are used to resynchronize the stream when something has
  4070.    occurred to interrupt normal operations.  For example, an application
  4071.    layer sending data over the Byte Stream with Mark can abort in the
  4072.    middle of sending that data.  Recovery is handled by sending a mark.
  4073.  
  4074.    In the context of this document, "aborting" is defined as follows:
  4075.    Aborting the current execution of a program means to halt that
  4076.    execution and to abandon it, never to complete it.  The data
  4077.    representing the state of the execution are irrevocably discarded.
  4078.  
  4079.    EXAMPLE OF USE
  4080.  
  4081.    Byte Stream with Mark is the layer of protocol underlying NFILE.
  4082.    NFILE uses the marks implemented in Byte Stream with Mark to
  4083.    resynchronize control connections or data channels whose
  4084.    synchronization has been lost.  For a description of NFILE's use of
  4085.    marks to resynchronize streams:  See the section "NFILE
  4086.    Resynchronization Procedure", section 9.
  4087.  
  4088.  
  4089.  
  4090. Greenberg & Keene                                              [Page 73]
  4091.  
  4092. RFC 1037             NFILE - A File Access Protocol        December 1987
  4093.  
  4094.  
  4095.    BYTE STREAM WITH MARK ON CHAOSNET
  4096.  
  4097.    A mark is recognized on Chaosnet by a packet bearing the opcode 201
  4098.    (octal).  There is no data in a mark packet, so the data portion of
  4099.    the packet is ignored.  Byte Stream with Mark transmits all data in
  4100.    packets bearing opcode 200 (octal).
  4101.  
  4102.    If Byte Stream with Mark is implemented on another (non-Chaos) stream
  4103.    that supports opcode-bearing packets, the recommended implementation
  4104.    is the reservation of an opcode for the mark.
  4105.  
  4106.    BYTE STREAM WITH MARK ON TCP:  RECORD MODE
  4107.  
  4108.    The purpose of Byte Stream with Mark is to guarantee that marks can
  4109.    always be unambiguously identified.  Therefore, for TCP (and for any
  4110.    transport layer that does not implement packets natively) a simple
  4111.    record stream is imposed on the stream.  The record boundaries serve
  4112.    only to distinguish where a mark can occur.  A record consists of a
  4113.    two-byte byte count, most significant byte first, followed by that
  4114.    many bytes of data.  A byte count of zero is recognized as a mark.
  4115.  
  4116.    Both the sending side and the receiving side must rigorously maintain
  4117.    the integrity of the record boundaries.  A writer to the stream must
  4118.    never output a byte count without that number of data bytes
  4119.    following.  Similarly, a reader of the stream, after reading a byte
  4120.    count, has effectively contracted to read that many bytes from the
  4121.    encapsulated stream, regardless of whether those bytes are requested
  4122.    by the application layer.
  4123.  
  4124.    MAINTAINING RECORD INTEGRITY
  4125.  
  4126.    This subsection deals with maintaining record integrity on non-Chaos
  4127.    networks.  Since Chaos implements packets natively, no special care
  4128.    is required to maintain record integrity on the Chaos network.
  4129.  
  4130.    The design discussed here guarantees record integrity; the underlying
  4131.    stream must guarantee data integrity.
  4132.  
  4133.    The basic design of Byte Stream with Mark on TCP (and other transport
  4134.    layers that do not implement packets natively) is to preserve record
  4135.    integrity by putting clearly demarcated, byte-counted records in the
  4136.    natural records of the encapsulated stream.  Therefore, when the
  4137.    outer stream requests a buffer's worth of file data from the
  4138.    encapsulated stream, it expects to receive a buffer containing one
  4139.    entire, ntegral, record of that stream, complete with byte count.
  4140.  
  4141.    Because of diverse network implementations on different operating
  4142.    systems, the software that implements the encapsulated stream might
  4143.  
  4144.  
  4145.  
  4146. Greenberg & Keene                                              [Page 74]
  4147.  
  4148. RFC 1037             NFILE - A File Access Protocol        December 1987
  4149.  
  4150.  
  4151.    not be able to provide integral record buffers to the Byte Stream
  4152.    with Mark implementation.  For example, the writing stream could have
  4153.    written records that are much longer than available buffers on the
  4154.    receiving system.  In this case, a request to read from the
  4155.    encapsulated stream returns some buffer or some amount of data
  4156.    representing less than an entire Byte Stream with Mark record.  The
  4157.    input subroutine of the Byte Stream with Mark implementation must
  4158.    therefore return a region of this (smaller) buffer, representing less
  4159.    than the full Byte Stream with Mark record.  Nevertheless, the Byte
  4160.    Stream with Mark must extract the count of the full Byte Stream with
  4161.    Mark record from the first such buffer of each Byte Stream with Mark
  4162.    record, and maintain and update this count as succeeding component
  4163.    buffers are read.
  4164.  
  4165.    In this case, if the program reading from the Byte Stream with Mark
  4166.    aborts while reading data, the implementation of Byte Stream with
  4167.    Mark must continue to read through the remaining buffers of the Byte
  4168.    Stream with Mark record that has been subdivided in this fashion.
  4169.  
  4170.    The user side program will have determined that an abort has
  4171.    occurred, and will request the Byte Stream with Mark to read up to
  4172.    and through the next mark.  The Byte Stream with Mark will have
  4173.    processed a fractional record, and must discard the remaining buffers
  4174.    of the record now being read.
  4175.  
  4176. 12.2  Byte Stream with Mark Abortable States
  4177.  
  4178.    Byte Stream with Mark is designed to provide end-to-end stream
  4179.    consistency in the face of user program aborts.  This section
  4180.    describes user program aborts, and how Byte Stream with Mark handles
  4181.    them.  In the context of this document, "aborting" is defined as
  4182.    follows:  Aborting the current execution of a program means to halt
  4183.    that execution and to abandon it, never to complete it.  The data
  4184.    representing the state of the execution are irrevocably discarded.
  4185.  
  4186.    USER PROGRAM ABORTS AND I/O STREAMS
  4187.  
  4188.    Aborting the execution of the code that manipulates I/O streams, in
  4189.    general, poses significant problems.  Given that a stream is a static
  4190.    data object, and is intended to be used over and over again, aborting
  4191.    the execution of any routine manipulating a stream can leave it in an
  4192.    inconsistent, unusable state.
  4193.  
  4194.    Many operating systems solve this problem by manipulating a large
  4195.    subset of streams within the confines of the supervisor or executive
  4196.    program, which is not vulnerable to aborts, short of system or
  4197.    network failure.  Nevertheless, the need still exists to implement
  4198.    streams outside of the boundaries of the supervisor.  Furthermore,
  4199.  
  4200.  
  4201.  
  4202. Greenberg & Keene                                              [Page 75]
  4203.  
  4204. RFC 1037             NFILE - A File Access Protocol        December 1987
  4205.  
  4206.  
  4207.    the Symbolics computer environment has no supervisor or executive
  4208.    program, and is thus vulnerable to aborts everywhere.
  4209.  
  4210.    BYTE STREAM WITH MARK HANDLING OF USER PROGRAM ABORTS
  4211.  
  4212.    Byte Stream with Mark is designed to be nearly impervious to the
  4213.    aborting of programs using it.  Its design is based on careful
  4214.    analysis of all possible states of the stream, and of the effect of
  4215.    aborts of the programs using the stream in each of these states.
  4216.    This section provides that analysis.
  4217.  
  4218.    A "transmission" is a collection of user data sent by the application
  4219.    level through the Byte Stream with Mark whose end is well-defined,
  4220.    once its start has been recognized.  For instance, the token list
  4221.    stream, when using Byte Stream with Mark, sends token lists.  When a
  4222.    TOP-LEVEL-LIST-BEGIN has been sent, the containing transmission is
  4223.    not considered complete until the corresponding TOP-LEVEL-LIST-END is
  4224.    read.  See the section "Token List Transport Layer", section 11.
  4225.  
  4226.    The following cases are possible states of the stream when an abort
  4227.    occurs:
  4228.  
  4229.          1. Abort occurs when the user program is not manipulating the
  4230.             stream.
  4231.  
  4232.             This case presents no problem.
  4233.  
  4234.          2. Abort occurs after a transmission has been partially sent,
  4235.             at a packet or record boundary.
  4236.  
  4237.             This implies that the datum that would indicate the
  4238.             successful complete sending of that transmission has been
  4239.             not yet been sent.
  4240.  
  4241.             The Byte Stream with Mark state is consistent, but the
  4242.             application level state is not.  The application level must
  4243.             determine that the execution of the code composing and
  4244.             sending its transmission was, in fact, aborted, and
  4245.             initiate resynchronization via marks.
  4246.  
  4247.             The receiving side must be careful not to act upon a
  4248.             transmission (that is, to perform any action or side
  4249.             effect) until the transmission has been successfully
  4250.             received in entirety.  This protects the user program from
  4251.             the possibility that an abort can occur after a
  4252.             transmission has been partially sent.
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258. Greenberg & Keene                                              [Page 76]
  4259.  
  4260. RFC 1037             NFILE - A File Access Protocol        December 1987
  4261.  
  4262.  
  4263.          3. Abort occurs during the sending or receiving of a record.
  4264.  
  4265.             This is the most vulnerable state of the mechanism.  This
  4266.             case does not occur on packet-oriented media; it is
  4267.             subsumed by the next case.
  4268.  
  4269.             This case is handled by minimizing the extent of this
  4270.             window, and killing the connection when and if the
  4271.             situation is detected.  Depending on the operating system
  4272.             involved, this window could be minimized by using
  4273.             interrupt-disabling mechanisms, auxiliary processes or
  4274.             tasks, or some other technique.
  4275.  
  4276.             For buffered streams, input and output waiting can be done
  4277.             in consistent states, thus minimizing the amount of time
  4278.             manipulating the actual encapsulated stream.  For
  4279.             unbuffered streams, a lot of time can be spent in this
  4280.             window.  It is expected that unbuffered streams will be
  4281.             exceedingly uncommon.  Nevertheless, the implementation of
  4282.             Byte Stream with Mark must detect this case.
  4283.  
  4284.          4. Abort occurs during the sending or receiving of fundamental
  4285.             units of the lowest-level underlying stream (packets,
  4286.             buffers, or bytes).
  4287.  
  4288.             This case is usually handled by inhibiting interrupts, or
  4289.             other forms of masking, in the code implementing the
  4290.             encapsulated stream, since no waiting is possible at
  4291.             unexpected times.
  4292.  
  4293. 13.  POSSIBLE FUTURE EXTENSIONS
  4294.  
  4295.    NFILE was designed to be extended as the needs of its clients grow,
  4296.    or as new clients with different needs appear.  Currently it meets
  4297.    the needs of the Symbolics Genera 7.0 operating system, although its
  4298.    design is intentionally general.  If users of other operating systems
  4299.    identify new features that would be useful, they could be added to
  4300.    NFILE.  This section illustrates some areas areas where the design of
  4301.    NFILE intentionally accommodates extensions.
  4302.  
  4303.          - The NFILE protocol encodes commands and responses as text,
  4304.            rather than using prearranged numbers.  This means that new
  4305.            commands and responses can be added without having to obtain
  4306.            a new number from a central registry.
  4307.  
  4308.          - The Token List Transport Layer provides a general substrate
  4309.            for the value-transmission portion of network protocols.  In
  4310.            fact, it has been used at Symbolics for other protocols
  4311.  
  4312.  
  4313.  
  4314. Greenberg & Keene                                              [Page 77]
  4315.  
  4316. RFC 1037             NFILE - A File Access Protocol        December 1987
  4317.  
  4318.  
  4319.            besides NFILE.  The Token List Transport Layer could
  4320.            conveniently be extended to support transmission of other
  4321.            types of values besides those it currently supports.
  4322.  
  4323.          - The character set to be used for file transfer could be made
  4324.            negotiable.
  4325.  
  4326.          - The command character set could be made negotiable.
  4327.            Currently there is no negotiation sequence, but one could be
  4328.            added.
  4329.  
  4330.          - Greater support for more complex file organizations could be
  4331.            added, such as record files, databases, and so on.  This
  4332.            could be an extension to the direct access mode facility.
  4333.  
  4334.          - Currently, the LOGIN command allows the user side to inform
  4335.            the server which version of NFILE it is running.  This
  4336.            feature is included in NFILE so that a server can continue
  4337.            to support older versions of the protocol even after new,
  4338.            extended versions have been implemented.  However, the
  4339.            specification is currently somewhat vague as to how the
  4340.            server can make use of the version.
  4341.  
  4342.          - NFILE is not restricted to using TCP or Chaos as its
  4343.            underlying protocol.  NFILE can be built on any byte stream
  4344.            protocol that supports reliable transmission of 8-bit bytes
  4345.            and multiple connections.
  4346.  
  4347.    In addition to the possible future extensions, we would like to
  4348.    mention a known limitation of NFILE.
  4349.  
  4350.    Currently NFILE requires multiple connections for a single session.
  4351.    That is, the control connection must be separate from the data
  4352.    connections.  If NFILE is to be used over a telephone, this
  4353.    requirement poses an inconvenient restriction.  It is possible to
  4354.    implement a multiplexing scheme as a level between NFILE and the
  4355.    communication medium.
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.  
  4364.  
  4365.  
  4366.  
  4367.  
  4368.  
  4369.  
  4370. Greenberg & Keene                                              [Page 78]
  4371.  
  4372. RFC 1037             NFILE - A File Access Protocol        December 1987
  4373.  
  4374.  
  4375.                                 APPENDIX A
  4376.                           NORMAL TRANSLATION MODE
  4377.  
  4378.  
  4379.    NORMAL translation mode guarantees the following:
  4380.  
  4381.          - A file containing characters in the NFILE character set can
  4382.            be written to any NFILE server and read back intact
  4383.            (containing the same characters).
  4384.  
  4385.          - A file written by NFILE should not appear as "foreign" to a
  4386.            server operating system unless the file contains NFILE's
  4387.            extended characters.  That is, a server file that uses only
  4388.            the subset of the NFILE character set limited to standard
  4389.            ASCII characters (the 95 printing characters, and the native
  4390.            representation of return, linefeed, page, backspace, rubout,
  4391.            and tab) can be read and written, with the result being the
  4392.            same data in NFILE characters as exists in server
  4393.            characters.
  4394.  
  4395.    In this section, all numbers designating values of character codes
  4396.    are to be interpreted in octal.  The notation "x in c1..c2" means
  4397.    "for all character codes x such that c1 <= x <= c2."
  4398.  
  4399.    The NFILE character set is an extension of standard ASCII.  The 95
  4400.    ASCII printing characters have the same numerical codes in the NFILE
  4401.    character set.  Five ASCII non-printing characters have counterparts
  4402.    in the NFILE character set, as shown in the following table.  The
  4403.    NFILE character set includes a single Return character, rather than
  4404.    the carriage-return line-feed sequence typically used in ASCII.  The
  4405.    NFILE character set does not include the ASCII control characters,
  4406.    other than the five shown in the following table, but does include
  4407.    some additional printing and formatting characters that have no
  4408.    counterparts in ASCII.
  4409.  
  4410.                              NFILE     Standard ASCII
  4411.  
  4412.          Rubout:             207       177
  4413.          Backspace:          210       10
  4414.          Tab:                211       11
  4415.          Linefeed:           212       12
  4416.          Page:               214       14
  4417.  
  4418.    Note that the NFILE Return character is of code 215.  This character
  4419.    includes "going to the next line".  This is a notable difference from
  4420.    the convention used in PDP-10 ASCII in which lines are ended by a
  4421.    pair of characters, "carriage return" and "line feed".
  4422.  
  4423.  
  4424.  
  4425.  
  4426. Greenberg & Keene                                              [Page 79]
  4427.  
  4428. RFC 1037             NFILE - A File Access Protocol        December 1987
  4429.  
  4430.  
  4431.    NORMAL TRANSLATION TO UNIX SERVERS
  4432.  
  4433.    The translation given in this table is appropriate for use by UNIX
  4434.    servers, or other servers that use 8-bit bytes to store ASCII
  4435.    characters.  Machines with 8-bit bytes usually place the extra NFILE
  4436.    characters in the top half of their character set.
  4437.  
  4438.        TABLE 1.   TRANSLATIONS FROM NFILE CHARACTERS TO UNIX CHARACTERS
  4439.  
  4440.  
  4441.             NFILE character       UNIX character
  4442.  
  4443.             x in 000..007         x
  4444.             x in 010..015         x + 200
  4445.             x in 016..176         x
  4446.             177                   377
  4447.             x in 200..207         x
  4448.             x in 210..211         x - 200
  4449.             212                   015
  4450.             x in 213..214         x - 200
  4451.             215                   012
  4452.             x in 216..376         x
  4453.             377                   177
  4454.  
  4455.        TABLE 2.   TRANSLATIONS FROM UNIX CHARACTERS TO NFILE CHARACTERS
  4456.  
  4457.  
  4458.             UNIX character        NFILE character
  4459.  
  4460.             x in 000..007         x
  4461.             x in 010..011         x + 200
  4462.             012                   215
  4463.             x in 013..014         x + 200
  4464.             015                   212
  4465.             x in 016..176         x
  4466.             177                   377
  4467.             x in 200..207         x
  4468.             x in 210..215         x - 200
  4469.             x in 216..376         x
  4470.             377                   177
  4471.  
  4472.    NORMAL TRANSLATION TO PDP-10 FAMILY SERVERS
  4473.  
  4474.    The translation given in this table is appropriate for use by PDP-10
  4475.    family servers, or other servers that use 7-bit bytes to store ASCII
  4476.    characters.  On the PDP-10 the sequence CRLF, 015 012, represents a
  4477.    new line.
  4478.  
  4479.  
  4480.  
  4481.  
  4482. Greenberg & Keene                                              [Page 80]
  4483.  
  4484. RFC 1037             NFILE - A File Access Protocol        December 1987
  4485.  
  4486.  
  4487.    The mechanism for this translation on machines with 7-bit bytes is to
  4488.    use the RUBOUT character (octal code 177) as an escape character.
  4489.  
  4490.          TABLE 3.   TRANSLATIONS FROM NFILE TO PDP-10 CHARACTERS
  4491.  
  4492.  
  4493.             NFILE character       PDP-10 character(s)
  4494.  
  4495.             x in 000..007         x
  4496.             x in 010..012         177 x
  4497.             013                   013
  4498.             x in 014..015         177 x
  4499.             x in 016..176         x
  4500.             177                   177 177
  4501.             x in 200..207         177 x - 200
  4502.             x in 210..212         x - 200
  4503.             213                   177 013
  4504.             214                   014
  4505.             215                   015 012
  4506.             x in 216..376         177 x - 200
  4507.             377                   no corresponding code
  4508.  
  4509.    These tables might seem confusing at first, but there are some
  4510.    general rules about it that should make it clearer.  First, NFILE
  4511.    characters in the range 000..177 are generally represented as
  4512.    themselves, and x in 200..377 is generally represented as 177
  4513.    followed by x - 200.  That is, 177 is used to quote the second 200
  4514.    NFILE characters.  It was deemed that 177 is a more useful and common
  4515.    character than 377, so 177 177 means 177, and there is no way to
  4516.    describe 377 with PDP-10 ASCII characters.  In the NFILE character
  4517.    set, the formatting control characters appear offset up by 200 with
  4518.    respect to standard ASCII.  This explains why the preferred mode of
  4519.    expressing 210 (backspace) is 010, and 010 turns into 177 010.  The
  4520.    same reasoning applies to 211 (Tab), 212 (Linefeed), 214 (Formfeed),
  4521.    and 215 (Return).
  4522.  
  4523.    More special care is needed for the Return character, which is the
  4524.    mapping of the system-dependent representation of "the start of a new
  4525.    line".  The NFILE Return (215) is equivalent to 015 012 (CRLF) in
  4526.    some ASCII systems.  In the NFILE character set there is no
  4527.    representation
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538. Greenberg & Keene                                              [Page 81]
  4539.  
  4540. RFC 1037             NFILE - A File Access Protocol        December 1987
  4541.  
  4542.  
  4543.      TABLE 4.   TRANSLATIONS FROM PDP-10 CHARACTERS TO NFILE CHARACTERS
  4544.  
  4545.  
  4546.             PDP-10 character      NFILE character
  4547.  
  4548.             x in 000..007         x
  4549.             x in 010..012         x + 200
  4550.             013                   013
  4551.             014                   214
  4552.             015 012               215
  4553.             015 not-012           115
  4554.             x in 016..176         x
  4555.             177 x in 000..007     x + 200
  4556.             177 x in 010..012     x
  4557.             177 013               213
  4558.             177 x in 014..015     x
  4559.             177 x in 016..176     x + 200
  4560.             177 177               177
  4561.  
  4562.    of a carriage that doesn't go to a new line, so if there is one in a
  4563.    server file, it must be translated to something else.  When
  4564.    converting ASCII characters to NFILE characters, an 015 followed by
  4565.    an 012 therefore turns into a 215.  A stray CR is arbitrarily
  4566.    translated into a single M (115).
  4567.  
  4568.  
  4569.  
  4570.  
  4571.  
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594. Greenberg & Keene                                              [Page 82]
  4595.  
  4596. RFC 1037             NFILE - A File Access Protocol        December 1987
  4597.  
  4598.  
  4599.                                 APPENDIX B
  4600.                            RAW TRANSLATION MODE
  4601.  
  4602.  
  4603.    RAW mode means no translation should be performed.  In RAW mode the
  4604.    server operating system should treat the file as a character file and
  4605.    use the same data formatting that would be appropriate for a
  4606.    character file, but transfer the actual binary values of the
  4607.    character codes.
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.  
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650. Greenberg & Keene                                              [Page 83]
  4651.  
  4652. RFC 1037             NFILE - A File Access Protocol        December 1987
  4653.  
  4654.  
  4655.                                 APPENDIX C
  4656.                        SUPER-IMAGE TRANSLATION MODE
  4657.  
  4658.  
  4659.    SUPER-IMAGE mode is intended for use by PDP-10 family machines only.
  4660.    It is included largely as an illustration of a system-dependent
  4661.    extension.  A server machine that has 8-bit bytes should treat
  4662.    SUPER-IMAGE mode the same as NORMAL mode.
  4663.  
  4664.    In this section, all numbers designating values of character codes
  4665.    are to be interpreted in octal.  The notation "x in c1..c2" means
  4666.    "for all character codes x such that c1 <= x <= c2."
  4667.  
  4668.    SUPER-IMAGE mode suppresses the use of the 177 character as an escape
  4669.    character.  Character translation should be done as in NORMAL mode,
  4670.    with one exception.  When a two-character sequence beginning with 177
  4671.    is detected, the 177 should not be output at all.
  4672.  
  4673.    In this section, all numbers designating values of character codes
  4674.    are to be interpreted in octal.  SUPER-IMAGE mode is intended for use
  4675.    by PDP-10 machines only.
  4676.  
  4677.    SUPER-IMAGE suppresses the use of Rubout for quoting.  That is, for
  4678.    each entry beginning with a 177 in the PDP-10 character column in the
  4679.    NORMAL translation table, the NFILE character has the 177 removed.
  4680.  
  4681.          TABLE 5.   SUPER-IMAGE TRANSLATION FROM NFILE TO ASCII
  4682.  
  4683.  
  4684.             NFILE character   PDP-10 character(s)
  4685.  
  4686.  
  4687.             x in 000..177     x
  4688.             x in 200..214     <x - 200>
  4689.             215               015 012
  4690.             x in 216..376     <x - 200>
  4691.             377               no corresponding code
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706. Greenberg & Keene                                              [Page 84]
  4707.  
  4708. RFC 1037             NFILE - A File Access Protocol        December 1987
  4709.  
  4710.  
  4711.          TABLE 6.   SUPER-IMAGE TRANSLATION FROM ASCII TO NFILE
  4712.  
  4713.  
  4714.             PDP-10 character  NFILE character
  4715.  
  4716.  
  4717.             x in 000..007     x
  4718.             x in 010..012     x + 200
  4719.             013               013
  4720.             014               214
  4721.             015 012           215
  4722.             015 not-012       115
  4723.             x in <016..176>   x
  4724.             177               177
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762. Greenberg & Keene                                              [Page 85]
  4763.  
  4764. RFC 1037             NFILE - A File Access Protocol        December 1987
  4765.  
  4766.  
  4767.                                    NOTES
  4768.  
  4769.    1. NFILE's requirement for using the NFILE character set is
  4770.       recognized as a drawback for non-Symbolics machines.  A useful
  4771.       extension to NFILE would be a provision to make the character set
  4772.       negotiable.
  4773.  
  4774.    2. Implementation note:  Care must be taken that the freeing is done
  4775.       before the control connection is allowed to process another
  4776.       command, or else the control connection may find the data channel
  4777.       to be falsely indicated as being in use.
  4778.  
  4779.    3. The Symbolics operating system has the policy that whenever the
  4780.       user side is waiting for the server side, a user abort can occur.
  4781.       This user side waiting can occur in any context, such awaiting a
  4782.       response, waiting in the middle of reading network input, or
  4783.       waiting in the middle of transmitting network output.  Thus there
  4784.       are no "hung" states.
  4785.  
  4786.    4. Note that the Token List Transport Layer supplies a special token
  4787.       to indicate Boolean truth, but no corresponding token to indicate
  4788.       Boolean falsity.  NFILE uses an empty token list to indicate
  4789.       Boolean falsity.  The historical reason for this asymmetry is the
  4790.       inability of the Lisp language to differentiate between the empty
  4791.       list and NIL, which is traditionally used to mean Boolean falsity.
  4792.       If the flexibility of both a Boolean falsity and an empty token
  4793.       list were allowed, it would create problems for an operating
  4794.       system that cannot distinguish between the two.  This aspect of
  4795.       the protocol is recognized as a concession to the Lisp language.
  4796.       The unfortunate effect is to disallow operating systems to
  4797.       distinguish between Boolean falsity and an empty list.
  4798.  
  4799.    5. No so-called "fat strings" can be sent.
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818. Greenberg & Keene                                              [Page 86]
  4819.