Difference between revisions of "RFC1037"

From RFC-Wiki
imported>Admin
(Created page with " Network Working Group B. Greenberg Request for Comments: 1037 S. Keene ...")
 
Line 7: Line 7:
 
Network Working Group                                      B. Greenberg
 
Network Working Group                                      B. Greenberg
 
Request for Comments:  1037                                    S. Keene
 
Request for Comments:  1037                                    S. Keene
                                                      December 1987
+
                                                          December 1987
  
  
                NFILE -  A File Access Protocol
+
                    NFILE -  A File Access Protocol
  
  
 
STATUS OF THIS MEMO
 
STATUS OF THIS MEMO
  
This document includes a specification of the NFILE file access
+
  This document includes a specification of the NFILE file access
protocol and its underlying levels of protocol, the Token List
+
  protocol and its underlying levels of protocol, the Token List
Transport Layer and Byte Stream with Mark.  The goal of this
+
  Transport Layer and Byte Stream with Mark.  The goal of this
specification is to promote discussion of the ideas described here,
+
  specification is to promote discussion of the ideas described here,
and to encourage designers of future file protocols to take advantage
+
  and to encourage designers of future file protocols to take advantage
of these ideas.  A secondary goal is to make the specification
+
  of these ideas.  A secondary goal is to make the specification
available to sites that might benefit from implementing NFILE.  The
+
  available to sites that might benefit from implementing NFILE.  The
distribution of this document is unlimited.
+
  distribution of this document is unlimited.
  
                          TABLE OF CONTENTS
+
                            TABLE OF CONTENTS
                                                                Page
+
                                                                    Page
1.  INTRODUCTION                                                    3
+
  1.  INTRODUCTION                                                    3
  
2.  NFILE PROTOCOL LAYERING                                        4
+
  2.  NFILE PROTOCOL LAYERING                                        4
  
3.  OVERVIEW OF AN NFILE SESSION                                    5
+
  3.  OVERVIEW OF AN NFILE SESSION                                    5
  
4.  NFILE CONTROL AND DATA CONNECTIONS                              6
+
  4.  NFILE CONTROL AND DATA CONNECTIONS                              6
  
5.  NFILE FILE OPENING MODES                                        7
+
  5.  NFILE FILE OPENING MODES                                        7
  
6.  NFILE CHARACTER SET                                            9
+
  6.  NFILE CHARACTER SET                                            9
  
7.  CONVENTIONS USED IN THIS DOCUMENT                              10
+
  7.  CONVENTIONS USED IN THIS DOCUMENT                              10
  
    7.1  Mapping Data Types Into Token List Representation        10
+
      7.1  Mapping Data Types Into Token List Representation        10
    7.2  Format of NFILE Commands and Responses                    10
+
      7.2  Format of NFILE Commands and Responses                    10
    7.3  Data Channel Handles and Direct File Identifiers          13
+
      7.3  Data Channel Handles and Direct File Identifiers          13
    7.4  Syntax of File and Directory Pathname Arguments          13
+
      7.4  Syntax of File and Directory Pathname Arguments          13
    7.5  Format of NFILE File Property/Value Pairs                14
+
      7.5  Format of NFILE File Property/Value Pairs                14
  
8.  NFILE COMMANDS                                                16
+
  8.  NFILE COMMANDS                                                16
  
    8.1  ABORT Command                                            16
+
      8.1  ABORT Command                                            16
    8.2  CHANGE-PROPERTIES Command                                16
+
      8.2  CHANGE-PROPERTIES Command                                16
    8.3  CLOSE Command                                            17
+
      8.3  CLOSE Command                                            17
    8.4  COMPLETE Command                                          19
+
      8.4  COMPLETE Command                                          19
    8.5  CONTINUE Command                                          20
+
      8.5  CONTINUE Command                                          20
  
  
  
 +
Greenberg & Keene                                              [Page 1]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
    8.6  CREATE-DIRECTORY Command                                  21
 
    8.7  CREATE-LINK Command                                      21
 
    8.8  DATA-CONNECTION Command                                  22
 
    8.9  DELETE Command                                            23
 
    8.10  DIRECT-OUTPUT Command                                    23
 
    8.11  DIRECTORY Command                                        24
 
        8.11.1  NFILE DIRECTORY Data Format                      26
 
    8.12  DISABLE-CAPABILITIES Command                            27
 
    8.13  ENABLE-CAPABILITIES Command                              28
 
    8.14  EXPUNGE Command                                          28
 
    8.15  FILEPOS Command                                          29
 
        8.15.1  Implementation Hint for FILEPOS Command          30
 
    8.16  FINISH Command                                          30
 
    8.17  HOME-DIRECTORY Command                                  31
 
    8.18  LOGIN Command                                            32
 
    8.19  MULTIPLE-FILE-PLISTS Command                            34
 
    8.20  OPEN Command                                            35
 
        8.20.1  NFILE OPEN Optional Keyword/Value Pairs          39
 
        8.20.2  NFILE OPEN Response Return Values                45
 
    8.21  PROPERTIES Command                                      47
 
    8.22  READ Command                                            49
 
    8.23  RENAME Command                                          50
 
    8.24  RESYNCHRONIZE-DATA-CHANNEL Command                      51
 
        8.24.1  Implementation Hints for RESYNCHRONIZE-DATA-      51
 
                CHANNEL Command
 
    8.25  UNDATA-CONNECTION Command                                52
 
  
9.  NFILE RESYNCHRONIZATION PROCEDURE                             53
+
      8.6  CREATE-DIRECTORY Command                                  21
 +
      8.7  CREATE-LINK Command                                      21
 +
      8.8  DATA-CONNECTION Command                                  22
 +
      8.9 DELETE Command                                            23
 +
      8.10  DIRECT-OUTPUT Command                                    23
 +
      8.11  DIRECTORY Command                                        24
 +
            8.11.1 NFILE DIRECTORY Data Format                      26
 +
      8.12  DISABLE-CAPABILITIES Command                            27
 +
      8.13  ENABLE-CAPABILITIES Command                             28
 +
      8.14  EXPUNGE Command                                          28
 +
      8.15  FILEPOS Command                                          29
 +
            8.15.1  Implementation Hint for FILEPOS Command          30
 +
      8.16  FINISH Command                                          30
 +
      8.17  HOME-DIRECTORY Command                                  31
 +
      8.18  LOGIN Command                                            32
 +
      8.19  MULTIPLE-FILE-PLISTS Command                            34
 +
      8.20  OPEN Command                                            35
 +
            8.20.1  NFILE OPEN Optional Keyword/Value Pairs          39
 +
            8.20.2  NFILE OPEN Response Return Values                45
 +
      8.21  PROPERTIES Command                                      47
 +
      8.22  READ Command                                            49
 +
      8.23  RENAME Command                                          50
 +
      8.24  RESYNCHRONIZE-DATA-CHANNEL Command                      51
 +
            8.24.1  Implementation Hints for RESYNCHRONIZE-DATA-      51
 +
                    CHANNEL Command
 +
      8.25  UNDATA-CONNECTION Command                                52
  
    9.1 NFILE Control Connection Resynchronization                54
+
  9.  NFILE RESYNCHRONIZATION PROCEDURE                              53
    9.2  NFILE Data Connection Resynchronization                  55
 
  
10.  NFILE ERRORS AND NOTIFICATIONS                                58
+
      9.1 NFILE Control Connection Resynchronization                54
 +
      9.2  NFILE Data Connection Resynchronization                  55
  
    10.1 Notifications From the NFILE Server                      58
+
  10.  NFILE ERRORS AND NOTIFICATIONS                                58
    10.2  NFILE Command Response Errors                            59
 
    10.3  NFILE Asynchronous Errors                                60
 
    10.4  NFILE Three-letter Error Codes                          61
 
  
11TOKEN LIST TRANSPORT LAYER                                    65
+
      10.1 Notifications From the NFILE Server                      58
 +
      10.2  NFILE Command Response Errors                            59
 +
      10.3  NFILE Asynchronous Errors                                60
 +
      10.4  NFILE Three-letter Error Codes                          61
  
    11.1 Introduction to the Token List Transport Layer          65
+
  11.  TOKEN LIST TRANSPORT LAYER                                    65
    11.2  Token List Stream                                        66
 
        11.2.1  Types of Tokens and Token Lists                  66
 
        11.2.2  Token List Stream Example                        68
 
        11.2.3  Mapping of Lisp Objects to Token List Stream      70
 
                Representation
 
        11.2.4  Aborting and the Token List Stream                71
 
  
 +
      11.1  Introduction to the Token List Transport Layer          65
 +
      11.2  Token List Stream                                        66
 +
            11.2.1  Types of Tokens and Token Lists                  66
 +
            11.2.2  Token List Stream Example                        68
 +
            11.2.3  Mapping of Lisp Objects to Token List Stream      70
 +
                    Representation
 +
            11.2.4  Aborting and the Token List Stream                71
  
  
  
 +
Greenberg & Keene                                              [Page 2]
  
    11.3  Token List Data Stream                                  72
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
12.  BYTE STREAM WITH MARK                                        73
 
  
    12.1 Discussion of Byte Stream with Mark                      73
+
      11.3 Token List Data Stream                                   72
    12.2  Byte Stream with Mark Abortable States                  75
 
  
13POSSIBLE FUTURE EXTENSIONS                                    77
+
  12BYTE STREAM WITH MARK                                        73
  
APPENDIX ANORMAL TRANSLATION MODE                              79
+
      12.1 Discussion of Byte Stream with Mark                      73
 +
      12.2  Byte Stream with Mark Abortable States                  75
  
APPENDIX BRAW TRANSLATION MODE                                  83
+
  13POSSIBLE FUTURE EXTENSIONS                                    77
  
APPENDIX CSUPER-IMAGE TRANSLATION MODE                         84
+
  APPENDIX ANORMAL TRANSLATION MODE                               79
  
NOTES                                                              86
+
  APPENDIX B.  RAW TRANSLATION MODE                                  83
  
                          LIST OF TABLES
+
  APPENDIX C.  SUPER-IMAGE TRANSLATION MODE                          84
  
TABLE 1.   TRANSLATIONS FROM NFILE CHARACTERS TO UNIX CHARACTERS  80
+
   NOTES                                                              86
TABLE 2.    TRANSLATIONS FROM UNIX CHARACTERS TO NFILE CHARACTERS  80
 
TABLE 3.    TRANSLATIONS FROM NFILE TO PDP-10 CHARACTERS          81
 
TABLE 4.    TRANSLATIONS FROM PDP-10 CHARACTERS TO NFILE          82
 
            CHARACTERS
 
TABLE 5.    SUPER-IMAGE TRANSLATION FROM NFILE TO ASCII            84
 
TABLE 6.    SUPER-IMAGE TRANSLATION FROM ASCII TO NFILE            85
 
  
== INTRODUCTION ==
+
                              LIST OF TABLES
  
NFILE stands for "New File Protocol".  NFILE was originally designed
+
  TABLE 1.    TRANSLATIONS FROM NFILE CHARACTERS TO UNIX CHARACTERS  80
as a replacement for an older protocol named QFILE, with the goal of
+
  TABLE 2.   TRANSLATIONS FROM UNIX CHARACTERS TO NFILE CHARACTERS 80
solving robustness problems of QFILE, hence the name "New File
+
  TABLE 3.    TRANSLATIONS FROM NFILE TO PDP-10 CHARACTERS          81
Protocol".
+
  TABLE 4.    TRANSLATIONS FROM PDP-10 CHARACTERS TO NFILE           82
 +
              CHARACTERS
 +
  TABLE 5.    SUPER-IMAGE TRANSLATION FROM NFILE TO ASCII            84
 +
  TABLE 6.   SUPER-IMAGE TRANSLATION FROM ASCII TO NFILE            85
  
NFILE was designed and implemented at Symbolics by Bernard S.
+
1INTRODUCTION
Greenberg.  Mike McMahon made important contributions, especially in
 
the design and implementation of the Byte Stream with Mark and Token
 
List Transport layers.  NFILE has been used successfully for file
 
access between Symbolics computers since 1985.  NFILE servers have
 
been written for UNIX hosts as wellNFILE is intended for use by
 
any type of file system, not just the native Symbolics file system.
 
  
NFILE is a file access protocol that supports a large set of
+
  NFILE stands for "New File Protocol".  NFILE was originally designed
operations on files and directories on remote systems, including:
+
  as a replacement for an older protocol named QFILE, with the goal of
 +
  solving robustness problems of QFILE, hence the name "New File
 +
  Protocol".
  
        - Reading and writing entire files
+
  NFILE was designed and implemented at Symbolics by Bernard S.
        - Reading and writing selected portions of files
+
  Greenberg.  Mike McMahon made important contributions, especially in
        - Deleting and renaming files
+
  the design and implementation of the Byte Stream with Mark and Token
 +
  List Transport layers.  NFILE has been used successfully for file
 +
  access between Symbolics computers since 1985.  NFILE servers have
 +
  been written for UNIX hosts as well.  NFILE is intended for use by
 +
  any type of file system, not just the native Symbolics file system.
  
 +
  NFILE is a file access protocol that supports a large set of
 +
  operations on files and directories on remote systems, including:
  
 +
            - Reading and writing entire files
 +
            - Reading and writing selected portions of files
 +
            - Deleting and renaming files
  
  
  
        - Creating links
+
Greenberg & Keene                                              [Page 3]
        - Listing, creating, and expunging directories
 
        - Listing and changing the properties of files
 
        - Enabling and disabling access capabilities on a remote
 
          host
 
  
NFILE supports file transfer of binary or character files.
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
The NFILE server provides information about any errors that occur in
 
the course of a command.  In addition, NFILE has a robust scheme for
 
handling aborts on the user side.
 
  
This specification defines NFILE user version 2 and server version 2.
+
            - Creating links
We do not envision NFILE as an unchanging protocol, but rather as a
+
            - Listing, creating, and expunging directories
protocol that could continue to develop if additional requirements
+
            - Listing and changing the properties of files
are identified though the process of this Request for Comments.  The
+
            - Enabling and disabling access capabilities on a remote
design of NFILE makes room for various useful extensions.  Some of
+
              host
the extensions that we are considering are described later on in this
 
document:  See the section "Possible Future Extensions", section 13.
 
  
== NFILE PROTOCOL LAYERING ==
+
  NFILE supports file transfer of binary or character files.
  
NFILE is a layered file protocolThe layers are:
+
  The NFILE server provides information about any errors that occur in
 +
  the course of a commandIn addition, NFILE has a robust scheme for
 +
  handling aborts on the user side.
  
          +-----------------------------------------------+
+
  This specification defines NFILE user version 2 and server version 2.
          |client program or user interface              |
+
  We do not envision NFILE as an unchanging protocol, but rather as a
          +-----------------------------------------------+
+
  protocol that could continue to develop if additional requirements
          |NFILE                                         |
+
  are identified though the process of this Request for Comments.  The
          +-----------------------------------------------+
+
  design of NFILE makes room for various useful extensions.  Some of
          |Token List Transport Layer                    |
+
  the extensions that we are considering are described later on in this
          +-----------------------------------------------+
+
  document: See the section "Possible Future Extensions", section 13.
          |Byte Stream with Mark                          |
 
          +-----------------------------------------------+
 
          |reliable host-host byte transmission protocol |
 
          +-----------------------------------------------+
 
  
Byte Stream with Mark is a simple protocol that guarantees that an
+
2.  NFILE PROTOCOL LAYERING
out-of-band signal can be transmitted in the case of program
 
interruptionByte Stream with Mark is to be layered upon extant
 
byte stream protocols.  An important goal of the NFILE design was
 
that NFILE could be built on any byte stream.  It is currently
 
implemented on TCP and Chaosnet.  See the section "Byte Stream with
 
Mark", section 12.
 
  
The Token List Transport Layer is a protocol that facilitates the
+
  NFILE is a layered file protocol.  The layers are:
transmission of simple structured data, such as listsSee the
 
section "Token List Transport Layer", section 11.
 
  
 +
            +-----------------------------------------------+
 +
            |client program or user interface              |
 +
            +-----------------------------------------------+
 +
            |NFILE                                          |
 +
            +-----------------------------------------------+
 +
            |Token List Transport Layer                    |
 +
            +-----------------------------------------------+
 +
            |Byte Stream with Mark                          |
 +
            +-----------------------------------------------+
 +
            |reliable host-host byte transmission protocol  |
 +
            +-----------------------------------------------+
  
 +
  Byte Stream with Mark is a simple protocol that guarantees that an
 +
  out-of-band signal can be transmitted in the case of program
 +
  interruption.  Byte Stream with Mark is to be layered upon extant
 +
  byte stream protocols.  An important goal of the NFILE design was
 +
  that NFILE could be built on any byte stream.  It is currently
 +
  implemented on TCP and Chaosnet.  See the section "Byte Stream with
 +
  Mark", section 12.
  
 +
  The Token List Transport Layer is a protocol that facilitates the
 +
  transmission of simple structured data, such as lists.  See the
 +
  section "Token List Transport Layer", section 11.
  
  
  
The NFILE commands and command responses are transmitted in "token
 
lists".  See the section "NFILE Commands", section 8.
 
  
This specification does not include a client program or user
+
Greenberg & Keene                                              [Page 4]
interface to the protocol.  In the Symbolics implementation, the
 
normal file operations transparently invoke NFILE, when the remote
 
host is known to support NFILE.  Another possible interface to NFILE
 
would be through a dedicated client program that would issue NFILE
 
commands in response to explicit requests by the user.
 
  
== OVERVIEW OF AN NFILE SESSION ==
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
An NFILE session is a dialogue between two hosts.  The host that
 
initiates the NFILE session is known as the "user side", and the
 
other host is the "server side".  The user side sends all NFILE
 
commands.  The server receives each command, processes it, and
 
responds to it, indicating the success or failure of the command.
 
  
The user side keeps track of commands sent and command responses
+
  The NFILE commands and command responses are transmitted in "token
received by using "transaction identifiers" to identify each command.
+
  lists". See the section "NFILE Commands", section 8.
The user side generates a transaction identifier (which must be
 
unique per this dialogue) for each command, and sends the transaction
 
identifier to the server along with the command.  Each NFILE server
 
response includes the transaction identifier of the command with
 
which the response is associated.  The server is not required to
 
respond to commands in the same order that the user gave them.
 
  
The user side sends NFILE commands over a bidirectional network
+
  This specification does not include a client program or user
connection called the "control connection"The server sends its
+
  interface to the protocolIn the Symbolics implementation, the
command responses on the same control connection.  The control
+
  normal file operations transparently invoke NFILE, when the remote
connection governing the NFILE session is established at the
+
  host is known to support NFILEAnother possible interface to NFILE
beginning of the sessionIf the control connection is ever broken,
+
  would be through a dedicated client program that would issue NFILE
the NFILE session is ended.
+
  commands in response to explicit requests by the user.
  
Whereas NFILE commands and responses are transmitted on the control
+
3OVERVIEW OF AN NFILE SESSION
connection, file data is transferred over "data channels"An "input
 
data channel" transfers data from server to user.  An "output data
 
channel" transfers data from user to server.  Each input data channel
 
is associated with an output data channel; together these two
 
channels comprise a "data connection".
 
  
Often more than one NFILE activity is occurring at any given time.
+
  An NFILE session is a dialogue between two hosts. The host that
For example, several files can be open and transferring data
+
  initiates the NFILE session is known as the "user side", and the
simultaneously; one or more commands can be in process at the same
+
  other host is the "server side".  The user side sends all NFILE
time; and the server can be simultaneously transmitting directory
+
  commands.  The server receives each command, processes it, and
lists and processing further commands.  This happens in an
+
  responds to it, indicating the success or failure of the command.
implementation in which the user side has multiple processes, and
 
several processes share a single NFILE server.
 
  
 +
  The user side keeps track of commands sent and command responses
 +
  received by using "transaction identifiers" to identify each command.
 +
  The user side generates a transaction identifier (which must be
 +
  unique per this dialogue) for each command, and sends the transaction
 +
  identifier to the server along with the command.  Each NFILE server
 +
  response includes the transaction identifier of the command with
 +
  which the response is associated.  The server is not required to
 +
  respond to commands in the same order that the user gave them.
  
 +
  The user side sends NFILE commands over a bidirectional network
 +
  connection called the "control connection".  The server sends its
 +
  command responses on the same control connection.  The control
 +
  connection governing the NFILE session is established at the
 +
  beginning of the session.  If the control connection is ever broken,
 +
  the NFILE session is ended.
  
 +
  Whereas NFILE commands and responses are transmitted on the control
 +
  connection, file data is transferred over "data channels".  An "input
 +
  data channel" transfers data from server to user.  An "output data
 +
  channel" transfers data from user to server.  Each input data channel
 +
  is associated with an output data channel; together these two
 +
  channels comprise a "data connection".
  
 +
  Often more than one NFILE activity is occurring at any given time.
 +
  For example, several files can be open and transferring data
 +
  simultaneously; one or more commands can be in process at the same
 +
  time; and the server can be simultaneously transmitting directory
 +
  lists and processing further commands.  This happens in an
 +
  implementation in which the user side has multiple processes, and
 +
  several processes share a single NFILE server.
  
== NFILE CONTROL AND DATA CONNECTIONS ==
 
  
The user and server communicate through a single control connection
 
and a set of data connections.  Data connections are established and
 
disestablished by NFILE commands.  The user side sends NFILE commands
 
to the server over the control connection.  The server responds to
 
every user command over this control connection.  The actual file
 
data is transmitted over the data connections.
 
  
User aborts can disrupt the normal flow of data on the control
+
Greenberg & Keene                                              [Page 5]
connection and data connections.  An important aspect of any file
 
protocol is the way it handles user aborts.  NFILE uses a
 
resynchronization procedure to bring the affected control connection
 
or data channel from an unknown, unsafe state into a known state.
 
After resynchronization, the control connection or data channel can
 
be reused.  See the section "NFILE Resynchronization Procedure",
 
section 9.
 
  
THE CONTROL CONNECTION
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
An NFILE session is begun when the NFILE user program connects to a
 
remote host and establishes a network connection.  This initial
 
connection is the control conection of the dialogue.  If TCP is used
 
as the underlying protocol, contact NFILE's well-known port, 59.  If
 
Chaos is used, use the contact name "NFILE".
 
  
The control connection is the vehicle used by the user to send its
+
4.  NFILE CONTROL AND DATA CONNECTIONS
commands, and the server to send its command responsesThese types
 
of communication occur over the NFILE control connection:
 
  
      - The user side sends NFILE commands.
+
  The user and server communicate through a single control connection
      - The server sends command responses.
+
  and a set of data connections.  Data connections are established and
      - The server sends "notifications" and "asynchronous errors".
+
  disestablished by NFILE commands.  The user side sends NFILE commands
        See the section "NFILE Errors and Notifications", section 10.
+
  to the server over the control connection. The server responds to
      - During resynchronization (a special circumstance) either the
+
  every user command over this control connection. The actual file
        user or server sends a mark.
+
  data is transmitted over the data connections.
  
All commands, command responses, and other data flowing over the
+
  User aborts can disrupt the normal flow of data on the control
NFILE control connection are transmitted in the format of "top-level
+
  connection and data connections.  An important aspect of any file
token lists"The control connection expects never to receive "loose
+
  protocol is the way it handles user aborts.  NFILE uses a
tokens"; that is, tokens not contained in token lists.
+
  resynchronization procedure to bring the affected control connection
 +
  or data channel from an unknown, unsafe state into a known state.
 +
  After resynchronization, the control connection or data channel can
 +
  be reusedSee the section "NFILE Resynchronization Procedure",
 +
  section 9.
  
 +
  THE CONTROL CONNECTION
  
 +
  An NFILE session is begun when the NFILE user program connects to a
 +
  remote host and establishes a network connection.  This initial
 +
  connection is the control conection of the dialogue.  If TCP is used
 +
  as the underlying protocol, contact NFILE's well-known port, 59.  If
 +
  Chaos is used, use the contact name "NFILE".
  
 +
  The control connection is the vehicle used by the user to send its
 +
  commands, and the server to send its command responses.  These types
 +
  of communication occur over the NFILE control connection:
  
 +
        - The user side sends NFILE commands.
 +
        - The server sends command responses.
 +
        - The server sends "notifications" and "asynchronous errors".
 +
          See the section "NFILE Errors and Notifications", section 10.
 +
        - During resynchronization (a special circumstance) either the
 +
          user or server sends a mark.
  
 +
  All commands, command responses, and other data flowing over the
 +
  NFILE control connection are transmitted in the format of "top-level
 +
  token lists".  The control connection expects never to receive "loose
 +
  tokens"; that is, tokens not contained in token lists.
  
  
Line 323: Line 333:
  
  
DATA CONNECTIONS
 
  
Data connections are established and discarded at user request, by
 
means of two NFILE commands:  DATA-CONNECTION and UNDATA-CONNECTION.
 
Each data connection is associated with a specific control
 
connection, which is the same control connection that caused the data
 
connection to be established.
 
  
Each data connection is composed of two "data channels".  Each data
 
channel is capable of sending data in one direction.  The term "input
 
channel" refers to the data channel that transmits data from the
 
server to the user side; "output channel" refers to the data channel
 
that transmits data from the user to the server side.  Throughout the
 
NFILE documentation, the terms "input channel" and "output channel"
 
are seen from the perspective of the user side.  A single data
 
channel can be used for one data transfer after another.
 
  
The format of the data transferred on the data channels is defined as
+
Greenberg & Keene                                              [Page 6]
a "token list data stream".  See the section "Token List Data
 
Stream", section 11.3. When the end of data is reached, the keyword
 
token EOF is sent.  Occasionally, token lists are transmitted over
 
the data channels, such as asynchronous error descriptions.
 
  
== NFILE FILE OPENING MODES ==
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
The NFILE OPEN command opens a file for reading, writing, or "direct
 
access" at the server host.  That means, in general, asking the host
 
file system to access the file and obtaining a file number, pointer,
 
or other quantity for subsequent rapid access to the file; this is
 
called an "opening".  The term "opening" translates to a file stream
 
in Symbolics terminology, a JFN in TOPS-20 terminology, and a file
 
descriptor in UNIX terminology.  An opening usually keeps track of
 
how many bytes have been read or written, and other bookkeeping
 
information.
 
  
NFILE supports two ways of transferring file data, "data stream mode"
+
  DATA CONNECTIONS
and "direct access mode".  A single mode is associated with each
 
opening.  Note that an NFILE dialogue can have more than one opening,
 
and thus use both modes.
 
  
DATA STREAM MODE:
+
  Data connections are established and discarded at user request, by
 +
  means of two NFILE commands:  DATA-CONNECTION and UNDATA-CONNECTION.
 +
  Each data connection is associated with a specific control
 +
  connection, which is the same control connection that caused the data
 +
  connection to be established.
  
Data stream mode of file transfer is the default mode of NFILE's OPEN
+
  Each data connection is composed of two "data channels".  Each data
commandData stream mode is appropriate when the entire file is
+
  channel is capable of sending data in one directionThe term "input
transferred, either from user to server, or from server to user.
+
  channel" refers to the data channel that transmits data from the
Data stream mode is used more often than direct access mode.
+
  server to the user side; "output channel" refers to the data channel
 +
  that transmits data from the user to the server side.  Throughout the
 +
  NFILE documentation, the terms "input channel" and "output channel"
 +
  are seen from the perspective of the user side. A single data
 +
  channel can be used for one data transfer after another.
  
 +
  The format of the data transferred on the data channels is defined as
 +
  a "token list data stream".  See the section "Token List Data
 +
  Stream", section 11.3. When the end of data is reached, the keyword
 +
  token EOF is sent.  Occasionally, token lists are transmitted over
 +
  the data channels, such as asynchronous error descriptions.
  
 +
5.  NFILE FILE OPENING MODES
  
 +
  The NFILE OPEN command opens a file for reading, writing, or "direct
 +
  access" at the server host.  That means, in general, asking the host
 +
  file system to access the file and obtaining a file number, pointer,
 +
  or other quantity for subsequent rapid access to the file; this is
 +
  called an "opening".  The term "opening" translates to a file stream
 +
  in Symbolics terminology, a JFN in TOPS-20 terminology, and a file
 +
  descriptor in UNIX terminology.  An opening usually keeps track of
 +
  how many bytes have been read or written, and other bookkeeping
 +
  information.
  
 +
  NFILE supports two ways of transferring file data, "data stream mode"
 +
  and "direct access mode".  A single mode is associated with each
 +
  opening.  Note that an NFILE dialogue can have more than one opening,
 +
  and thus use both modes.
  
 +
  DATA STREAM MODE:
  
 +
  Data stream mode of file transfer is the default mode of NFILE's OPEN
 +
  command.  Data stream mode is appropriate when the entire file is
 +
  transferred, either from user to server, or from server to user.
 +
  Data stream mode is used more often than direct access mode.
  
The OPEN command includes a "handle" argument, which identifies the
 
data channel to be used to transfer the data.  The handle is used in
 
subsequent commands to reference this particular opening.  When a
 
data stream opening is requested with the OPEN command, the file is
 
opened and the data begins to flow immediately.
 
  
The sending side transmits the entire contents of the specified file
 
over the specified data channel as rapidly as the network permits.
 
When the sending side reaches the end of the file, it transmits a
 
special control token to signal end of file.  The receiving side
 
expects an uninterrupted stream of bytes to appear immediately on its
 
side of the data channel.
 
  
The user gives the CLOSE command to terminate a data stream transfer.
 
CLOSE results in closing the file.
 
  
DIRECT ACCESS MODE:
 
  
Direct access mode enables reading or writing data from a given
+
Greenberg & Keene                                              [Page 7]
starting point in a file through a specified number of bytes.  In
 
direct access mode, data is requested and sent in individual
 
transactions.  To request a direct access mode opening, the OPEN
 
command is used with a DIRECT-FILE-ID argument.  (In data stream
 
mode, no DIRECT-FILE-ID is supplied.)  The direct file identifier is
 
used in subsequent commands to reference the direct access opening.
 
  
When a file is opened in direct access mode, the flow of data does
+
RFC 1037            NFILE - A File Access Protocol        December 1987
not start immediately.  Rather, the user gives either a READ command
 
(to request data to flow from server to user) or a DIRECT-OUTPUT
 
command (to request data to flow from user to server).  When reading,
 
the READ command allows the user to specify the starting point and
 
the number of bytes of data to transfer.  When writing, the FILEPOS
 
command can be used to specify the starting point, before the
 
DIRECT-OUTPUT command is given.  The user can give many READ and
 
DIRECT-OUTPUT commands, one after another.
 
  
The user side terminates the direct access transfer by using the
 
CLOSE command.  The ABORT command can be given to terminate without
 
transmitting all of the specified bytes.
 
  
 +
  The OPEN command includes a "handle" argument, which identifies the
 +
  data channel to be used to transfer the data.  The handle is used in
 +
  subsequent commands to reference this particular opening.  When a
 +
  data stream opening is requested with the OPEN command, the file is
 +
  opened and the data begins to flow immediately.
  
 +
  The sending side transmits the entire contents of the specified file
 +
  over the specified data channel as rapidly as the network permits.
 +
  When the sending side reaches the end of the file, it transmits a
 +
  special control token to signal end of file.  The receiving side
 +
  expects an uninterrupted stream of bytes to appear immediately on its
 +
  side of the data channel.
  
 +
  The user gives the CLOSE command to terminate a data stream transfer.
 +
  CLOSE results in closing the file.
  
 +
  DIRECT ACCESS MODE:
  
 +
  Direct access mode enables reading or writing data from a given
 +
  starting point in a file through a specified number of bytes.  In
 +
  direct access mode, data is requested and sent in individual
 +
  transactions.  To request a direct access mode opening, the OPEN
 +
  command is used with a DIRECT-FILE-ID argument.  (In data stream
 +
  mode, no DIRECT-FILE-ID is supplied.)  The direct file identifier is
 +
  used in subsequent commands to reference the direct access opening.
  
 +
  When a file is opened in direct access mode, the flow of data does
 +
  not start immediately.  Rather, the user gives either a READ command
 +
  (to request data to flow from server to user) or a DIRECT-OUTPUT
 +
  command (to request data to flow from user to server).  When reading,
 +
  the READ command allows the user to specify the starting point and
 +
  the number of bytes of data to transfer.  When writing, the FILEPOS
 +
  command can be used to specify the starting point, before the
 +
  DIRECT-OUTPUT command is given.  The user can give many READ and
 +
  DIRECT-OUTPUT commands, one after another.
  
 +
  The user side terminates the direct access transfer by using the
 +
  CLOSE command.  The ABORT command can be given to terminate without
 +
  transmitting all of the specified bytes.
  
  
Line 429: Line 443:
  
  
== NFILE CHARACTER SET ==
 
  
The NFILE character set <1> is an extension of standard ASCII.  NFILE
 
command and response names use only the standard ASCII characters.
 
However, the protocol supports the transfer of the non-ASCII
 
characters in the NFILE character set; these characters might be
 
stored in files, or might be used in pathnames.
 
  
Servers on machines that do not natively use the NFILE character set
 
must perform character set translations for character openings,
 
depending on the requested translation mode.  No translation is
 
required for binary openings.  There are three translation modes for
 
character openings:  NORMAL, RAW, and SUPER-IMAGE.  Each mode
 
specifies a way to translate between the server's native set and the
 
NFILE character set.
 
  
NORMAL mode is the default of the OPEN command.  The translation for
 
NORMAL mode ensures that a file containing characters in the NFILE
 
character set can be written to a remote host and read back intact.
 
OPEN has optional keyword arguments to specify RAW or SUPER-IMAGE.
 
RAW mode means to perform no translation whatsoever.  SUPER-IMAGE
 
mode is intended for use by PDP-10 family machines only.  It is
 
included largely as an illustration of a system-dependent extension.
 
  
The details of each translation mode are given in Appendices:
 
  
      See the section "NORMAL Translation Mode", Appendix A.  See the
+
Greenberg & Keene                                              [Page 8]
      section "RAW Translation Mode", Appendix B.  See the section
 
      "SUPER-IMAGE Translation Mode", Appendix C.
 
  
The use of the NFILE character set brings up a difficulty involved
+
RFC 1037            NFILE - A File Access Protocol        December 1987
with determining an exact position within a character file.  Some
 
NFILE characters expand to more than one native character on some
 
servers.  Thus, for character files, when we speak of a given
 
position in a file or the length of a file, we must specify whether
 
we are speaking in "NFILE units" or "server units", because the
 
counting of characters is different.  This causes major problems in
 
file position reckoning for character files.  Specifically, it is
 
futile for a user side to carefully monitor file position during
 
output by counting characters, when character translation is in
 
effect.  The server's operating system interface for "position to
 
point x in a file" necessarily operates in server units, but the user
 
side has counted in NFILE units.  The user side cannot try to
 
second-guess the translation-counting process without losing host-
 
independence.  See the section "FILEPOS NFILE Command".
 
  
  
 +
6.  NFILE CHARACTER SET
  
 +
  The NFILE character set <1> is an extension of standard ASCII.  NFILE
 +
  command and response names use only the standard ASCII characters.
 +
  However, the protocol supports the transfer of the non-ASCII
 +
  characters in the NFILE character set; these characters might be
 +
  stored in files, or might be used in pathnames.
  
 +
  Servers on machines that do not natively use the NFILE character set
 +
  must perform character set translations for character openings,
 +
  depending on the requested translation mode.  No translation is
 +
  required for binary openings.  There are three translation modes for
 +
  character openings:  NORMAL, RAW, and SUPER-IMAGE.  Each mode
 +
  specifies a way to translate between the server's native set and the
 +
  NFILE character set.
  
 +
  NORMAL mode is the default of the OPEN command.  The translation for
 +
  NORMAL mode ensures that a file containing characters in the NFILE
 +
  character set can be written to a remote host and read back intact.
 +
  OPEN has optional keyword arguments to specify RAW or SUPER-IMAGE.
 +
  RAW mode means to perform no translation whatsoever.  SUPER-IMAGE
 +
  mode is intended for use by PDP-10 family machines only.  It is
 +
  included largely as an illustration of a system-dependent extension.
  
 +
  The details of each translation mode are given in Appendices:
  
 +
        See the section "NORMAL Translation Mode", Appendix A.  See the
 +
        section "RAW Translation Mode", Appendix B.  See the section
 +
        "SUPER-IMAGE Translation Mode", Appendix C.
  
== CONVENTIONS USED IN THIS DOCUMENT ==
+
  The use of the NFILE character set brings up a difficulty involved
 +
  with determining an exact position within a character file.  Some
 +
  NFILE characters expand to more than one native character on some
 +
  servers.  Thus, for character files, when we speak of a given
 +
  position in a file or the length of a file, we must specify whether
 +
  we are speaking in "NFILE units" or "server units", because the
 +
  counting of characters is different.  This causes major problems in
 +
  file position reckoning for character files.  Specifically, it is
 +
  futile for a user side to carefully monitor file position during
 +
  output by counting characters, when character translation is in
 +
  effect.  The server's operating system interface for "position to
 +
  point x in a file" necessarily operates in server units, but the user
 +
  side has counted in NFILE units.  The user side cannot try to
 +
  second-guess the translation-counting process without losing host-
 +
  independence.  See the section "FILEPOS NFILE Command".
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
Greenberg & Keene                                              [Page 9]
 +
 
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
 +
 
 +
 
 +
7.  CONVENTIONS USED IN THIS DOCUMENT
  
 
7.1  Mapping Data Types Into Token List Representation
 
7.1  Mapping Data Types Into Token List Representation
  
Throughout this NFILE specification, the data types of arguments,
+
  Throughout this NFILE specification, the data types of arguments,
return values, asynchronous error descriptions, and notifications are
+
  return values, asynchronous error descriptions, and notifications are
described as being strings, integers, dates, time intervals, and so
+
  described as being strings, integers, dates, time intervals, and so
on.  However, each conceptual data type must be mapped into the
+
  on.  However, each conceptual data type must be mapped into the
appropriate token list representation for transmission.  The mapping
+
  appropriate token list representation for transmission.  The mapping
of conceptual data types to token list representation is shown here:
+
  of conceptual data types to token list representation is shown here:
  
Conceptual Type    Token List Representation
+
    Conceptual Type    Token List Representation
  
----------------------------------------------------------------
+
    ----------------------------------------------------------------
  
Keyword            A keyword token
+
    Keyword            A keyword token
  
Keyword list        A token list of keyword tokens
+
    Keyword list        A token list of keyword tokens
  
Integer            A numeric data token
+
    Integer            A numeric data token
  
String              A data token containing the characters of the
+
    String              A data token containing the characters of the
                    string in the NFILE character set.
+
                        string in the NFILE character set.
  
Boolean Truth      The token known as BOOLEAN-TRUTH.
+
    Boolean Truth      The token known as BOOLEAN-TRUTH.
  
Boolean False      The empty token list.
+
    Boolean False      The empty token list.
  
Date                A numeric data token.  The date is expressed in
+
    Date                A numeric data token.  The date is expressed in
                    Universal Time format, which measures a time as
+
                        Universal Time format, which measures a time as
                    the number of seconds since January 1, 1900, at
+
                        the number of seconds since January 1, 1900, at
                    midnight GMT.
+
                        midnight GMT.
  
Date-or-never      Can be either a date or the empty token list,
+
    Date-or-never      Can be either a date or the empty token list,
                    representing "never".  "Never" is used for
+
                        representing "never".  "Never" is used for
                    values such as the time a directory was last
+
                        values such as the time a directory was last
                    expunged, if it has never been expunged.
+
                        expunged, if it has never been expunged.
  
Time interval      A numeric data token.  The time interval is
+
    Time interval      A numeric data token.  The time interval is
                    expressed in seconds.  A time interval
+
                        expressed in seconds.  A time interval
                    indicating "never" is represented by the empty
+
                        indicating "never" is represented by the empty
                    token list.
+
                        token list.
  
 
7.2  Format of NFILE Commands and Responses
 
7.2  Format of NFILE Commands and Responses
  
Each command description begins by giving the command format and
+
  Each command description begins by giving the command format and
response format.  Here is the beginning of the DATA-CONNECTION
+
  response format.  Here is the beginning of the DATA-CONNECTION
command description:
+
  command description:
 +
 
  
  
 +
Greenberg & Keene                                              [Page 10]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
Command:  (DATA-CONNECTION tid new-input-handle new-output-handle)
+
  Command:  (DATA-CONNECTION tid new-input-handle new-output-handle)
  
Response: (DATA-CONNECTION tid connection-identifier)
+
  Response: (DATA-CONNECTION tid connection-identifier)
  
The command descriptions follow these conventions:
+
  The command descriptions follow these conventions:
  
1. NFILE commands and responses are transmitted as top-level token
+
    1. NFILE commands and responses are transmitted as top-level token
    lists.
+
      lists.
  
    Top-level token lists are enclosed in parentheses in these
+
      Top-level token lists are enclosed in parentheses in these
    command descriptions.  These parentheses are not sent literally
+
      command descriptions.  These parentheses are not sent literally
    across the control or data connections, but are a shorthand
+
      across the control or data connections, but are a shorthand
    representation of special control tokens that delimit top-level
+
      representation of special control tokens that delimit top-level
    token lists.  Specifically, TOP-LEVEL-LIST-BEGIN starts a top-
+
      token lists.  Specifically, TOP-LEVEL-LIST-BEGIN starts a top-
    level token list; TOP-LEVEL-LIST-END ends a top-level token list.
+
      level token list; TOP-LEVEL-LIST-END ends a top-level token list.
  
2. NFILE command names are keywords.
+
    2. NFILE command names are keywords.
  
    The command name is required in every command and command
+
      The command name is required in every command and command
    response.  All NFILE command names are keywords.  Keywords appear
+
      response.  All NFILE command names are keywords.  Keywords appear
    in the NFILE documentation as their names in uppercase.  For
+
      in the NFILE documentation as their names in uppercase.  For
    example, DATA-CONNECTION and DELETE are two command names.
+
      example, DATA-CONNECTION and DELETE are two command names.
  
3. A unique transaction identifier (tid) identifies each command.
+
    3. A unique transaction identifier (tid) identifies each command.
  
    The transaction identifier is a string made up by the user side
+
      The transaction identifier is a string made up by the user side
    to identify this particular transaction, which is composed of the
+
      to identify this particular transaction, which is composed of the
    command and the response associated with this command.  The
+
      command and the response associated with this command.  The
    transaction identifier is abbreviated in the command descriptions
+
      transaction identifier is abbreviated in the command descriptions
    as tid.  Transaction identifiers are limited to fifteen
+
      as tid.  Transaction identifiers are limited to fifteen
    characters in length.  The transaction identifier is required in
+
      characters in length.  The transaction identifier is required in
    every command and command response.
+
      every command and command response.
  
OPTIONAL ARGUMENTS
+
  OPTIONAL ARGUMENTS
  
Many NFILE commands have "optional arguments".  Optional arguments
+
  Many NFILE commands have "optional arguments".  Optional arguments
can be supplied (with appropriate values), or left out.  If optional
+
  can be supplied (with appropriate values), or left out.  If optional
arguments are left out, their omission must be made explicit by means
+
  arguments are left out, their omission must be made explicit by means
of substituting the empty token list in their place.  The only
+
  of substituting the empty token list in their place.  The only
exception to that rule is for trailing optional arguments or return
+
  exception to that rule is for trailing optional arguments or return
values, which can be omitted without including the empty token list.
+
  values, which can be omitted without including the empty token list.
  
For example, the text of the DELETE command description explains that
+
  For example, the text of the DELETE command description explains that
either a handle or a pathname must be supplied, but not both;
+
  either a handle or a pathname must be supplied, but not both;
therefore, one of them is an optional argument.  Here is the command
+
  therefore, one of them is an optional argument.  Here is the command
format of DELETE:
+
  format of DELETE:
  
      (DELETE tid handle pathname)
+
        (DELETE tid handle pathname)
  
  
  
 +
Greenberg & Keene                                              [Page 11]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
If you supply a handle and no pathname, the command format is:
 
  
      (DELETE tid handle)
+
    If you supply a handle and no pathname, the command format is:
  
If you supply a pathname and no handle, the command format is:
+
        (DELETE tid handle)
  
      (DELETE tid empty-token-list pathname)
+
    If you supply a pathname and no handle, the command format is:
  
The empty token list in the token list stream appears as a LIST-BEGIN
+
        (DELETE tid empty-token-list pathname)
followed immediately by a LIST-END.
 
  
OPTIONAL KEYWORD/VALUE PAIRS
+
  The empty token list in the token list stream appears as a LIST-BEGIN
 +
  followed immediately by a LIST-END.
  
Four NFILE commands have "optional keyword/value pairs".  These
+
  OPTIONAL KEYWORD/VALUE PAIRS
commands are: COMPLETE, LOGIN, OPEN, and READ.  Optional
 
keyword/value pairs can be either included in the command or omitted
 
entirely.  There is no need to substitute the empty token list for
 
ommitted optional keyword tokens, unlike optional arguments.  The
 
order of the option keyword/value pairs is not significant.
 
  
If included, optional keyword/value pairs are a sequence of
+
  Four NFILE commands have "optional keyword/value pairs".  These
alternating keywords and valuesThe values associated with the
+
  commands are: COMPLETE, LOGIN, OPEN, and READOptional
keywords can be keywords, lists, strings, Booleans, integers, dates,
+
  keyword/value pairs can be either included in the command or omitted
date-or-never's, and time intervals.  The text of each command
+
  entirely.  There is no need to substitute the empty token list for
description states what type of value is appropriate for each
+
  ommitted optional keyword tokens, unlike optional arguments.  The
optional keyword.
+
  order of the option keyword/value pairs is not significant.
  
Optional keyword/value pairs appear in the text as the keyword only,
+
  If included, optional keyword/value pairs are a sequence of
in uppercase lettersFor example, here is the format of the LOGIN
+
  alternating keywords and values.  The values associated with the
command:
+
  keywords can be keywords, lists, strings, Booleans, integers, dates,
 +
  date-or-never's, and time intervalsThe text of each command
 +
  description states what type of value is appropriate for each
 +
  optional keyword.
  
Command Format:
+
  Optional keyword/value pairs appear in the text as the keyword only,
 +
  in uppercase letters.  For example, here is the format of the LOGIN
 +
  command:
  
      (LOGIN tid user password FILE-SYSTEM USER-VERSION)
+
  Command Format:
  
FILE-SYSTEM and USER-VERSION are two optional keywords associated
+
        (LOGIN tid user password FILE-SYSTEM USER-VERSION)
with the LOGIN command.  The user side can supply USER-VERSION, and
 
omit FILE-SYSTEM as shown in this example:
 
  
      (LOGIN x105 tjones let-me-in USER-VERSION 2)
+
  FILE-SYSTEM and USER-VERSION are two optional keywords associated
 +
  with the LOGIN command.  The user side can supply USER-VERSION, and
 +
  omit FILE-SYSTEM as shown in this example:
  
As seen above, the optional keyword/value pair USER-VERSION, if
+
        (LOGIN x105 tjones let-me-in USER-VERSION 2)
supplied in a command, consists of the keyword USER-VERSION followed
 
by the value to be used for that keyword (in this example, 2).
 
  
 +
  As seen above, the optional keyword/value pair USER-VERSION, if
 +
  supplied in a command, consists of the keyword USER-VERSION followed
 +
  by the value to be used for that keyword (in this example, 2).
  
  
Line 639: Line 671:
  
  
 +
 +
Greenberg & Keene                                              [Page 12]
 +
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 
7.3  Data Channel Handles and Direct File Identifiers
 
7.3  Data Channel Handles and Direct File Identifiers
  
Several NFILE commands require an argument that specifies an opening.
+
  Several NFILE commands require an argument that specifies an opening.
This kind of argument is called a handle in the command description.
+
  This kind of argument is called a handle in the command description.
It is always a string type argument.  A handle can be either a data
+
  It is always a string type argument.  A handle can be either a data
channel handle or a direct file identifier, depending on the mode of
+
  channel handle or a direct file identifier, depending on the mode of
the opening:
+
  the opening:
  
  
Data Stream
+
  Data Stream
  
The handle must identify a data channel that is bound to an opening.
+
  The handle must identify a data channel that is bound to an opening.
  
Direct Access
+
  Direct Access
  
In general, the handle must be a direct file identifier.  A direct
+
  In general, the handle must be a direct file identifier.  A direct
file identifier specifies a direct access opening.  It is the same as
+
  file identifier specifies a direct access opening.  It is the same as
the value supplied in the DIRECT-FILE-ID keyword/value pair in the
+
  the value supplied in the DIRECT-FILE-ID keyword/value pair in the
OPEN command.  It is used for all operations that identify an opening
+
  OPEN command.  It is used for all operations that identify an opening
rather than a data channel.
+
  rather than a data channel.
  
Two NFILE commands applicable to direct access openings are
+
  Two NFILE commands applicable to direct access openings are
exceptions to the general rule.  The handle supplied in ABORT and
+
  exceptions to the general rule.  The handle supplied in ABORT and
CONTINUE cannot be a direct file identifier, but must be a data
+
  CONTINUE cannot be a direct file identifier, but must be a data
channel handle instead.
+
  channel handle instead.
  
 
7.4  Syntax of File and Directory Pathname Arguments
 
7.4  Syntax of File and Directory Pathname Arguments
  
Some arguments and return values in the NFILE command descriptions
+
  Some arguments and return values in the NFILE command descriptions
represent file pathnames.  These are strings in the pathname syntax
+
  represent file pathnames.  These are strings in the pathname syntax
native to the server host.  These pathnames contain no host
+
  native to the server host.  These pathnames contain no host
identifiers of any kind.  These pathnames must be fully defaulted, in
+
  identifiers of any kind.  These pathnames must be fully defaulted, in
the sense that they have a directory and file name (and file type, if
+
  the sense that they have a directory and file name (and file type, if
the server operating system supports file types).  If appropriate, a
+
  the server operating system supports file types).  If appropriate, a
device is referenced in the pathname.  If the server file system
+
  device is referenced in the pathname.  If the server file system
supports version numbers, there is always an explicit version number,
+
  supports version numbers, there is always an explicit version number,
even if that number or other specification is that system's
+
  even if that number or other specification is that system's
representation of "newest" or "oldest".
+
  representation of "newest" or "oldest".
 +
 
  
  
Line 691: Line 728:
  
  
 +
Greenberg & Keene                                              [Page 13]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
Here are some examples of file pathnames, for different server hosts:
+
  Here are some examples of file pathnames, for different server hosts:
  
Server Host    Example of File Pathname
+
  Server Host    Example of File Pathname
  
------------------------------------------------------------
+
  ------------------------------------------------------------
  
  UNIX            /usr/max/life.c
+
      UNIX            /usr/max/life.c
  
  TOPS-20        ps:<max>life.bin.17
+
      TOPS-20        ps:<max>life.bin.17
  
  VMS            MACD:[MAX]LIFE.FOR;3
+
      VMS            MACD:[MAX]LIFE.FOR;3
  
  Symbolics LMFS  >max>life.lisp.newest
+
      Symbolics LMFS  >max>life.lisp.newest
  
------------------------------------------------------------
+
  ------------------------------------------------------------
  
The CREATE-DIRECTORY and HOME-DIRECTORY commands take a directory as
+
  The CREATE-DIRECTORY and HOME-DIRECTORY commands take a directory as
an argument.  In NFILE commands, a directory is represented by a
+
  an argument.  In NFILE commands, a directory is represented by a
string that names the directory.  In most cases this string is in the
+
  string that names the directory.  In most cases this string is in the
syntax native to the server host.  However in some cases the native
+
  syntax native to the server host.  However in some cases the native
format is modified somewhat to clarify that the string names a
+
  format is modified somewhat to clarify that the string names a
directory, and not a file.  For example, a directory on UNIX is
+
  directory, and not a file.  For example, a directory on UNIX is
represented by "/usr/max/", not "/usr/max".
+
  represented by "/usr/max/", not "/usr/max".
  
Here are some examples of directory pathnames for different server
+
  Here are some examples of directory pathnames for different server
hosts:
+
  hosts:
  
Server Host    Example of Directory Pathname
+
  Server Host    Example of Directory Pathname
  
------------------------------------------------------------
+
  ------------------------------------------------------------
  
  UNIX            /usr/max/
+
      UNIX            /usr/max/
  
  TOPS-20        <max>
+
      TOPS-20        <max>
  
  VMS            MACD:[MAX]
+
      VMS            MACD:[MAX]
  
  Symbolics LMFS  >max>hacks>
+
      Symbolics LMFS  >max>hacks>
  
------------------------------------------------------------
+
  ------------------------------------------------------------
  
 
7.5  Format of NFILE File Property/Value Pairs
 
7.5  Format of NFILE File Property/Value Pairs
  
Several NFILE commands request information regarding the properties
+
  Several NFILE commands request information regarding the properties
of files or directories.  These commands include:  DIRECTORY,
+
  of files or directories.  These commands include:  DIRECTORY,
MULTIPLE-FILE-PLISTS, PROPERTIES, and CHANGE-PROPERTIES.  This
+
  MULTIPLE-FILE-PLISTS, PROPERTIES, and CHANGE-PROPERTIES.  This
section describes how file property information is conveyed over the
+
  section describes how file property information is conveyed over the
token list stream.
+
  token list stream.
 +
 
 +
 
  
 +
Greenberg & Keene                                              [Page 14]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
  File property information is usually sent in property/value pairs,
 +
  where the property identifies the property, and the following value
 +
  gives the value of that property for the specified file.
  
File property information is usually sent in property/value pairs,
+
  Each property is denoted either by a keyword or an integer.  You can
where the property identifies the property, and the following value
+
  mix both ways of specifying properties (keyword or integer) within a
gives the value of that property for the specified file.
+
  single description.  An integer is interpreted as an index into the
 +
  Property Index Table, an array of property keywords.  The server can
 +
  optionally send a Property Index Table to the user during the
 +
  execution of the LOGIN command, although it is not required.  This
 +
  greatly reduces the length of transmissions.
  
Each property is denoted either by a keyword or an integer.  You can
+
  In command arguments, file properties cannot be specified with
mix both ways of specifying properties (keyword or integer) within a
+
  integers; keywords must be used to specify file properties in command
single description.  An integer is interpreted as an index into the
+
  argumentsIntegers can be used to denote file properties only in
Property Index Table, an array of property keywordsThe server can
+
  command responses.
optionally send a Property Index Table to the user during the
 
execution of the LOGIN command, although it is not required.  This
 
greatly reduces the length of transmissions.
 
  
In command arguments, file properties cannot be specified with
+
  We now list the keywords associated with file properties.  This list
integers; keywords must be used to specify file properties in command
+
  is not intended to be restrictive.  If a programmer implementing
argumentsIntegers can be used to denote file properties only in
+
  NFILE needs a new keyword, a new keyword (not on this list) can be
command responses.
+
  inventedThe type of value of any new keywords is by default
 +
  string. The keywords are sorted here by conceptual data type:
  
We now list the keywords associated with file properties.  This list
+
    Data type      Keywords denoting file properties
is not intended to be restrictive.  If a programmer implementing
 
NFILE needs a new keyword, a new keyword (not on this list) can be
 
invented.  The type of value of any new keywords is by default
 
string.  The keywords are sorted here by conceptual data type:
 
  
Data type      Keywords denoting file properties
+
  ----------------------------------------------------------------
  
----------------------------------------------------------------
+
    Integers        BLOCK-SIZE, BYTE-SIZE, GENERATION-RETENTION-COUNT,
 +
                    LENGTH-IN-BLOCKS, LENGTH-IN-BYTES,
 +
                    DEFAULT-GENERATION-RETENTION-COUNT
  
Integers        BLOCK-SIZE, BYTE-SIZE, GENERATION-RETENTION-COUNT,
+
    Dates          CREATION-DATE, MODIFICATION-DATE
                LENGTH-IN-BLOCKS, LENGTH-IN-BYTES,
 
                DEFAULT-GENERATION-RETENTION-COUNT
 
  
Dates          CREATION-DATE, MODIFICATION-DATE
+
    Date-or-never's REFERENCE-DATE, INCREMENTAL-DUMP-DATE,
 +
                    COMPLETE-DUMP-DATE, DATE-LAST-EXPUNGED,
 +
                    EXPIRATION-DATE
  
  Date-or-never's REFERENCE-DATE, INCREMENTAL-DUMP-DATE,
+
    Time intervals AUTO-EXPUNGE-INTERVAL
                COMPLETE-DUMP-DATE, DATE-LAST-EXPUNGED,
 
                EXPIRATION-DATE
 
  
Time intervals  AUTO-EXPUNGE-INTERVAL
+
    Keyword Lists  SETTABLE-PROPERTIES, LINK-TRANSPARENCIES,
 +
                    DEFAULT-LINK-TRANSPARENCIES
  
  Keyword Lists  SETTABLE-PROPERTIES, LINK-TRANSPARENCIES,
+
    Boolean values DELETED, DONT-DELETE, DONT-DUMP, DONT-REAP,
                DEFAULT-LINK-TRANSPARENCIES
+
                    SUPERSEDE-PROTECT, NOT-BACKED-UP, OFFLINE,
 +
                    TEMPORARY, CHARACTERS, DIRECTORY
  
Boolean values  DELETED, DONT-DELETE, DONT-DUMP, DONT-REAP,
 
                SUPERSEDE-PROTECT, NOT-BACKED-UP, OFFLINE,
 
                TEMPORARY, CHARACTERS, DIRECTORY
 
  
  
Line 797: Line 840:
  
  
 +
Greenberg & Keene                                              [Page 15]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
Strings        ACCOUNT, AUTHOR, LINK-TO, PHYSICAL-VOLUME,
+
    Strings        ACCOUNT, AUTHOR, LINK-TO, PHYSICAL-VOLUME,
                PROTECTION, VOLUME-NAME, PACK-NUMBER, READER,
+
                    PROTECTION, VOLUME-NAME, PACK-NUMBER, READER,
                DISK-SPACE-DESCRIPTION, and any keywords not
+
                    DISK-SPACE-DESCRIPTION, and any keywords not
                on this list
+
                    on this list
  
Note that these keyword names are intended to imply the semantics of
+
  Note that these keyword names are intended to imply the semantics of
the properties.  For a discussion of the semantics of CREATION-DATE:
+
  the properties.  For a discussion of the semantics of CREATION-DATE:
See the section "NFILE OPEN Response Return Values", section 8.20.2.
+
  See the section "NFILE OPEN Response Return Values", section 8.20.2.
The "Reference Guide to Streams, Files, and I/O" in the Symbolics
+
  The "Reference Guide to Streams, Files, and I/O" in the Symbolics
documentation set details the semantics that Symbolics associates
+
  documentation set details the semantics that Symbolics associates
with these properties.
+
  with these properties.
  
== NFILE COMMANDS ==
+
8.  NFILE COMMANDS
  
It is important to understand the conventions used in each of the
+
  It is important to understand the conventions used in each of the
following command descriptions.  See the section "Conventions Used in
+
  following command descriptions.  See the section "Conventions Used in
This Document", section 7.
+
  This Document", section 7.
  
 
8.1  ABORT Command
 
8.1  ABORT Command
  
Command:  (ABORT tid input-handle)
+
  Command:  (ABORT tid input-handle)
  
Response: (ABORT tid)
+
  Response: (ABORT tid)
  
ABORT cleanly interrupts and prematurely terminates a single direct
+
  ABORT cleanly interrupts and prematurely terminates a single direct
access mode data transfer initiated with READ.  The required input-
+
  access mode data transfer initiated with READ.  The required input-
handle string argument identifies a data channel on which an input
+
  handle string argument identifies a data channel on which an input
transfer is currently taking place; this must be a direct access
+
  transfer is currently taking place; this must be a direct access
transfer.  input-handle must identify a data channel; it cannot be a
+
  transfer.  input-handle must identify a data channel; it cannot be a
direct file identifier.
+
  direct file identifier.
  
Upon receiving the ABORT command, the server checks to see if a
+
  Upon receiving the ABORT command, the server checks to see if a
transfer is still active on that channel.  If so, the server
+
  transfer is still active on that channel.  If so, the server
terminates the transfer by telling the data connection logical
+
  terminates the transfer by telling the data connection logical
process to stop transferring bytes of data.  The user side needs to
+
  process to stop transferring bytes of data.  The user side needs to
issue this command only when there are outstanding unread bytes.
+
  issue this command only when there are outstanding unread bytes.
This excludes the case of the data channel having been disestablished
+
  This excludes the case of the data channel having been disestablished
or reallocated by the user side.
+
  or reallocated by the user side.
  
Whether or not a transfer is active on that channel, the user side
+
  Whether or not a transfer is active on that channel, the user side
puts the data channel into the unsafe state.  Before the data channel
+
  puts the data channel into the unsafe state.  Before the data channel
can be used again, it must be resynchronized.
+
  can be used again, it must be resynchronized.
  
 
8.2  CHANGE-PROPERTIES Command
 
8.2  CHANGE-PROPERTIES Command
  
Command:  (CHANGE-PROPERTIES tid handle pathname property-pairs)
+
  Command:  (CHANGE-PROPERTIES tid handle pathname property-pairs)
 +
 
 +
  Response: (CHANGE-PROPERTIES tid)
  
Response: (CHANGE-PROPERTIES tid)
 
  
  
 +
Greenberg & Keene                                              [Page 16]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
CHANGE-PROPERTIES changes one or more properties of a file.  Either a
+
  CHANGE-PROPERTIES changes one or more properties of a file.  Either a
handle or a pathname must be given, but not both.  Whichever one is
+
  handle or a pathname must be given, but not both.  Whichever one is
given must be supplied as a string.  handle identifies a data channel
+
  given must be supplied as a string.  handle identifies a data channel
that is bound to an open file; it can be a direct file identifier.
+
  that is bound to an open file; it can be a direct file identifier.
pathname identifies a file on the server machine.
+
  pathname identifies a file on the server machine.
  
property-pairs is a required token list of keyword/value pairs, where
+
  property-pairs is a required token list of keyword/value pairs, where
the name of the property to be changed is the keyword, and the
+
  the name of the property to be changed is the keyword, and the
desired new property value is the value.
+
  desired new property value is the value.
  
The properties that can be changed are host-dependent, as are any
+
  The properties that can be changed are host-dependent, as are any
restrictions on the values of those properties.  The properties that
+
  restrictions on the values of those properties.  The properties that
can be changed are the same as those returned as settable-properties,
+
  can be changed are the same as those returned as settable-properties,
in the command response for the PROPERTIES command.
+
  in the command response for the PROPERTIES command.
  
The server tries to modify all the properties listed in property-
+
  The server tries to modify all the properties listed in property-
pairs to the desired new values.  There is currently no definition
+
  pairs to the desired new values.  There is currently no definition
about what should be done if the server can successfully change some
+
  about what should be done if the server can successfully change some
properties but not others.
+
  properties but not others.
  
For further information on file property keywords and associated
+
  For further information on file property keywords and associated
values:  See the section "Format of NFILE File Property/Value Pairs",
+
  values:  See the section "Format of NFILE File Property/Value Pairs",
section 7.5.
+
  section 7.5.
  
 
8.3  CLOSE Command
 
8.3  CLOSE Command
  
Command:  (CLOSE tid handle abort-p)
+
  Command:  (CLOSE tid handle abort-p)
  
Response: (CLOSE tid truename binary-p other-properties)
+
  Response: (CLOSE tid truename binary-p other-properties)
  
CLOSE terminates a data transfer, and frees a data channel.  The
+
  CLOSE terminates a data transfer, and frees a data channel.  The
handle must be a data channel handle for a data stream opening, or a
+
  handle must be a data channel handle for a data stream opening, or a
direct file identifier for a direct access opening.  If a data
+
  direct file identifier for a direct access opening.  If a data
channel is given, a transfer must be active on that handle.  If
+
  channel is given, a transfer must be active on that handle.  If
abort-p is supplied as Boolean truth, the file is close-aborted, as
+
  abort-p is supplied as Boolean truth, the file is close-aborted, as
described below.
+
  described below.
  
"Closing the file" has different implications specific to each
+
  "Closing the file" has different implications specific to each
operating system.  It generally implies invalidation of the pointer
+
  operating system.  It generally implies invalidation of the pointer
or logical identifier obtained from the operating system when the
+
  or logical identifier obtained from the operating system when the
file was "opened", and freeing of operating system and/or job
+
  file was "opened", and freeing of operating system and/or job
resources associated with active file access.  For output files, it
+
  resources associated with active file access.  For output files, it
involves ensuring that every last bit sent by the user has been
+
  involves ensuring that every last bit sent by the user has been
successfully written to disk.  The server should not send a
+
  successfully written to disk.  The server should not send a
successful response until all these things have completed
+
  successful response until all these things have completed
successfully.
+
  successfully.
  
  
Line 904: Line 952:
  
  
 +
Greenberg & Keene                                              [Page 17]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
In either data stream or direct access mode, the user can request the
 
server to close-abort the file, instead of simply closing it.  To
 
close-abort a file means to close it in such a way, if possible, that
 
it is as if the file had never been opened.  In the specific case of
 
a file being created, it must appear as if the file had never been
 
created.  This might be more difficult to implement on certain
 
operating systems than others, but tricks with temporary names and
 
close-time renamings by the server can usually be used to implement
 
close-abort in these cases.  In the case of a file being appended to,
 
close-abort means to forget the appended data.
 
  
AN UNSUCCESSFUL CLOSE OPERATION
+
  In either data stream or direct access mode, the user can request the
 +
  server to close-abort the file, instead of simply closing it.  To
 +
  close-abort a file means to close it in such a way, if possible, that
 +
  it is as if the file had never been opened.  In the specific case of
 +
  a file being created, it must appear as if the file had never been
 +
  created.  This might be more difficult to implement on certain
 +
  operating systems than others, but tricks with temporary names and
 +
  close-time renamings by the server can usually be used to implement
 +
  close-abort in these cases.  In the case of a file being appended to,
 +
  close-abort means to forget the appended data.
  
For the normal CLOSE operation (not a close-abort), after writing
+
  AN UNSUCCESSFUL CLOSE OPERATION
every last bit sent by the user to disk, and before closing the file,
 
the server checks the data channel specified by handle to see if an
 
asynchronous error is outstanding on that channel.  That is, the
 
server must determine whether it has sent an asynchronous error
 
description to the user, to which the user has not yet responded with
 
a CONTINUE command.  If so, the server is unable to close the file,
 
and therefore sends a command error response indicating that an error
 
is pending on the channel.  The appropriate three-letter error code
 
is EPC.  See the section "NFILE Errors and Notifications", section
 
10.
 
  
A SUCCESSFUL CLOSE OPERATION
+
  For the normal CLOSE operation (not a close-abort), after writing
 +
  every last bit sent by the user to disk, and before closing the file,
 +
  the server checks the data channel specified by handle to see if an
 +
  asynchronous error is outstanding on that channel.  That is, the
 +
  server must determine whether it has sent an asynchronous error
 +
  description to the user, to which the user has not yet responded with
 +
  a CONTINUE command.  If so, the server is unable to close the file,
 +
  and therefore sends a command error response indicating that an error
 +
  is pending on the channel.  The appropriate three-letter error code
 +
  is EPC.  See the section "NFILE Errors and Notifications", section
 +
  10.
  
The return values for OPEN and CLOSE are syntactically identical, but
+
  A SUCCESSFUL CLOSE OPERATION
the values might change between the time of the file being opened and
 
when it is closed.  For example, the truename return value is
 
supplied after all the close-time renaming of output files is done
 
and the version numbers resolved (for operating systems supporting
 
version numbers).  Therefore, on some systems the truename of a file
 
has one value at the time it is opened, and a different value when it
 
has been closed.  For a description of the CLOSE return values:  See
 
the section "NFILE OPEN Response Return Values", section 8.20.2.
 
  
If the user gives the CLOSE command with abort-p supplied as Boolean
+
  The return values for OPEN and CLOSE are syntactically identical, but
truth, thus requesting a close-abort of the file, the server need not
+
  the values might change between the time of the file being opened and
check whether an asynchronous error description is outstanding on the
+
  when it is closed.  For example, the truename return value is
channelThe server simply close-aborts the file.
+
  supplied after all the close-time renaming of output files is done
 +
  and the version numbers resolved (for operating systems supporting
 +
  version numbers).  Therefore, on some systems the truename of a file
 +
  has one value at the time it is opened, and a different value when it
 +
  has been closedFor a description of the CLOSE return values:  See
 +
  the section "NFILE OPEN Response Return Values", section 8.20.2.
  
 +
  If the user gives the CLOSE command with abort-p supplied as Boolean
 +
  truth, thus requesting a close-abort of the file, the server need not
 +
  check whether an asynchronous error description is outstanding on the
 +
  channel.  The server simply close-aborts the file.
  
  
Line 957: Line 1,007:
  
  
 +
 +
Greenberg & Keene                                              [Page 18]
 +
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 
8.4  COMPLETE Command
 
8.4  COMPLETE Command
  
Command:  (COMPLETE tid string pathname DIRECTION NEW-OK DELETED)
+
  Command:  (COMPLETE tid string pathname DIRECTION NEW-OK DELETED)
  
Response: (COMPLETE tid new-string success)
+
  Response: (COMPLETE tid new-string success)
  
COMPLETE performs file pathname completion.
+
  COMPLETE performs file pathname completion.
  
string is a partial filename typed by the user and pathname is the
+
  string is a partial filename typed by the user and pathname is the
default name against which it is being typed.  Both string and
+
  default name against which it is being typed.  Both string and
pathname are required arguments, and are of type string.  The
+
  pathname are required arguments, and are of type string.  The
remaining arguments are optional keyword/value pairs.
+
  remaining arguments are optional keyword/value pairs.
  
NEW-OK is Boolean; if followed by Boolean truth, the server should
+
  NEW-OK is Boolean; if followed by Boolean truth, the server should
allow either a file that already exists, or a file that does not yet
+
  allow either a file that already exists, or a file that does not yet
exist.  The default of NEW-OK is false; that is, the server does not
+
  exist.  The default of NEW-OK is false; that is, the server does not
consider files that do not already exist.
+
  consider files that do not already exist.
  
DELETED is a Boolean type argument; if followed by Boolean truth, the
+
  DELETED is a Boolean type argument; if followed by Boolean truth, the
server is instructed to look for files that have been deleted but not
+
  server is instructed to look for files that have been deleted but not
yet expunged, as well as non-deleted files.  The default is to ignore
+
  yet expunged, as well as non-deleted files.  The default is to ignore
soft-deleted files.
+
  soft-deleted files.
  
DIRECTION can be followed by READ, to indicate that the file is to be
+
  DIRECTION can be followed by READ, to indicate that the file is to be
read.  If the file is to be written, DIRECTION can be followed by
+
  read.  If the file is to be written, DIRECTION can be followed by
WRITE.  The default is READ.
+
  WRITE.  The default is READ.
  
The filename is completed according to the files present in the host
+
  The filename is completed according to the files present in the host
file system, and the expanded string new-string is returned. New-
+
  file system, and the expanded string new-string is returned. New-
string is always a string containing a file name:  either the
+
  string is always a string containing a file name:  either the
original string, or a new, more specific string.  The value of
+
  original string, or a new, more specific string.  The value of
success indicates the status of the completion. The keyword value OLD
+
  success indicates the status of the completion. The keyword value OLD
or NEW means complete success, whereas the empty token list means
+
  or NEW means complete success, whereas the empty token list means
failure.  The following values of success are possible:
+
  failure.  The following values of success are possible:
  
Value              Meaning
+
  Value              Meaning
  
----------------------------------------------------------------
+
  ----------------------------------------------------------------
  
OLD                Success:  the string completed to the name of
+
  OLD                Success:  the string completed to the name of
                    a file that exists.
+
                      a file that exists.
  
NEW                Success:  the string completed to the name of
+
  NEW                Success:  the string completed to the name of
                    a file that could be created.
+
                      a file that could be created.
  
Empty token list    Failure due to one of these reasons:
+
  Empty token list    Failure due to one of these reasons:
  
                    The file is on a file system that does not
+
                      The file is on a file system that does not
  
  
  
 +
Greenberg & Keene                                              [Page 19]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
                    support completion.  new-string is supplied as
 
                    the unchanged string.
 
  
                    There is no possible completion.  new-string
+
                      support completion.  new-string is supplied as
                    is supplied as the unchanged string.
+
                      the unchanged string.
  
                    There is more than one possible completion.
+
                      There is no possible completion. new-string
                    The given string is completed up to the first
+
                      is supplied as the unchanged string.
                    point of ambiguity, and the result is supplied
 
                    as new-string.
 
  
                    A directory name was completed. Completion
+
                      There is more than one possible completion.
                    was not successful because additional
+
                      The given string is completed up to the first
                    components to the right of this directory
+
                      point of ambiguity, and the result is supplied
                    remain to be specified.  The string is
+
                      as new-string.
                    completed through the directory name and the
 
                    delimiter that follows it, and the result is
 
                    returned in new-string.
 
  
The semantics of COMPLETE are not documented here.  See the
+
                      A directory name was completed.  Completion
"Reference Guide to Streams, Files, and I/O" in the Symbolics
+
                      was not successful because additional
documentation set for the recommended semantics of COMPLETE.
+
                      components to the right of this directory
 +
                      remain to be specified.  The string is
 +
                      completed through the directory name and the
 +
                      delimiter that follows it, and the result is
 +
                      returned in new-string.
 +
 
 +
  The semantics of COMPLETE are not documented here.  See the
 +
  "Reference Guide to Streams, Files, and I/O" in the Symbolics
 +
  documentation set for the recommended semantics of COMPLETE.
  
 
8.5  CONTINUE Command
 
8.5  CONTINUE Command
  
Command:  (CONTINUE tid handle)
+
  Command:  (CONTINUE tid handle)
 +
 
 +
  Response: (CONTINUE tid)
  
Response: (CONTINUE tid)
+
  CONTINUE resumes a data transfer that was temporarily suspended due
 +
  to an asynchronous error.  Each asynchronous error description has an
 +
  optional argument of RESTARTABLE, indicating whether it makes any
 +
  sense to try to continue after this particular error occurred.
 +
  CONTINUE tries to resume the data transfer if the error is
 +
  potentially recoverable, according to the RESTARTABLE argument in the
 +
  asynchronous error description.  For a discussion of asynchronous
 +
  errors: See the section "NFILE Errors and Notifications", section
 +
  10.
  
CONTINUE resumes a data transfer that was temporarily suspended due
+
  handle is a required string-type argument that refers to the handle
to an asynchronous error.  Each asynchronous error description has an
+
  of the data channel that received an asynchronous error.  That data
optional argument of RESTARTABLE, indicating whether it makes any
+
  channel could have been in use for a data stream or direct access
sense to try to continue after this particular error occurred.
+
  transferhandle cannot be a direct file identifier.
CONTINUE tries to resume the data transfer if the error is
 
potentially recoverable, according to the RESTARTABLE argument in the
 
asynchronous error descriptionFor a discussion of asynchronous
 
errors:  See the section "NFILE Errors and Notifications", section
 
10.
 
  
handle is a required string-type argument that refers to the handle
+
  If the asynchronous error description does not contain the
of the data channel that received an asynchronous error.  That data
+
  RESTARTABLE argument, and the user issues the CONTINUE command
channel could have been in use for a data stream or direct access
+
  anyway, the server gives a command error response.
transfer.  handle cannot be a direct file identifier.
 
  
If the asynchronous error description does not contain the
 
RESTARTABLE argument, and the user issues the CONTINUE command
 
anyway, the server gives a command error response.
 
  
  
  
 +
Greenberg & Keene                                              [Page 20]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 
8.6  CREATE-DIRECTORY Command
 
8.6  CREATE-DIRECTORY Command
  
Command:  (CREATE-DIRECTORY tid pathname property-pairs)
+
  Command:  (CREATE-DIRECTORY tid pathname property-pairs)
  
Response: (CREATE-DIRECTORY tid dir-truename)
+
  Response: (CREATE-DIRECTORY tid dir-truename)
  
CREATE-DIRECTORY creates a directory on the remote file system.  The
+
  CREATE-DIRECTORY creates a directory on the remote file system.  The
required pathname argument is a string identifying the pathname of
+
  required pathname argument is a string identifying the pathname of
the directory to be created.  The return value dir-truename is the
+
  the directory to be created.  The return value dir-truename is the
pathname of the directory that was successfully created.  Both of
+
  pathname of the directory that was successfully created.  Both of
these pathnames are directory pathnames:  See the section "Syntax of
+
  these pathnames are directory pathnames:  See the section "Syntax of
File and Directory Pathname Arguments", section 7.4.
+
  File and Directory Pathname Arguments", section 7.4.
  
property-pairs is a keyword/value list of properties that further
+
  property-pairs is a keyword/value list of properties that further
define the attributes of the directory to be created.  The allowable
+
  define the attributes of the directory to be created.  The allowable
keywords and associated values are operating system dependent;
+
  keywords and associated values are operating system dependent;
typically they indicate arguments to be given to the native primitive
+
  typically they indicate arguments to be given to the native primitive
for creating directories.
+
  for creating directories.
  
If property-pairs is supplied as the empty token list, default access
+
  If property-pairs is supplied as the empty token list, default access
and creation attributes apply and should be assured by the server.
+
  and creation attributes apply and should be assured by the server.
See the section "Format of NFILE File Property/Value Pairs", section
+
  See the section "Format of NFILE File Property/Value Pairs", section
7.5.
+
  7.5.
  
 
8.7  CREATE-LINK Command
 
8.7  CREATE-LINK Command
  
Command:  (CREATE-LINK tid pathname target-pathname properties)
+
  Command:  (CREATE-LINK tid pathname target-pathname properties)
 +
 
 +
  Response: (CREATE-LINK tid link-truename)
  
Response: (CREATE-LINK tid link-truename)
+
  CREATE-LINK creates a link on the remote file system.
  
CREATE-LINK creates a link on the remote file system.
+
  pathname is the pathname of the link to be created; target-pathname
 +
  is the place in the file system to which the link points.  Both are
 +
  required arguments.  The return value link-truename names the
 +
  resulting link.
  
pathname is the pathname of the link to be created; target-pathname
+
  If a server on a file system that does not support links receives the
is the place in the file system to which the link points.  Both are
+
  CREATE-LINK command, it sends a command error response.
required arguments.  The return value link-truename names the
 
resulting link.
 
  
If a server on a file system that does not support links receives the
+
  The arguments pathname and target-pathname, and the return value
CREATE-LINK command, it sends a command error response.
+
  link-truename, are all strings in the full pathname syntax of the
 +
  server host.  See the section "Syntax of File and Directory Pathname
 +
  Arguments", section 7.4.
  
The arguments pathname and target-pathname, and the return value
+
  The required properties argument is a token list of keyword/value
link-truename, are all strings in the full pathname syntax of the
+
  pairs. These properties and their values specify certain attributes
server hostSee the section "Syntax of File and Directory Pathname
+
  to be given to the link.  The allowable keywords and associated
Arguments", section 7.4.
 
  
The required properties argument is a token list of keyword/value
 
pairs. These properties and their values specify certain attributes
 
to be given to the link.  The allowable keywords and associated
 
  
  
 +
Greenberg & Keene                                              [Page 21]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
values are operating system dependent; typically they indicate
+
  values are operating system dependent; typically they indicate
arguments to be given to the native primitive for creating links.
+
  arguments to be given to the native primitive for creating links.
  
If no property pairs are given in the command, the server should
+
  If no property pairs are given in the command, the server should
apply a reasonable default set of attributes to the link.  See the
+
  apply a reasonable default set of attributes to the link.  See the
section "Format of NFILE File Property/Value Pairs", section 7.5.
+
  section "Format of NFILE File Property/Value Pairs", section 7.5.
  
 
8.8  DATA-CONNECTION Command
 
8.8  DATA-CONNECTION Command
  
Command:  (DATA-CONNECTION tid new-input-handle new-output-handle)
+
  Command:  (DATA-CONNECTION tid new-input-handle new-output-handle)
 +
 
 +
  Response: (DATA-CONNECTION tid connection-identifier)
  
Response: (DATA-CONNECTION tid connection-identifier)
+
  DATA-CONNECTION enablesthe user side to initiate the establishment of
 +
  a new data connection.  The user side supplies two required string
 +
  arguments, new-input-handle and  new-output-handle.  These arguments
 +
  are used by subsequent commands to reference the two data channels
 +
  that constitute the data connection now being created.  new-input-
 +
  handle describes the server-to-user data channel, and new-output-
 +
  handle describes the user-to-server channel.  new-input-handle and
 +
  new-output-handle cannot refer to any data channels already in use.
  
DATA-CONNECTION enablesthe user side to initiate the establishment of
+
  Upon receiving the DATA-CONNECTION command, the server arranges for a
a new data connectionThe user side supplies two required string
+
  logical port (called socket or contact name on some networks) to be
arguments, new-input-handle and  new-output-handleThese arguments
+
  made available on the foreign host machineWhen the server has made
are used by subsequent commands to reference the two data channels
+
  that port available, it must inform the user of its identityThe
that constitute the data connection now being creatednew-input-
+
  server relays that information in the command response, in the
handle describes the server-to-user data channel, and new-output-
+
  required connection-identifier, a stringThe server then listens on
handle describes the user-to-server channel.  new-input-handle and
+
  the port named by connection-identifier, and waits for the user side
new-output-handle cannot refer to any data channels already in use.
+
  to connect to it.
  
Upon receiving the DATA-CONNECTION command, the server arranges for a
+
  Upon receiving the success command response, the user side supplies
logical port (called socket or contact name on some networks) to be
+
  the connection-identifier to the local network implementation, in
made available on the foreign host machineWhen the server has made
+
  order to connect to the specified portThe data connection is not
that port available, it must inform the user of its identityThe
+
  fully established until the user side connects successfully to that
server relays that information in the command response, in the
+
  port.  This command is unusual in that the successful command
required connection-identifier, a string.  The server then listens on
+
  response does not signify the completion of the command; it indicates
the port named by connection-identifier, and waits for the user side
+
  only that the server has fulfilled its responsibility in the process
to connect to it.
+
  of establishing a data connection.
  
Upon receiving the success command response, the user side supplies
 
the connection-identifier to the local network implementation, in
 
order to connect to the specified port.  The data connection is not
 
fully established until the user side connects successfully to that
 
port.  This command is unusual in that the successful command
 
response does not signify the completion of the command; it indicates
 
only that the server has fulfilled its responsibility in the process
 
of establishing a data connection.
 
  
  
Line 1,168: Line 1,232:
  
  
 +
Greenberg & Keene                                              [Page 22]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
The connection-identifier informs the user of the correct identity of
+
  The connection-identifier informs the user of the correct identity of
the logical port that the server has provided.  NFILE expects the
+
  the logical port that the server has provided.  NFILE expects the
connection-identifier to be a string.  For TCP this string is the
+
  connection-identifier to be a string.  For TCP this string is the
port number represented in decimal.  For Chaosnet, this string is the
+
  port number represented in decimal.  For Chaosnet, this string is the
contact name.  The connection-identifier is used only once; in all
+
  contact name.  The connection-identifier is used only once; in all
subsequent NFILE commands that need to reference either of the data
+
  subsequent NFILE commands that need to reference either of the data
channels that constitute this data connection, the new-input-handle
+
  channels that constitute this data connection, the new-input-handle
and new-output-handle are used.
+
  and new-output-handle are used.
  
For background information:  See the section "NFILE Control and Data
+
  For background information:  See the section "NFILE Control and Data
Connections", section 4.
+
  Connections", section 4.
  
 
8.9  DELETE Command
 
8.9  DELETE Command
  
Command:  (DELETE tid handle pathname)
+
  Command:  (DELETE tid handle pathname)
  
Response: (DELETE tid)
+
  Response: (DELETE tid)
  
DELETE deletes a file on the remote file system.
+
  DELETE deletes a file on the remote file system.
  
Either a handle or a pathname must be supplied, but not both.  If
+
  Either a handle or a pathname must be supplied, but not both.  If
given, the handle must be a data channel handle for a data stream
+
  given, the handle must be a data channel handle for a data stream
opening, or a direct file identifier for a direct access opening.
+
  opening, or a direct file identifier for a direct access opening.
pathname is a string in the full pathname syntax of the server host.
+
  pathname is a string in the full pathname syntax of the server host.
See the section "Syntax of File and Directory Pathname Arguments",
+
  See the section "Syntax of File and Directory Pathname Arguments",
section 7.4.
+
  section 7.4.
  
With a pathname supplied, the DELETE command causes the specified
+
  With a pathname supplied, the DELETE command causes the specified
file to be deleted.  DELETE has different results depending on the
+
  file to be deleted.  DELETE has different results depending on the
operating system involved.  That is, DELETE causes soft deletion on
+
  operating system involved.  That is, DELETE causes soft deletion on
TOPS-20 and LMFS, and hard deletion on UNIX and Multics.  If an
+
  TOPS-20 and LMFS, and hard deletion on UNIX and Multics.  If an
attempt is made to delete a delete-through link on a Symbolics LMFS,
+
  attempt is made to delete a delete-through link on a Symbolics LMFS,
its target is deleted instead.
+
  its target is deleted instead.
  
If the handle argument is supplied to DELETE, the server deletes the
+
  If the handle argument is supplied to DELETE, the server deletes the
open file bound to the data channel specified by handle at close
+
  open file bound to the data channel specified by handle at close
time.  This is true in both the output and input cases.
+
  time.  This is true in both the output and input cases.
  
 
8.10  DIRECT-OUTPUT Command
 
8.10  DIRECT-OUTPUT Command
  
Command:  (DIRECT-OUTPUT tid direct-handle output-handle)
+
  Command:  (DIRECT-OUTPUT tid direct-handle output-handle)
 +
 
 +
  Response: (DIRECT-OUTPUT tid)
  
Response: (DIRECT-OUTPUT tid)
+
  DIRECT-OUTPUT starts and stops output data flow for a direct access
 +
  file opening.  DIRECT-OUTPUT explicitly controls binding and
 +
  unbinding of an output data channel to a direct access opening.
  
DIRECT-OUTPUT starts and stops output data flow for a direct access
 
file opening.  DIRECT-OUTPUT explicitly controls binding and
 
unbinding of an output data channel to a direct access opening.
 
  
  
  
 +
Greenberg & Keene                                              [Page 23]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
direct-handle is a required argument, and output-handle is optional.
+
  direct-handle is a required argument, and output-handle is optional.
  
If supplied, output-handle is a request to bind an output data
+
  If supplied, output-handle is a request to bind an output data
channel (indicated by output-handle) to the direct access opening
+
  channel (indicated by output-handle) to the direct access opening
designated by the direct-handle.  The specified output data channel
+
  designated by the direct-handle.  The specified output data channel
must be free.  The server binds the data channel and begins accepting
+
  must be free.  The server binds the data channel and begins accepting
data from that connection and writing it to the opening.
+
  data from that connection and writing it to the opening.
  
If the output-handle is omitted, this is a request to unbind the
+
  If the output-handle is omitted, this is a request to unbind the
channel and terminate the active output transfer.
+
  channel and terminate the active output transfer.
  
 
8.11  DIRECTORY Command
 
8.11  DIRECTORY Command
  
Command:  (DIRECTORY tid input-handle pathname control-keywords
+
  Command:  (DIRECTORY tid input-handle pathname control-keywords
          properties)
+
              properties)
  
Response: (DIRECTORY tid)
+
  Response: (DIRECTORY tid)
  
DIRECTORY returns a directory listing including the identities and
+
  DIRECTORY returns a directory listing including the identities and
attributes for logically related groups of files, directories, and
+
  attributes for logically related groups of files, directories, and
links.  If the command is successful, a single token list containing
+
  links.  If the command is successful, a single token list containing
the requested information is sent over the data channel specified by
+
  the requested information is sent over the data channel specified by
input-handle, and the data channel is then implicitly freed by both
+
  input-handle, and the data channel is then implicitly freed by both
sides <2>.  For details on the format of the token list:  See the
+
  sides <2>.  For details on the format of the token list:  See the
section "NFILE DIRECTORY Data Format", section 8.11.1.
+
  section "NFILE DIRECTORY Data Format", section 8.11.1.
  
pathname specifies the files that are to be described; it is a string
+
  pathname specifies the files that are to be described; it is a string
in the full pathname syntax of the server host.  See the section
+
  in the full pathname syntax of the server host.  See the section
"Syntax of File and Directory Pathname Arguments", section 7.4.
+
  "Syntax of File and Directory Pathname Arguments", section 7.4.
  
The pathname generally contains wildcard characters, in operating-
+
  The pathname generally contains wildcard characters, in operating-
system-specific format, describing potential file name matches.  Most
+
  system-specific format, describing potential file name matches.  Most
operating systems provide a facility that accepts such a pathname and
+
  operating systems provide a facility that accepts such a pathname and
returns information about all files matching this pathname.  Some
+
  returns information about all files matching this pathname.  Some
operating systems allow wildcard (potential multiple) matches in the
+
  operating systems allow wildcard (potential multiple) matches in the
directory or device portions of the pathname; other operating systems
+
  directory or device portions of the pathname; other operating systems
do not.  There is no clear contract at this time about what is
+
  do not.  There is no clear contract at this time about what is
expected of servers on systems that do not allow wildcard matches (or
+
  expected of servers on systems that do not allow wildcard matches (or
some kinds of wild card matches), when presented with a wildcard.
+
  some kinds of wild card matches), when presented with a wildcard.
  
properties is a token list of keywords that are the names of
+
  properties is a token list of keywords that are the names of
properties.  If properties is omitted or supplied as the empty token
+
  properties.  If properties is omitted or supplied as the empty token
list, the server sends along all properties.  If any properties are
+
  list, the server sends along all properties.  If any properties are
supplied, the user is requesting the server to send only those
+
  supplied, the user is requesting the server to send only those
properties.
+
  properties.
  
  
Line 1,275: Line 1,344:
  
  
 +
Greenberg & Keene                                              [Page 24]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
control-keywords ARGUMENT TO DIRECTORY
 
  
control-keywords is a token list of keywords.  The control-keywords
+
  control-keywords ARGUMENT TO DIRECTORY
affect the way the DIRECTORY command works on the server machine.
 
Although some of the options below request the server to limit (by
 
some filter) the data to be returned, it is never an error if the
 
server returns more information than is requested.
 
  
The following keywords are recognized:
+
  control-keywords is a token list of keywords.  The control-keywords
 +
  affect the way the DIRECTORY command works on the server machine.
 +
  Although some of the options below request the server to limit (by
 +
  some filter) the data to be returned, it is never an error if the
 +
  server returns more information than is requested.
  
DELETED
+
  The following keywords are recognized:
  
Includes soft-deleted files in the directory list.  Without this
+
  DELETED
option, they must not be included. Such files have the DELETED
 
property indicated as true" among their properties.  DELETED is
 
ignored on systems that do not support soft deletion.
 
  
DIRECTORIES-ONLY
+
  Includes soft-deleted files in the directory list.  Without this
 +
  option, they must not be included. Such files have the DELETED
 +
  property indicated as true" among their properties.  DELETED is
 +
  ignored on systems that do not support soft deletion.
  
This option changes the semantics of DIRECTORY fairly drastically.
+
  DIRECTORIES-ONLY
Normally, the server returns information about all files,
 
directories, and links whose pathnames match the supplied pathname.
 
This means that for each file, directory, or link to be listed, its
 
directory name must match the potentially wildcarded) directory name
 
in the supplied pathname, its file name must match the file name in
 
the supplied pathname, and so on.
 
  
When DIRECTORIES-ONLY is supplied, the server is to list only
+
  This option changes the semantics of DIRECTORY fairly drastically.
directories, not whose pathnames match the supplied pathname, but
+
  Normally, the server returns information about all files,
whose pathnames expressed as directory pathnames match the
+
  directories, and links whose pathnames match the supplied pathname.
(potentially wildcarded) directory portion of the supplied pathname.
+
  This means that for each file, directory, or link to be listed, its
The description of the PROBE-DIRECTORY keyword that can be supplied
+
  directory name must match the potentially wildcarded) directory name
as the direction argument of the OPEN command discusses this:  See
+
  in the supplied pathname, its file name must match the file name in
the section "OPEN Command", section 8.20.
+
  the supplied pathname, and so on.
  
It is not yet established what servers on hosts that do not support
+
  When DIRECTORIES-ONLY is supplied, the server is to list only
this type of action natively are to do when presented with
+
  directories, not whose pathnames match the supplied pathname, but
DIRECTORIES-ONLY and a pathname with a wildcard directory component.
+
  whose pathnames expressed as directory pathnames match the
 +
  (potentially wildcarded) directory portion of the supplied pathname.
 +
  The description of the PROBE-DIRECTORY keyword that can be supplied
 +
  as the direction argument of the OPEN command discusses this:  See
 +
  the section "OPEN Command", section 8.20.
  
FAST Speeds up the operation and data transmission by not listing any
+
  It is not yet established what servers on hosts that do not support
properties at all for the files concerned; that is, only the
+
  this type of action natively are to do when presented with
truenames are returned.
+
  DIRECTORIES-ONLY and a pathname with a wildcard directory component.
  
 +
  FAST Speeds up the operation and data transmission by not listing any
 +
  properties at all for the files concerned; that is, only the
 +
  truenames are returned.
  
  
Line 1,329: Line 1,400:
  
  
 +
Greenberg & Keene                                              [Page 25]
  
NO-EXTRA-INFO
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
Specifies that the server is to suppress listing those properties
 
that are generally more difficult or expensive to obtain.  This
 
typically eliminates listing of directory-specific properties such as
 
information about default generation counts and expunge dates.
 
  
SORTED
+
  NO-EXTRA-INFO
  
This causes the directory listing to be sorted.  The sorting is done
+
  Specifies that the server is to suppress listing those properties
alphabetically by directory, then by file name, then file type, then
+
  that are generally more difficult or expensive to obtain.  This
file version (by increasing version number).
+
  typically eliminates listing of directory-specific properties such as
 +
  information about default generation counts and expunge dates.
 +
 
 +
  SORTED
 +
 
 +
  This causes the directory listing to be sorted.  The sorting is done
 +
  alphabetically by directory, then by file name, then file type, then
 +
  file version (by increasing version number).
  
 
8.11.1  NFILE DIRECTORY Data Format
 
8.11.1  NFILE DIRECTORY Data Format
  
If the NFILE DIRECTORY command completes successfully, a single token
+
  If the NFILE DIRECTORY command completes successfully, a single token
list containing the requested directory information is sent on the
+
  list containing the requested directory information is sent on the
data channel specified by the input-handle argument in the DIRECTORY
+
  data channel specified by the input-handle argument in the DIRECTORY
command.  This section describes the format of that single token
+
  command.  This section describes the format of that single token
list, and gives further detail on the properties argument to
+
  list, and gives further detail on the properties argument to
DIRECTORY.
+
  DIRECTORY.
  
The token list is a top-level token list, so it is delimited by TOP-
+
  The token list is a top-level token list, so it is delimited by TOP-
LEVEL-LIST-BEGIN and TOP-LEVEL-LIST-END.  The top-level token list
+
  LEVEL-LIST-BEGIN and TOP-LEVEL-LIST-END.  The top-level token list
contains embedded token lists.  The first embedded token list
+
  contains embedded token lists.  The first embedded token list
contains the empty token list followed by property/value pairs
+
  contains the empty token list followed by property/value pairs
describing property information of the file system as a whole rather
+
  describing property information of the file system as a whole rather
than of a specific file.  NFILE requires one property of the file
+
  than of a specific file.  NFILE requires one property of the file
system to be present: DISK-SPACE-DESCRIPTION is a string describing
+
  system to be present: DISK-SPACE-DESCRIPTION is a string describing
the amount of free file space available on the system.  The following
+
  the amount of free file space available on the system.  The following
embedded token lists contain the pathname of a file, followed by
+
  embedded token lists contain the pathname of a file, followed by
property/value pairs describing the properties of that file.
+
  property/value pairs describing the properties of that file.
  
The following example shows the format of the top-level token list
+
  The following example shows the format of the top-level token list
returned by DIRECTORY, for two files.  It is expected that the server
+
  returned by DIRECTORY, for two files.  It is expected that the server
return several property/value pairs for each file; the number of
+
  return several property/value pairs for each file; the number of
pairs returned is not constrained.  In this example, two
+
  pairs returned is not constrained.  In this example, two
property/value pairs are returned for the file system, two pairs are
+
  property/value pairs are returned for the file system, two pairs are
returned for the first file, and only one pair is returned for the
+
  returned for the first file, and only one pair is returned for the
second file.
+
  second file.
  
          TOP-LEVEL-LIST-BEGIN
+
            TOP-LEVEL-LIST-BEGIN
          LIST-BEGIN      - first embedded token list starts
+
            LIST-BEGIN      - first embedded token list starts
          LIST-BEGIN      - an empty embedded token list starts
+
            LIST-BEGIN      - an empty embedded token list starts
          LIST-END        - the empty embedded token list ends
+
            LIST-END        - the empty embedded token list ends
          prop1 value1    - property/value pairs of file system
+
            prop1 value1    - property/value pairs of file system
          prop2 value2
+
            prop2 value2
          LIST-END
+
            LIST-END
  
  
  
 +
Greenberg & Keene                                              [Page 26]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
          LIST-BEGIN
 
          pathname1        - pathname of the first file
 
          prop1 value1    - property/value pairs of first file
 
          prop2 value2
 
          LIST-END
 
          LIST-BEGIN
 
          pathname2        - pathname of the second file
 
          prop1 value1    - property/value pairs of second file
 
          LIST-END
 
          TOP-LEVEL-LIST-END
 
  
The following example is designed to illustrate the structure of the
+
            LIST-BEGIN
top-level token list by depicting TOP-LEVEL-LIST-BEGIN and TOP-
+
            pathname1        - pathname of the first file
LEVEL-LIST-END by parentheses and LIST-BEGIN and LIST-END by squarbe
+
            prop1 value1    - property/value pairs of first file
rackets.  respectively. The indentation, blank spaces, and newlines
+
            prop2 value2
in the example are not part of the token list, but are used here to
+
            LIST-END
make the structure of the token list clear.
+
            LIST-BEGIN
 +
            pathname2        - pathname of the second file
 +
            prop1 value1    - property/value pairs of second file
 +
            LIST-END
 +
            TOP-LEVEL-LIST-END
  
                ([  [ ]   prop1 value1 prop2 value2]
+
   The following example is designed to illustrate the structure of the
                [pathname1 prop1 value1 prop2 value2]
+
  top-level token list by depicting TOP-LEVEL-LIST-BEGIN and TOP-
                [pathname2 prop1 value1])
+
  LEVEL-LIST-END by parentheses and LIST-BEGIN and LIST-END by squarbe
 +
  rackets.  respectively. The indentation, blank spaces, and newlines
 +
  in the example are not part of the token list, but are used here to
 +
  make the structure of the token list clear.
  
The pathname is a string in the full pathname syntax of the server
+
                  ([  [ ]    prop1 value1 prop2 value2]
host.  See the section "Syntax of File and Directory Pathname
+
                    [pathname1 prop1 value1 prop2 value2]
Arguments", section 7.4.
+
                    [pathname2 prop1 value1])
  
For further information on file property/value pairs:  See the
+
  The pathname is a string in the full pathname syntax of the server
section "Format of NFILE File Property/Value Pairs", section 7.5.
+
  host.  See the section "Syntax of File and Directory Pathname
 +
  Arguments", section 7.4.
 +
 
 +
  For further information on file property/value pairs:  See the
 +
  section "Format of NFILE File Property/Value Pairs", section 7.5.
  
 
8.12  DISABLE-CAPABILITIES Command
 
8.12  DISABLE-CAPABILITIES Command
  
Command:  (DISABLE-CAPABILITIES tid capability)
+
  Command:  (DISABLE-CAPABILITIES tid capability)
  
Response: (DISABLE-CAPABILITIES tid cap-1 success-1
+
  Response: (DISABLE-CAPABILITIES tid cap-1 success-1
              cap-2 success-2 cap-3 success-3 ...)
+
                  cap-2 success-2 cap-3 success-3 ...)
  
DISABLE-CAPABILITIES causes an access capability to be disabled on
+
  DISABLE-CAPABILITIES causes an access capability to be disabled on
the server machine.  capability is a string naming the capability to
+
  the server machine.  capability is a string naming the capability to
be disabled.  The meaning of the capability is dependent on the
+
  be disabled.  The meaning of the capability is dependent on the
operating system.
+
  operating system.
  
The return values cap-1, cap-2, and so on, are strings specifying
+
  The return values cap-1, cap-2, and so on, are strings specifying
names of capabilities.  If the capability named by cap-1 was
+
  names of capabilities.  If the capability named by cap-1 was
successfully disabled, the corresponding success-1 is supplied as
+
  successfully disabled, the corresponding success-1 is supplied as
Boolean truth; otherwise it is the empty token list.
+
  Boolean truth; otherwise it is the empty token list.
  
  
Line 1,434: Line 1,512:
  
  
 +
Greenberg & Keene                                              [Page 27]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
Although the user can specify only one capability to disable, it is
+
 
conceivable that the result of disabling that particular capability
+
  Although the user can specify only one capability to disable, it is
is the disabling of other, related capabilities.  That is why the
+
  conceivable that the result of disabling that particular capability
command response can contain information on more than one capability.
+
  is the disabling of other, related capabilities.  That is why the
 +
  command response can contain information on more than one capability.
  
 
8.13  ENABLE-CAPABILITIES Command
 
8.13  ENABLE-CAPABILITIES Command
  
Command:  (ENABLE-CAPABILITIES tid capability password)}
+
  Command:  (ENABLE-CAPABILITIES tid capability password)}
  
Response: (ENABLE-CAPABILITIES tid cap-1 success-1
+
  Response: (ENABLE-CAPABILITIES tid cap-1 success-1
          cap-2 success-2 cap-3 success-3 ...)
+
              cap-2 success-2 cap-3 success-3 ...)
  
ENABLE-CAPABILITIES causes an access capability to be enabled on the
+
  ENABLE-CAPABILITIES causes an access capability to be enabled on the
server machine.  The password argument is optional, and should be
+
  server machine.  The password argument is optional, and should be
included only if it is needed to enable this particular capability.
+
  included only if it is needed to enable this particular capability.
Both password and capability are strings.  The meaning of the
+
  Both password and capability are strings.  The meaning of the
capability is dependent on the operating system.
+
  capability is dependent on the operating system.
  
The return values cap-1, cap-2 and so on, are strings specifying
+
  The return values cap-1, cap-2 and so on, are strings specifying
names of capabilities.  If the capability named by cap-1 was
+
  names of capabilities.  If the capability named by cap-1 was
successfully enabled, the corresponding success-1 is supplied as
+
  successfully enabled, the corresponding success-1 is supplied as
Boolean truth; otherwise it is the empty token list.
+
  Boolean truth; otherwise it is the empty token list.
  
Although the user can specify only one capability to enable, it is
+
  Although the user can specify only one capability to enable, it is
conceivable that the result of enabling that particular capability is
+
  conceivable that the result of enabling that particular capability is
the enabling of other, related capabilities.  That is why the command
+
  the enabling of other, related capabilities.  That is why the command
response can contain information on more than one capability.
+
  response can contain information on more than one capability.
  
 
8.14  EXPUNGE Command
 
8.14  EXPUNGE Command
  
Command:  (EXPUNGE tid directory-pathname)
+
  Command:  (EXPUNGE tid directory-pathname)
  
Response: (EXPUNGE tid server-storage-units-freed)
+
  Response: (EXPUNGE tid server-storage-units-freed)
  
EXPUNGE causes the directory specified by pathname to be expunged.
+
  EXPUNGE causes the directory specified by pathname to be expunged.
Expunging means that any files that have been soft deleted are to be
+
  Expunging means that any files that have been soft deleted are to be
permanently removed.
+
  permanently removed.
  
For file systems that do not support soft deletion, the command is to
+
  For file systems that do not support soft deletion, the command is to
be ignored; a success command response is sent, but no action is
+
  be ignored; a success command response is sent, but no action is
performed on the file system.  In this case, the number-of-server-
+
  performed on the file system.  In this case, the number-of-server-
storage-units-freed return value should be omitted.
+
  storage-units-freed return value should be omitted.
  
directory-pathname is a required string argument in the directory
+
  directory-pathname is a required string argument in the directory
pathname format; it must refer to a directory on the server file
+
  pathname format; it must refer to a directory on the server file
system, and not to a file.  See the section "Syntax of File and
+
  system, and not to a file.  See the section "Syntax of File and
Directory Pathname Arguments", section 7.4.
+
  Directory Pathname Arguments", section 7.4.
  
  
  
  
 +
Greenberg & Keene                                              [Page 28]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
The return value server-storage-units-freed is an integer specifying
 
how many records, blocks, or whatever unit is used to measure file
 
storage on the server host system, were recovered.  This return value
 
should be omitted if the server does not know how many storage units
 
were freed.
 
  
The protocol does not define whether directory-pathname is really a
+
  The return value server-storage-units-freed is an integer specifying
pathname as directory or a wildcard pathname of files to be expunged.
+
  how many records, blocks, or whatever unit is used to measure file
The protocol does not define whether or not wildcards are permitted,
+
  storage on the server host system, were recovered.  This return value
or required to be supported, in the directory portion of the pathname
+
  should be omitted if the server does not know how many storage units
(representing an implicit request to expunge many directories).
+
  were freed.
 +
 
 +
  The protocol does not define whether directory-pathname is really a
 +
  pathname as directory or a wildcard pathname of files to be expunged.
 +
  The protocol does not define whether or not wildcards are permitted,
 +
  or required to be supported, in the directory portion of the pathname
 +
  (representing an implicit request to expunge many directories).
  
 
8.15  FILEPOS Command
 
8.15  FILEPOS Command
  
Command:  (FILEPOS tid handle position resync-uid)
+
  Command:  (FILEPOS tid handle position resync-uid)
 +
 
 +
  Response: (FILEPOS tid)
  
Response: (FILEPOS tid)
+
  FILEPOS sets the file access pointer to a given position, relative to
 +
  the beginning of the file.  FILEPOS is used to indicate the position
 +
  of the next byte of data to be transferred.
  
FILEPOS sets the file access pointer to a given position, relative to
+
  The handle indicates the file to be affected.  handle must be a data
the beginning of the fileFILEPOS is used to indicate the position
+
  channel handle for a data stream opening, or a direct file identifier
of the next byte of data to be transferred.
+
  for a direct access openingBoth handle and position are required
 +
  arguments.
  
The handle indicates the file to be affectedhandle must be a data
+
  position is an integer indicating to which point in the file the file
channel handle for a data stream opening, or a direct file identifier
+
  access pointer is to be resetposition is either a byte number
for a direct access opening.  Both handle and position are required
+
  according to the current byte size being used, or characters for
arguments.
+
  character openings.  Position zero is the beginning of the file.  If
 +
  this is a character opening, position is measured in server units,
 +
  not in NFILE character set units.
  
position is an integer indicating to which point in the file the file
+
  If the FILEPOS command is given on an input data channel (that is, a
access pointer is to be reset.  position is either a byte number
+
  data channel currently sending data from server to user), the
according to the current byte size being used, or characters for
+
  affected data channel must be resynchronized after the FILEPOS is
character openingsPosition zero is the beginning of the fileIf
+
  accomplished, in order to identify the start of the new dataThe
this is a character opening, position is measured in server units,
+
  resync-uid is a unique identifier associated with the
not in NFILE character set units.
+
  resynchronization of the data channel; it is unique with respect to
 +
  this dialogueresync-uid must be supplied if handle is an input
 +
  handle, but it is not supplied otherwise.  For more information on
 +
  the resynchronization procedure:  See the section "NFILE Data
 +
  Connection Resynchronization", section 9.2.
  
If the FILEPOS command is given on an input data channel (that is, a
+
  In the output case, the user must somehow indicate to the server, on
data channel currently sending data from server to user), the
+
  the output data channel, when there is no more data.  The user side
affected data channel must be resynchronized after the FILEPOS is
+
  sends the keyword token EOF to do soUpon receiving that control
accomplished, in order to identify the start of the new data.  The
 
resync-uid is a unique identifier associated with the
 
resynchronization of the data channel; it is unique with respect to
 
this dialogueresync-uid must be supplied if handle is an input
 
handle, but it is not supplied otherwise.  For more information on
 
the resynchronization procedure:  See the section "NFILE Data
 
Connection Resynchronization", section 9.2.
 
  
In the output case, the user must somehow indicate to the server, on
 
the output data channel, when there is no more data.  The user side
 
sends the keyword token EOF to do so.  Upon receiving that control
 
  
  
 +
Greenberg & Keene                                              [Page 29]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
token, the server is required to position the file pointer according
+
  token, the server is required to position the file pointer according
to the position given.  When the new file position is established,
+
  to the position given.  When the new file position is established,
the server resumes accepting data at the new file position.
+
  the server resumes accepting data at the new file position.
  
In most cases, using the direct access mode of transfer is more
+
  In most cases, using the direct access mode of transfer is more
convenient and efficient than repeated use of FILEPOS with a data
+
  convenient and efficient than repeated use of FILEPOS with a data
stream opening.
+
  stream opening.
  
There are problems inherent in trying to set a file position of a
+
  There are problems inherent in trying to set a file position of a
character-oriented file on a foreign host, if one machine is a
+
  character-oriented file on a foreign host, if one machine is a
Symbolics computer and the other is not.  For example, character set
+
  Symbolics computer and the other is not.  For example, character set
translation must take place.  See the section "NFILE Character Set",
+
  translation must take place.  See the section "NFILE Character Set",
section 6.  Because of these difficulties, FILEPOS might not be
+
  section 6.  Because of these difficulties, FILEPOS might not be
supported in the future on character files.  FILEPOS is not
+
  supported in the future on character files.  FILEPOS is not
problematic for binary files.
+
  problematic for binary files.
  
 
8.15.1  Implementation Hint for FILEPOS Command
 
8.15.1  Implementation Hint for FILEPOS Command
  
The server processing of this command (by the control connection
+
  The server processing of this command (by the control connection
handler) must not attempt to wait for the resynchronization procedure
+
  handler) must not attempt to wait for the resynchronization procedure
to complete.  It is possible that the user could abort between
+
  to complete.  It is possible that the user could abort between
sending the FILEPOS command and reading for the mark and
+
  sending the FILEPOS command and reading for the mark and
resynchronization identifier.  That scenario could leave the sender
+
  resynchronization identifier.  That scenario could leave the sender
of the resynchronization identifier, on the server side, blocked for
+
  of the resynchronization identifier, on the server side, blocked for
output indefinitely.
+
  output indefinitely.
  
Only two commands received on the control connection can break the
+
  Only two commands received on the control connection can break the
data channel out of the blocked state described above:  CLOSE with
+
  data channel out of the blocked state described above:  CLOSE with
abort-p supplied as Boolean truth, and RESYNCHRONIZE-DATA-CHANNEL.
+
  abort-p supplied as Boolean truth, and RESYNCHRONIZE-DATA-CHANNEL.
Therefore, the control connection must not wait for the data channel
+
  Therefore, the control connection must not wait for the data channel
to finish performing the resynchronization procedure.  This wait
+
  to finish performing the resynchronization procedure.  This wait
should instead be performed by the process managing the data channel.
+
  should instead be performed by the process managing the data channel.
  
 
8.16  FINISH Command
 
8.16  FINISH Command
  
Command:  (FINISH tid handle)
+
  Command:  (FINISH tid handle)
 +
 
 +
  Response: (FINISH tid truename binary-p other-properties)
  
Response: (FINISH tid truename binary-p other-properties)
+
  FINISH closes a file and reopens it immediately with the file
 +
  position pointer saved, thus leaving it open for further I/O.  If
 +
  possible, the implementation should do the closing and opening in an
 +
  indivisible operation, such that no other process can get access to
 +
  the file.
  
FINISH closes a file and reopens it immediately with the file
 
position pointer saved, thus leaving it open for further I/O.  If
 
possible, the implementation should do the closing and opening in an
 
indivisible operation, such that no other process can get access to
 
the file.
 
  
  
Line 1,592: Line 1,680:
  
  
 +
Greenberg & Keene                                              [Page 30]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
The arguments, results, and their meaning are identical to those of
+
  The arguments, results, and their meaning are identical to those of
the CLOSE command.  See the section "CLOSE Command", section 8.3.
+
  the CLOSE command.  See the section "CLOSE Command", section 8.3.
FINISH requires a handle, which has the same meaning as the handle of
+
  FINISH requires a handle, which has the same meaning as the handle of
the CLOSE command.
+
  the CLOSE command.
  
In the output case, for both direct mode and data stream mode of
+
  In the output case, for both direct mode and data stream mode of
openings, the server writes out all buffers and sets the byte count
+
  openings, the server writes out all buffers and sets the byte count
of the file.  The user sends the keyword token EOF on the data
+
  of the file.  The user sends the keyword token EOF on the data
channel, to indicate that the end of data has been reached.  The
+
  channel, to indicate that the end of data has been reached.  The
server leaves the file in such a state that if the system or server
+
  server leaves the file in such a state that if the system or server
crashes anytime after the FINISH command has completed, it would
+
  crashes anytime after the FINISH command has completed, it would
later appear as though the file had been closed by this command.
+
  later appear as though the file had been closed by this command.
However, the file is not left in a closed state now; it is left open
+
  However, the file is not left in a closed state now; it is left open
for further I/O operations.  FINISH is a reliability feature.
+
  for further I/O operations.  FINISH is a reliability feature.
  
FINISH is somewhat pointless in the input case, but valid.  The
+
  FINISH is somewhat pointless in the input case, but valid.  The
native Symbolics file system (LMFS) implements FINISH on an output
+
  native Symbolics file system (LMFS) implements FINISH on an output
file by an internal operation that effectively goes through the work
+
  file by an internal operation that effectively goes through the work
of closing but leaves the file open for appending.
+
  of closing but leaves the file open for appending.
  
ERRORS ON FINISH
+
  ERRORS ON FINISH
  
After writing every last bit sent by the user to disk, and before
+
  After writing every last bit sent by the user to disk, and before
closing the file, the server checks the data channel specified by
+
  closing the file, the server checks the data channel specified by
handle to see if an asynchronous error is outstanding on that
+
  handle to see if an asynchronous error is outstanding on that
channel.  That is, the server must determine whether it has sent an
+
  channel.  That is, the server must determine whether it has sent an
asynchronous error to the user, to which the user has not yet
+
  asynchronous error to the user, to which the user has not yet
responded with a CONTINUE command.  If so, the server is unable to
+
  responded with a CONTINUE command.  If so, the server is unable to
finish the file, and it must send a command error response response,
+
  finish the file, and it must send a command error response response,
indicating that an error is pending on the channel.  The appropriate
+
  indicating that an error is pending on the channel.  The appropriate
three-letter error code is EPC.  See the section "NFILE Errors and
+
  three-letter error code is EPC.  See the section "NFILE Errors and
Notifications", section 10.
+
  Notifications", section 10.
  
 
8.17  HOME-DIRECTORY Command
 
8.17  HOME-DIRECTORY Command
  
Command:  (HOME-DIRECTORY tid user)
+
  Command:  (HOME-DIRECTORY tid user)
  
Response: (HOME-DIRECTORY tid directory-pathname)
+
  Response: (HOME-DIRECTORY tid directory-pathname)
  
HOME-DIRECTORY returns the full pathname of the home directory on the
+
  HOME-DIRECTORY returns the full pathname of the home directory on the
server machine for the given user.
+
  server machine for the given user.
  
user is a string that should be recognizable as a user's login name
+
  user is a string that should be recognizable as a user's login name
on the server operating system.  directory-pathname is a string in
+
  on the server operating system.  directory-pathname is a string in
the directory pathname format.  See the section "Syntax of File and
+
  the directory pathname format.  See the section "Syntax of File and
Directory Pathname Arguments", section 7.4.
+
  Directory Pathname Arguments", section 7.4.
  
  
Line 1,646: Line 1,736:
  
  
 +
Greenberg & Keene                                              [Page 31]
 +
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 
8.18  LOGIN Command
 
8.18  LOGIN Command
  
Command:  (LOGIN tid user password FILE-SYSTEM USER-VERSION)
+
  Command:  (LOGIN tid user password FILE-SYSTEM USER-VERSION)
  
Response: (LOGIN tid keyword/value-pairs)
+
  Response: (LOGIN tid keyword/value-pairs)
  
LOGIN logs the given user in to the server machine, using the
+
  LOGIN logs the given user in to the server machine, using the
password if necessary.  Both user and password are string arguments;
+
  password if necessary.  Both user and password are string arguments;
user is required, password is optional.  An omitted password is valid
+
  user is required, password is optional.  An omitted password is valid
if the host allows the specified user to log in without a password.
+
  if the host allows the specified user to log in without a password.
Depending on the operating system and server, it might be necessary
+
  Depending on the operating system and server, it might be necessary
to log in to run a program (in this case the NFILE server program) on
+
  to log in to run a program (in this case the NFILE server program) on
the host.  LOGIN establishes a user identity that is used by the
+
  the host.  LOGIN establishes a user identity that is used by the
operating system to establish the file author and determine file
+
  operating system to establish the file author and determine file
access rights during the current session.
+
  access rights during the current session.
  
The server has the option to reject with an error any command except
+
  The server has the option to reject with an error any command except
LOGIN if a successful LOGIN command has not been performed.  This is
+
  LOGIN if a successful LOGIN command has not been performed.  This is
recommended.  Many operating systems perform the login function in a
+
  recommended.  Many operating systems perform the login function in a
different process and/or environment than user programs.  The portion
+
  different process and/or environment than user programs.  The portion
of the NFILE server running in the special login environment could
+
  of the NFILE server running in the special login environment could
conceivably be capable only of processing the LOGIN command; this is
+
  conceivably be capable only of processing the LOGIN command; this is
the reason for having the LOGIN command in NFILE.
+
  the reason for having the LOGIN command in NFILE.
  
FILE-SYSTEM and USER-VERSION are optional keyword/value pairs.  The
+
  FILE-SYSTEM and USER-VERSION are optional keyword/value pairs.  The
FILE-SYSTEM keyword/value pair selects the identity of the file
+
  FILE-SYSTEM keyword/value pair selects the identity of the file
system to which all following commands in this session are to be
+
  system to which all following commands in this session are to be
directed.  This argument has meaning only if the server host machine
+
  directed.  This argument has meaning only if the server host machine
has multiple file systems, and the targeted file system is other than
+
  has multiple file systems, and the targeted file system is other than
the default file system that a user would get by initiating a
+
  the default file system that a user would get by initiating a
dialogue with that host.  The FILE-SYSTEM argument is an arbitrary
+
  dialogue with that host.  The FILE-SYSTEM argument is an arbitrary
token list.  If the server does not recognize it, the server gives an
+
  token list.  If the server does not recognize it, the server gives an
appropriate command error response.
+
  appropriate command error response.
  
Currently, the only use of FILE-SYSTEM is for Symbolics servers to
+
  Currently, the only use of FILE-SYSTEM is for Symbolics servers to
select one of the front-end processor hosts instead of the LMFS,
+
  select one of the front-end processor hosts instead of the LMFS,
which is the default.  In this case, the first element in the token
+
  which is the default.  In this case, the first element in the token
list is the keyword FEP, and the second element in the token list is
+
  list is the keyword FEP, and the second element in the token list is
an integer, indicating the desired FEP disk unit number.  If the
+
  an integer, indicating the desired FEP disk unit number.  If the
server discovers there is no such file system, the server gives a
+
  server discovers there is no such file system, the server gives a
command error response including the three-letter code NFS, meaning
+
  command error response including the three-letter code NFS, meaning
"no file system".  See the section "NFILE Errors and Notifications",
+
  "no file system".  See the section "NFILE Errors and Notifications",
section 10.
+
  section 10.
  
  
Line 1,699: Line 1,792:
  
  
 +
Greenberg & Keene                                              [Page 32]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
The user tells the server what version of NFILE it is running by
 
including the optional USER-VERSION keyword/value pair.  The value
 
associated with USER-VERSION can be a string, an integer, or a token
 
list.  This document describes NFILE user version 2 and server
 
version 2.
 
  
Upon receiving the representation of the user version, the server can
+
  The user tells the server what version of NFILE it is running by
either adjust certain parameters to handle this particular version,
+
  including the optional USER-VERSION keyword/value pairThe value
or simply ignore the user version altogetherCurrently, the only
+
  associated with USER-VERSION can be a string, an integer, or a token
released versions of NFILE are user version 2 and server version 2.
+
  list.  This document describes NFILE user version 2 and server
 +
  version 2.
  
LOGIN RETURN VALUES: keyword/value-pairs
+
  Upon receiving the representation of the user version, the server can
 +
  either adjust certain parameters to handle this particular version,
 +
  or simply ignore the user version altogether. Currently, the only
 +
  released versions of NFILE are user version 2 and server version 2.
  
The keyword/value-pairs is a token list composed of keywords followed
+
  LOGIN RETURN VALUES:  keyword/value-pairs
by their values.  The server includes any or all of the following
 
keywords and their values; they are all optional.  The following
 
keywords are recognized:
 
  
NAME
+
  The keyword/value-pairs is a token list composed of keywords followed
 +
  by their values.  The server includes any or all of the following
 +
  keywords and their values; they are all optional.  The following
 +
  keywords are recognized:
  
The value associated with NAME is a string specifying the user
+
  NAME
identity, in the server host's terms.
 
  
PERSONAL-NAME
+
  The value associated with NAME is a string specifying the user
 +
  identity, in the server host's terms.
  
The value associated with PERSONAL-NAME is a string representing the
+
  PERSONAL-NAME
user's personal name, last name first.  For example:  "McGillicuddy,
 
Aloysius X.".
 
  
HOMEDIR-PATHNAME
+
  The value associated with PERSONAL-NAME is a string representing the
 +
  user's personal name, last name first.  For example:  "McGillicuddy,
 +
  Aloysius X.".
  
The value associated with HOMEDIR-PATHNAME is a string in the
+
  HOMEDIR-PATHNAME
pathname as directory format, indicating the home directory of the
 
user.  See the section "Syntax of File and Directory Pathname
 
Arguments", section 7.4.
 
  
GROUP-AFFILIATION
+
  The value associated with HOMEDIR-PATHNAME is a string in the
 +
  pathname as directory format, indicating the home directory of the
 +
  user.  See the section "Syntax of File and Directory Pathname
 +
  Arguments", section 7.4.
  
The value associated with GROUP-AFFILIATION is a string specifying
+
  GROUP-AFFILIATION
the group to which the user belongs, when this concept is
 
appropriate.
 
  
SERVER-VERSION
+
  The value associated with GROUP-AFFILIATION is a string specifying
 +
  the group to which the user belongs, when this concept is
 +
  appropriate.
  
The value associated with SERVER-VERSION can be a string, an integer,
+
  SERVER-VERSION
or a token list.  The value is a representation of the version of the
 
server is running.  Upon receiving the server version, the user can:
 
adjust certain parameters to handle this particular version; accept
 
  
 +
  The value associated with SERVER-VERSION can be a string, an integer,
 +
  or a token list.  The value is a representation of the version of the
 +
  server is running.  Upon receiving the server version, the user can:
 +
  adjust certain parameters to handle this particular version; accept
  
  
  
 +
Greenberg & Keene                                              [Page 33]
  
the version; or close the connection.  Currently, the only released
+
RFC 1037            NFILE - A File Access Protocol        December 1987
versions of NFILE are user version 2 and server version 2.
 
  
PROPERTY-INDEX-TABLE
 
  
The value associated with PROPERTY-INDEX-TABLE is a token list of
+
  the version; or close the connection.  Currently, the only released
keywords.  This return value enables the server to inform the user
+
  versions of NFILE are user version 2 and server version 2.
which file properties are meaningful on its file system.  The
+
 
keywords in PROPERTY-INDEX-TABLE can be used by the DIRECTORY command
+
  PROPERTY-INDEX-TABLE
(a user request for information on file properties of a specified
+
 
directory or directories).  The server can specify a certain property
+
  The value associated with PROPERTY-INDEX-TABLE is a token list of
by giving an integer that is the index of that file property into the
+
  keywords.  This return value enables the server to inform the user
PROPERTY-INDEX-TABLE.  This reduces the volume of data sent during
+
  which file properties are meaningful on its file system.  The
directory listings.  The first element in PROPERTY-INDEX-TABLE is
+
  keywords in PROPERTY-INDEX-TABLE can be used by the DIRECTORY command
indexed by the number 0.  See the section "DIRECTORY Command",
+
  (a user request for information on file properties of a specified
section 8.11.
+
  directory or directories).  The server can specify a certain property
 +
  by giving an integer that is the index of that file property into the
 +
  PROPERTY-INDEX-TABLE.  This reduces the volume of data sent during
 +
  directory listings.  The first element in PROPERTY-INDEX-TABLE is
 +
  indexed by the number 0.  See the section "DIRECTORY Command",
 +
  section 8.11.
  
 
8.19  MULTIPLE-FILE-PLISTS Command
 
8.19  MULTIPLE-FILE-PLISTS Command
  
Command:  (MULTIPLE-FILE-PLISTS tid input-handle paths
+
  Command:  (MULTIPLE-FILE-PLISTS tid input-handle paths
          characters properties)
+
              characters properties)
 +
 
 +
  Response: (MULTIPLE-FILE-PLISTS tid)
  
Response: (MULTIPLE-FILE-PLISTS tid)
+
  MULTIPLE-FILE-PLISTS returns file property information of one or more
 +
  files.  The server sends the information in a data structure (the
 +
  format is described later in this section) on the given input-handle.
 +
  paths is an embedded token list composed of the pathnames in which
 +
  the user is interested.  Each pathname in this list is a string in
 +
  the full pathname syntax of the server host.  Unlike for the
 +
  DIRECTORY command, wildcards are not allowed in these pathnames.  See
 +
  the section "Syntax of File and Directory Pathname Arguments",
 +
  section 7.4.
  
MULTIPLE-FILE-PLISTS returns file property information of one or more
+
  characters is either Boolean truth (indicating that each file is a
files.  The server sends the information in a data structure (the
+
  character file), the empty token list (each file is a binary file),
format is described later in this section) on the given input-handle.
+
  or the keyword DEFAULT. DEFAULT indicates that the server itself is
paths is an embedded token list composed of the pathnames in which
+
  to figure out whether a file is a character or binary fileFor more
the user is interestedEach pathname in this list is a string in
+
  information on the meaning of the DEFAULT keyword: See the section
the full pathname syntax of the server host.  Unlike for the
+
  "OPEN Command", section 8.20.  The value of characters can influence
DIRECTORY command, wildcards are not allowed in these pathnames. See
+
  some servers' idea of a file's length.
the section "Syntax of File and Directory Pathname Arguments",
 
section 7.4.
 
  
characters is either Boolean truth (indicating that each file is a
+
  properties is a token list of keywords indicating which properties
character file), the empty token list (each file is a binary file),
+
  the user wants returnedThe server is always free to return more
or the keyword DEFAULTDEFAULT indicates that the server itself is
+
  properties than those requested in the properties argument. If
to figure out whether a file is a character or binary file.  For more
+
  properties is supplied as the empty token list, the server should
information on the meaning of the DEFAULT keyword: See the section
+
  transmit all known properties on the files.
"OPEN Command", section 8.20.  The value of characters can influence
 
some servers' idea of a file's length.
 
  
properties is a token list of keywords indicating which properties
 
the user wants returned.  The server is always free to return more
 
properties than those requested in the properties argument.  If
 
properties is supplied as the empty token list, the server should
 
transmit all known properties on the files.
 
  
  
  
 +
Greenberg & Keene                                              [Page 34]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
The server transmits as much of the requested information as possible
+
  The server transmits as much of the requested information as possible
on the given input-handle.  The information is contained in a top-
+
  on the given input-handle.  The information is contained in a top-
level token list of elements.  Each element corresponds with a
+
  level token list of elements.  Each element corresponds with a
supplied pathname; the order of the original pathlist must be
+
  supplied pathname; the order of the original pathlist must be
retained in the returned token list.  An element is an empty token
+
  retained in the returned token list.  An element is an empty token
list if the corresponding file or any of its containing directories
+
  list if the corresponding file or any of its containing directories
does not exist.  The elements that correspond to successfully located
+
  does not exist.  The elements that correspond to successfully located
files are lists composed of truename followed by any properties.
+
  files are lists composed of truename followed by any properties.
properties are keyword/value pairs.  truename is a string in the full
+
  properties are keyword/value pairs.  truename is a string in the full
pathname syntax of the server host.
+
  pathname syntax of the server host.
  
The following example shows TOP-LEVEL-LIST-BEGIN and TOP-LEVEL-LIST-
+
  The following example shows TOP-LEVEL-LIST-BEGIN and TOP-LEVEL-LIST-
END as parentheses, and LIST-BEGIN and LIST-END with square brackets.
+
  END as parentheses, and LIST-BEGIN and LIST-END with square brackets.
  
For example, the user supplied a pathlist argument resembling:
+
  For example, the user supplied a pathlist argument resembling:
  
                        [file1 file2 file3]
+
                            [file1 file2 file3]
  
The server could not locate file1 or file3, but did locate file2, and
+
  The server could not locate file1 or file3, but did locate file2, and
found the length and author of file2.  The top-level token list
+
  found the length and author of file2.  The top-level token list
transmitted by the server is:
+
  transmitted by the server is:
  
    ( [] [ truename-of-file2 LENGTH 381 AUTHOR williams ] [] )
+
        ( [] [ truename-of-file2 LENGTH 381 AUTHOR williams ] [] )
  
For further detail on how file properties and values are expressed:
+
  For further detail on how file properties and values are expressed:
See the section "Format of NFILE File Property/Value Pairs", section
+
  See the section "Format of NFILE File Property/Value Pairs", section
7.5.
+
  7.5.
  
 
8.20  OPEN Command
 
8.20  OPEN Command
  
Command:  (OPEN tid handle pathname direction binary-p
+
  Command:  (OPEN tid handle pathname direction binary-p
            TEMPORARY RAW SUPER-IMAGE DELETED PRESERVE-DATES
+
                TEMPORARY RAW SUPER-IMAGE DELETED PRESERVE-DATES
            SUBMIT DIRECT-FILE-ID ESTIMATED-LENGTH BYTE-SIZE
+
                SUBMIT DIRECT-FILE-ID ESTIMATED-LENGTH BYTE-SIZE
            IF-EXISTS IF-DOES-NOT-EXIST)
+
                IF-EXISTS IF-DOES-NOT-EXIST)
 +
 
 +
  Response: (OPEN tid truename binary-p other-properties)
 +
 
 +
  OPEN opens a file for reading, writing, or direct access at the
 +
  server host.  That means, in general, asking the host file system to
 +
  access the file and obtaining a file number, pointer, or other
 +
  quantity for subsequent rapid access to the file; this is called an
 +
  "opening".  See the section "NFILE File Opening Modes", section 5.
 +
 
 +
  The OPEN command has the most complicated syntax of any NFILE
 +
  command.  The OPEN command has required arguments, an optional
 +
  argument, and many optional keyword/value pairs.  For details on the
 +
  syntax of each of these parts of the OPEN command:  See the section
 +
  "Conventions Used in This Document", section 7.
  
Response: (OPEN tid truename binary-p other-properties)
 
  
OPEN opens a file for reading, writing, or direct access at the
 
server host.  That means, in general, asking the host file system to
 
access the file and obtaining a file number, pointer, or other
 
quantity for subsequent rapid access to the file; this is called an
 
"opening".  See the section "NFILE File Opening Modes", section 5.
 
  
The OPEN command has the most complicated syntax of any NFILE
+
Greenberg & Keene                                              [Page 35]
command.  The OPEN command has required arguments, an optional
 
argument, and many optional keyword/value pairs.  For details on the
 
syntax of each of these parts of the OPEN command:  See the section
 
"Conventions Used in This Document", section 7.
 
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
  The following arguments are required:  pathname, direction, and
 +
  binary-p.  handle is an optional argument, which must either be
 +
  supplied or explicitly omitted by means of substituting in its place
 +
  the empty token list.
  
 +
  The OPEN command has many optional keyword/value pairs, which encode
 +
  conceptual arguments to the server file system for the OPEN
 +
  operation.  A detailed description of all the supported OPEN optional
 +
  keywords is given below.
  
The following arguments are required: pathname, direction, and
+
  The OPEN return values reflect information about the file opened,
binary-p.  handle is an optional argument, which must either be
+
  when the opening is successful. In the case of a probe-type opening,
supplied or explicitly omitted by means of substituting in its place
+
  this information is returned when the given file (or link, or
the empty token list.
+
  directory) exists and is accessible, even though the file (or link,
 +
  or directory) is not actually opened.  For detail on the OPEN return
 +
  values: See the section "NFILE OPEN Response Return Values", section
 +
  8.20.2.
  
The OPEN command has many optional keyword/value pairs, which encode
+
  THE pathname OPEN ARGUMENT
conceptual arguments to the server file system for the OPEN
 
operation.  A detailed description of all the supported OPEN optional
 
keywords is given below.
 
  
The OPEN return values reflect information about the file opened,
+
  The pathname is a required argument specifying the file to be opened.
when the opening is successful.  In the case of a probe-type opening,
+
  pathname is a string in the full pathname syntax of the server host.
this information is returned when the given file (or link, or
+
  See the section "Syntax of File and Directory Pathname Arguments",
directory) exists and is accessible, even though the file (or link,
+
  section 7.4.
or directory) is not actually opened. For detail on the OPEN return
 
values: See the section "NFILE OPEN Response Return Values", section
 
8.20.2.
 
  
THE pathname OPEN ARGUMENT
+
  For some purposes (for example, when the OPEN argument direction is
 +
  supplied as PROBE-DIRECTORY), only the directory specified by this
 +
  pathname is utilized.  See the section "NFILE OPEN Optional
 +
  Keyword/Value Pairs", section 8.20.1.
  
The pathname is a required argument specifying the file to be opened.
+
  THE handle OPEN ARGUMENT
pathname is a string in the full pathname syntax of the server host.
 
See the section "Syntax of File and Directory Pathname Arguments",
 
section 7.4.
 
  
For some purposes (for example, when the OPEN argument direction is
+
  The handle argument of the OPEN command specifies a data channel to
supplied as PROBE-DIRECTORY), only the directory specified by this
+
  be used for the transfer.  Subsequent commands in this session use
pathname is utilizedSee the section "NFILE OPEN Optional
+
  the same handle to specify this opening.  It is the user side's
Keyword/Value Pairs", section 8.20.1.
+
  responsibility to ensure that handle refers to an existing and free
 +
  data channel that does not require resynchronization before use.  A
 +
  handle must be supplied, unless a probe-type opening is desired (that
 +
  is, the direction is supplied as PROBE, PROBE-DIRECTORY, or PROBE-
 +
  LINK) or a direct access opening is being requested (that is, a
 +
  DIRECT-FILE-ID is supplied)In those cases, the empty token list is
 +
  supplied for handle.
  
THE handle OPEN ARGUMENT
+
  THE direction OPEN ARGUMENT
  
The handle argument of the OPEN command specifies a data channel to
+
  The direction argument must be supplied as one of these keywords:
be used for the transfer.  Subsequent commands in this session use
+
  INPUT, OUTPUT, IO, PROBE, PROBE-DIRECTORY, and PROBE-LINK.  The
the same handle to specify this opening.  It is the user side's
+
  meanings of the direction keywords are as follows:
responsibility to ensure that handle refers to an existing and free
 
data channel that does not require resynchronization before use.  A
 
handle must be supplied, unless a probe-type opening is desired (that
 
is, the direction is supplied as PROBE, PROBE-DIRECTORY, or PROBE-
 
LINK) or a direct access opening is being requested (that is, a
 
DIRECT-FILE-ID is supplied)In those cases, the empty token list is
 
supplied for handle.
 
  
THE direction OPEN ARGUMENT
 
  
The direction argument must be supplied as one of these keywords:
 
INPUT, OUTPUT, IO, PROBE, PROBE-DIRECTORY, and PROBE-LINK.  The
 
meanings of the direction keywords are as follows:
 
  
 +
Greenberg & Keene                                              [Page 36]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
  INPUT
  
INPUT
+
      Specifies that the file is to be opened for input server-to-user
 +
      transfer).  To request a direct access opening, supply a value for
 +
      DIRECT-FILE-ID. If no DIRECT-FILE-ID is supplied, the opening is a
 +
      data stream opening.
  
   Specifies that the file is to be opened for input server-to-user
+
   OUTPUT
  transfer).  To request a direct access opening, supply a value for
 
  DIRECT-FILE-ID. If no DIRECT-FILE-ID is supplied, the opening is a
 
  data stream opening.
 
  
OUTPUT
+
      Specifies that the file is to be opened for output user-to-server
 +
      transfer).  To request a direct access opening, supply a value for
 +
      DIRECT-FILE-ID. If no DIRECT-FILE-ID is supplied, the opening is a
 +
      data stream opening.
  
   Specifies that the file is to be opened for output user-to-server
+
   IO
  transfer).  To request a direct access opening, supply a value for
 
  DIRECT-FILE-ID. If no DIRECT-FILE-ID is supplied, the opening is a
 
  data stream opening.
 
  
IO
+
      Specifies that interspersed input and output will be performed on
 +
      the file.  This is only meaningful in direct access mode.  A
 +
      DIRECT-FILE-ID must also be supplied.  See the section "NFILE OPEN
 +
      Optional Keyword/Value Pairs", section 8.20.1.
  
   Specifies that interspersed input and output will be performed on
+
   If direction is supplied as PROBE, PROBE-LINK, or PROBE-DIRECTORY,
   the file.  This is only meaningful in direct access modeA
+
   the opening is said to be a probe-type openingThe DIRECT-FILE-ID
  DIRECT-FILE-ID must also be supplied.  See the section "NFILE OPEN
+
  option is meaningless and an error for probe-type openings.  The file
   Optional Keyword/Value Pairs", section 8.20.1.
+
  handle must be supplied as an empty token list for probe-type
 +
   openings.
  
If direction is supplied as PROBE, PROBE-LINK, or PROBE-DIRECTORY,
+
  PROBE
the opening is said to be a probe-type opening.  The DIRECT-FILE-ID
 
option is meaningless and an error for probe-type openings.  The file
 
handle must be supplied as an empty token list for probe-type
 
openings.
 
  
PROBE
+
      Specifies that the file is not to be opened at all, but simply
 +
      checked for existence.  If the file does not exist or is not
 +
      accessible, the error indications and actions are identical to
 +
      those that would be given for an INPUT opening.  If the file does
 +
      exist, the successful command response contains the same
 +
      information as it would have if the file had been opened for
 +
      INPUT.  If it is a link, the link is followed to its target.
  
   Specifies that the file is not to be opened at all, but simply
+
   PROBE-LINK
  checked for existence.  If the file does not exist or is not
 
  accessible, the error indications and actions are identical to
 
  those that would be given for an INPUT opening.  If the file does
 
  exist, the successful command response contains the same
 
  information as it would have if the file had been opened for
 
  INPUT.  If it is a link, the link is followed to its target.
 
  
PROBE-LINK
+
      Like PROBE, with one difference.  PROBE-LINK specifies that if the
 +
      pathname is found to refer to a link, that link is not to be
 +
      followed, and information about the link itself is to be returned.
  
  Like PROBE, with one difference.  PROBE-LINK specifies that if the
 
  pathname is found to refer to a link, that link is not to be
 
  followed, and information about the link itself is to be returned.
 
  
  
Line 1,963: Line 2,072:
  
  
 +
Greenberg & Keene                                              [Page 37]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
PROBE-DIRECTORY
+
  PROBE-DIRECTORY
  
  PROBE-DIRECTORY requests information about the directory
+
      PROBE-DIRECTORY requests information about the directory
  designated by the pathname argument.  In the PROBE-DIRECTORY case,
+
      designated by the pathname argument.  In the PROBE-DIRECTORY case,
  the pathname argument refers to the directory on which information
+
      the pathname argument refers to the directory on which information
  is requested.  In all other cases, the pathname refers to a file
+
      is requested.  In all other cases, the pathname refers to a file
  to be opened.  If pathname contains a file name and file type,
+
      to be opened.  If pathname contains a file name and file type,
  these parts of the pathname are ignored for PROBE-DIRECTORY
+
      these parts of the pathname are ignored for PROBE-DIRECTORY
  openings as long as they are syntactically valid.
+
      openings as long as they are syntactically valid.
  
THE binary-p OPEN ARGUMENT
+
  THE binary-p OPEN ARGUMENT
  
The value of binary-p affects the mode in which the server opens the
+
  The value of binary-p affects the mode in which the server opens the
file, as well as informing it whether or not character set
+
  file, as well as informing it whether or not character set
translation must be performed.
+
  translation must be performed.
  
If binary-p is supplied as the empty token list, the opening is said
+
  If binary-p is supplied as the empty token list, the opening is said
to be a character opening.  The server performs character set
+
  to be a character opening.  The server performs character set
translation between its native character set and the NFILE character
+
  translation between its native character set and the NFILE character
set.  The data is transferred over the data connection one character
+
  set.  The data is transferred over the data connection one character
per eight-bit byte.  See the section "NFILE Character Set", section
+
  per eight-bit byte.  See the section "NFILE Character Set", section
6.
+
  6.
  
If binary-p is supplied as Boolean truth, the opening is said to be a
+
  If binary-p is supplied as Boolean truth, the opening is said to be a
binary opening.  The user side supplies the byte size via the BYTE-
+
  binary opening.  The user side supplies the byte size via the BYTE-
SIZE option; if not supplied, the default byte size is 16 bits.  If
+
  SIZE option; if not supplied, the default byte size is 16 bits.  If
byte size is less than 9, the file data is transferred byte by byte.
+
  byte size is less than 9, the file data is transferred byte by byte.
If the byte size is 9 or greater, the server transfers each byte of
+
  If the byte size is 9 or greater, the server transfers each byte of
the file as two eight-bit bytes, low-order first.
+
  the file as two eight-bit bytes, low-order first.
  
binary-p can also be supplied as the keyword DEFAULT.  DEFAULT
+
  binary-p can also be supplied as the keyword DEFAULT.  DEFAULT
specifies that the server itself is to determine whether to transfer
+
  specifies that the server itself is to determine whether to transfer
binary or character data.  DEFAULT is meaningful only for input
+
  binary or character data.  DEFAULT is meaningful only for input
openings; it is an error for OUTPUT, IO, or probe-type openings.  For
+
  openings; it is an error for OUTPUT, IO, or probe-type openings.  For
file systems that maintain the innate binary or character nature of a
+
  file systems that maintain the innate binary or character nature of a
file, the server simply asks the file system which case is in force
+
  file, the server simply asks the file system which case is in force
for the file specified by pathname.
+
  for the file specified by pathname.
  
When binary-p is supplied as DEFAULT, on file systems that do not
+
  When binary-p is supplied as DEFAULT, on file systems that do not
maintain thisinformation, the server is required to perform a
+
  maintain thisinformation, the server is required to perform a
heuristic check for Symbolicsobject fileson the first two 16-bit
+
  heuristic check for Symbolicsobject fileson the first two 16-bit
bytes of the file.  If the file isdetermined to be aSymbolics object
+
  bytes of the file.  If the file isdetermined to be aSymbolics object
file, the server performs a BINARY openingwith BYTE-SIZE of16;
+
  file, the server performs a BINARY openingwith BYTE-SIZE of16;
otherwise, it performs a CHARACTER opening.
+
  otherwise, it performs a CHARACTER opening.
  
  
Line 2,017: Line 2,128:
  
  
 +
Greenberg & Keene                                              [Page 38]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
The details of the check are as follows: if the first 16-bit byte is
+
 
the octal number170023 and the second 16-bit byte is any number
+
  The details of the check are as follows: if the first 16-bit byte is
between 0 and 77 octal(inclusive), the file is recognized as a
+
  the octal number170023 and the second 16-bit byte is any number
Symbolics object file.  In any othercase, it is not.
+
  between 0 and 77 octal(inclusive), the file is recognized as a
 +
  Symbolics object file.  In any othercase, it is not.
  
 
8.20.1  NFILE OPEN Optional Keyword/Value Pairs
 
8.20.1  NFILE OPEN Optional Keyword/Value Pairs
  
The OPEN command has many optional keyword/value pairs that encode
+
  The OPEN command has many optional keyword/value pairs that encode
conceptual arguments to the file system for the OPEN operation.
+
  conceptual arguments to the file system for the OPEN operation.
 +
 
 +
  The following options are used often:
 +
 
 +
  BYTE-SIZE
 +
 
 +
      Must be followed by an integer between 1 and 16, inclusive, or the
 +
      empty token list.  BYTE-SIZE is meaningful only for binary
 +
      openings.  BYTE-SIZE can be ignored for probe-type openings.  It
 +
      can be omitted entirely for character openings, but if supplied,
 +
      must be followed by the empty token list.  If binary-p is supplied
 +
      as DEFAULT, BYTE-SIZE can be omitted entirely, or followed by the
 +
      empty token list.
 +
 
 +
      If a binary opening is requested and BYTE-SIZE is not supplied,
 +
      the assumed value is 16 for output openings. For input binary
 +
      openings, the default is the host file system's stored conception
 +
      of the file's byte size (for those hosts that natively support
 +
      byte size).  For file systems that do not natively support
 +
      natively byte size, the default byte-size on binary input is 16.
 +
 
 +
      For file systems that maintain the innate byte-size of each file,
 +
      the server should supply this number to the appropriate operating
 +
      system interface that performs the semantics of opening the file.
 +
      For other operating systems, a file written with a given byte size
 +
      must produce the same bytes in the same order when read with that
 +
      byte size.  In this case, the server or host operating system can
 +
      choose any packing scheme that complies with this rule.
 +
 
 +
      Operating systems that do not support byte size must ensure that
 +
      binary files written from user ends of the current protocol can be
 +
      read back correctly.  However, the server can choose packing
 +
      schemes that allow all bits of the server host's word to be
 +
      accessed and concur with other packing schemes used by native host
 +
      software.
  
The following options are used often:
+
      For example, Multics supports 36 bit words and 9 bit bytes.  A
 +
      packing scheme appropriate for a Multics NFILE server is:
  
BYTE-SIZE
 
  
  Must be followed by an integer between 1 and 16, inclusive, or the
 
  empty token list.  BYTE-SIZE is meaningful only for binary
 
  openings.  BYTE-SIZE can be ignored for probe-type openings.  It
 
  can be omitted entirely for character openings, but if supplied,
 
  must be followed by the empty token list.  If binary-p is supplied
 
  as DEFAULT, BYTE-SIZE can be omitted entirely, or followed by the
 
  empty token list.
 
  
  If a binary opening is requested and BYTE-SIZE is not supplied,
 
  the assumed value is 16 for output openings. For input binary
 
  openings, the default is the host file system's stored conception
 
  of the file's byte size (for those hosts that natively support
 
  byte size).  For file systems that do not natively support
 
  natively byte size, the default byte-size on binary input is 16.
 
  
  For file systems that maintain the innate byte-size of each file,
 
  the server should supply this number to the appropriate operating
 
  system interface that performs the semantics of opening the file.
 
  For other operating systems, a file written with a given byte size
 
  must produce the same bytes in the same order when read with that
 
  byte size.  In this case, the server or host operating system can
 
  choose any packing scheme that complies with this rule.
 
  
  Operating systems that do not support byte size must ensure that
+
Greenberg & Keene                                              [Page 39]
  binary files written from user ends of the current protocol can be
 
  read back correctly.  However, the server can choose packing
 
  schemes that allow all bits of the server host's word to be
 
  accessed and concur with other packing schemes used by native host
 
  software.
 
  
  For example, Multics supports 36 bit words and 9 bit bytes.  A
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  packing scheme appropriate for a Multics NFILE server is:
 
  
  
 +
              Byte Size                Packing Scheme
  
 +
              7, 8, or 9 bits          four per 36-bit word
 +
              10, 11, or 12 bits      three per 36-bit word
 +
              13, 14, 15, or 16 bits  two per 36-bit word
  
 +
      In the first packing scheme in the table, native Multics
 +
      character-oriented software can access each logical byte
 +
      sequentially.  In the last packing scheme, each Symbolics byte is
 +
      in a halfword, easily accessible and visible in an octal
 +
      representation.  To achieve maximum data transfer rate and access
 +
      all bits of a Multics word, a byte size of 12 must be specified.
  
 +
  DELETED
  
 +
      If supplied as Boolean truth, DELETED specifies that deleted"
 +
      files are to be treated as though they were not "deleted".
 +
      DELETED is meaningful only for operating systems that support
 +
      "soft deletion" and subsequent "undeletion" of files.  Other
 +
      operating systems must ignore this option.  Normally, deleted
 +
      files are not visible to the OPEN operation; this option makes
 +
      them visible.
  
            Byte Size                Packing Scheme
+
      DELETED can also be followed by the empty token list, which has
 +
      the same effect as omitting the DELETED keyword/value pair
 +
      entirely.  For output openings, DELETED is meaningless and an
 +
      error if supplied.
  
            7, 8, or 9 bits          four per 36-bit word
+
  DIRECT-FILE-ID
            10, 11, or 12 bits      three per 36-bit word
 
            13, 14, 15, or 16 bits  two per 36-bit word
 
  
  In the first packing scheme in the table, native Multics
+
      If supplied, the DIRECT-FILE-ID indicates that the opening is to
  character-oriented software can access each logical byte
+
      be a direct access mode opening.  If not supplied, the opening is
  sequentiallyIn the last packing scheme, each Symbolics byte is
+
      a data stream openingThe value of DIRECT-FILE-ID is a string
  in a halfword, easily accessible and visible in an octal
+
      generated by the user, that has not been used as a DIRECT-FILE-ID
  representationTo achieve maximum data transfer rate and access
+
      in this dialogue, and does not designate any data channel.  The
  all bits of a Multics word, a byte size of 12 must be specified.
+
      DIRECT-FILE-ID is a unique identifier for the direct access
 +
      opening.  It is used for all operations that identify an opening
 +
      rather than a data channelThe DIRECT-FILE-ID is used to
 +
      identify a direct access opening, just as a file handle is used to
 +
      identify a data stream opening.  The PROPERTIES, CLOSE, and RENAME
 +
      commands use the DIRECT-FILE-ID in this way.  There are only two
 +
      NFILE commands applicable to direct access openings (ABORT and
 +
      CONTINUE) that do not use the DIRECT-FILE-ID, but use a data
 +
      channel handle instead.
  
DELETED
+
  PRESERVE-DATES
  
  If supplied as Boolean truth, DELETED specifies that deleted"
+
      If supplied as Boolean truth, PRESERVE-DATES specifies that the
  files are to be treated as though they were not "deleted".
 
  DELETED is meaningful only for operating systems that support
 
  "soft deletion" and subsequent "undeletion" of files.  Other
 
  operating systems must ignore this option.  Normally, deleted
 
  files are not visible to the OPEN operation; this option makes
 
  them visible.
 
  
  DELETED can also be followed by the empty token list, which has
 
  the same effect as omitting the DELETED keyword/value pair
 
  entirely.  For output openings, DELETED is meaningless and an
 
  error if supplied.
 
  
DIRECT-FILE-ID
 
  
  If supplied, the DIRECT-FILE-ID indicates that the opening is to
+
Greenberg & Keene                                              [Page 40]
  be a direct access mode opening.  If not supplied, the opening is
 
  a data stream opening.  The value of DIRECT-FILE-ID is a string
 
  generated by the user, that has not been used as a DIRECT-FILE-ID
 
  in this dialogue, and does not designate any data channel.  The
 
  DIRECT-FILE-ID is a unique identifier for the direct access
 
  opening.  It is used for all operations that identify an opening
 
  rather than a data channel.  The DIRECT-FILE-ID is used to
 
  identify a direct access opening, just as a file handle is used to
 
  identify a data stream opening.  The PROPERTIES, CLOSE, and RENAME
 
  commands use the DIRECT-FILE-ID in this way.  There are only two
 
  NFILE commands applicable to direct access openings (ABORT and
 
  CONTINUE) that do not use the DIRECT-FILE-ID, but use a data
 
  channel handle instead.
 
  
PRESERVE-DATES
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  If supplied as Boolean truth, PRESERVE-DATES specifies that the
 
  
 +
      server is to attempt to prevent the operating system from updating
 +
      the "reference date" or date-time used" of the file.  This is
 +
      meaningful only for input openings, and is an error otherwise.
  
 +
      The Symbolics operating system invokes this option for operations
 +
      such as View File in the editor, where it wishes to assert that
 +
      the user did not "read" the file, but just "looked at it".
 +
      Servers on operating systems that do not support reference dates
 +
      or users revising or suppressing update of the reference dates
 +
      must ignore this option.
  
 +
  ESTIMATED-LENGTH
  
 +
      The value of ESTIMATED-LENGTH is an integer estimating the length
 +
      of the file to be transferred. This option is meaningful and
 +
      permitted only for output openings.  ESTIMATED-LENGTH enables the
 +
      user end to suggest to the server's file system how long the file
 +
      is going to be.  This can be useful for file systems that must
 +
      preallocate files or file maps or that accrue performance benefits
 +
      from knowing this information at nthe time the file is first
 +
      opened.  This estimate, if supplied, is not required to be exact.
 +
      It is ignored by servers to which it is not useful or interesting.
 +
      The units of the estimate are characters for character openings,
 +
      and bytes of the agreed-upon byte size for binary openings.  The
 +
      character units should be server units, if possible, but since
 +
      this is only an estimate, NFILE character units are acceptable.
 +
      See the section "NFILE Character Set", section 6.
  
   server is to attempt to prevent the operating system from updating
+
   IF-EXISTS
  the "reference date" or date-time used" of the file.  This is
 
  meaningful only for input openings, and is an error otherwise.
 
  
  The Symbolics operating system invokes this option for operations
+
      Meaningful only for output openings, ignored otherwise, but not
  such as View File in the editor, where it wishes to assert that
+
      diagnosed as an error.  The value of IF-EXISTS is a keyword that
  the user did not "read" the file, but just "looked at it".
+
      specifies the action to Be taken if a file of the given name
  Servers on operating systems that do not support reference dates
+
      already exists.  The semantics of the values are derived from the
  or users revising or suppressing update of the reference dates
+
      Common Lisp specification and repeated here for completeness. If
  must ignore this option.
+
      the file does not already exist, the IF-EXISTS option and its
 +
      value are ignored.
  
ESTIMATED-LENGTH
+
      If the user side does not give the IF-EXISTS option, The action to
 +
      be taken if a file of the given name already exists depends on
 +
      whether or not the file system supports file versions.  If it
 +
      does, the default is ERROR (if an explicit version is given in the
 +
      file pathname) or NEW-VERSION (if the version in the file pathname
 +
      is the newest version).  For file systems not supporting versions,
 +
      the default is SUPERSEDE.  These actions are described below.
  
  The value of ESTIMATED-LENGTH is an integer estimating the length
 
  of the file to be transferred. This option is meaningful and
 
  permitted only for output openings.  ESTIMATED-LENGTH enables the
 
  user end to suggest to the server's file system how long the file
 
  is going to be.  This can be useful for file systems that must
 
  preallocate files or file maps or that accrue performance benefits
 
  from knowing this information at nthe time the file is first
 
  opened.  This estimate, if supplied, is not required to be exact.
 
  It is ignored by servers to which it is not useful or interesting.
 
  The units of the estimate are characters for character openings,
 
  and bytes of the agreed-upon byte size for binary openings.  The
 
  character units should be server units, if possible, but since
 
  this is only an estimate, NFILE character units are acceptable.
 
  See the section "NFILE Character Set", section 6.
 
  
IF-EXISTS
 
  
  Meaningful only for output openings, ignored otherwise, but not
 
  diagnosed as an error.  The value of IF-EXISTS is a keyword that
 
  specifies the action to Be taken if a file of the given name
 
  already exists.  The semantics of the values are derived from the
 
  Common Lisp specification and repeated here for completeness.  If
 
  the file does not already exist, the IF-EXISTS option and its
 
  value are ignored.
 
  
  If the user side does not give the IF-EXISTS option, The action to
 
  be taken if a file of the given name already exists depends on
 
  whether or not the file system supports file versions.  If it
 
  does, the default is ERROR (if an explicit version is given in the
 
  file pathname) or NEW-VERSION (if the version in the file pathname
 
  is the newest version).  For file systems not supporting versions,
 
  the default is SUPERSEDE.  These actions are described below.
 
  
  
 +
Greenberg & Keene                                              [Page 41]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
      IF-EXISTS provides the mechanism for overwriting or appending to
 +
      files.  With the default setting of IF-EXISTS, new files are
 +
      created by every output opening.
  
 +
      Operating systems supporting soft deletion can take different
 +
      actions if a "deleted" file already exists with the same name (and
 +
      type and version, where appropriate) as a file to be created.  The
 +
      Symbolics file system (LMFS) effectively uses SUPERSEDE, even if
 +
      not asked to do so.  Other servers and file systems are urged to
 +
      do similarly.  Recommended action is to not allow deleted files to
 +
      prevent successful file creation (with specific version number)
 +
      even if an IF-EXISTS option weaker than SUPERSEDE, RENAME, or
 +
      RENAME-AND-DELETE is specified or implied.
  
 +
      Here are the possible values and their meanings:
  
  IF-EXISTS provides the mechanism for overwriting or appending to
+
      ERROR
  files.  With the default setting of IF-EXISTS, new files are
 
  created by every output opening.
 
  
  Operating systems supporting soft deletion can take different
+
        Reports an error.
  actions if a "deleted" file already exists with the same name (and
 
  type and version, where appropriate) as a file to be created.  The
 
  Symbolics file system (LMFS) effectively uses SUPERSEDE, even if
 
  not asked to do so.  Other servers and file systems are urged to
 
  do similarly.  Recommended action is to not allow deleted files to
 
  prevent successful file creation (with specific version number)
 
  even if an IF-EXISTS option weaker than SUPERSEDE, RENAME, or
 
  RENAME-AND-DELETE is specified or implied.
 
  
  Here are the possible values and their meanings:
+
      NEW-VERSION
  
  ERROR
+
        Creates a new file with the same file name but with a larger
 +
        version number.  This is the default when the version component
 +
        of the filename is newest.  File systems without version
 +
        numbers can implement this by effectively treating it as
 +
        SUPERSEDE.
  
       Reports an error.
+
       RENAME
  
  NEW-VERSION
+
        Renames the existing file to some other name and then creates a
 +
        new file with the specified name.  On most file systems, this
 +
        renaming happens at the time of a successful close.
  
       Creates a new file with the same file name but with a larger
+
       RENAME-AND-DELETE
      version number.  This is the default when the version component
 
      of the filename is newest.  File systems without version
 
      numbers can implement this by effectively treating it as
 
      SUPERSEDE.
 
  
  RENAME
+
        Renames the existing file to some other name and then deletes
 +
        it (but does not expunge it, on those systems that distinguish
 +
        deletion from expunging).  Then it creates a new file with the
 +
        specified name.  On most file systems, this renaming happens at
 +
        the time of a successful close.
  
       Renames the existing file to some other name and then creates a
+
       OVERWRITE
      new file with the specified name.  On most file systems, this
 
      renaming happens at the time of a successful close.
 
  
  RENAME-AND-DELETE
+
        Output operations on the opening destructively modify the
 +
        existing file.  New data replaces old data at the beginning of
 +
        the file; however, the file is not truncated to length zero
 +
        upon opening.
  
      Renames the existing file to some other name and then deletes
 
      it (but does not expunge it, on those systems that distinguish
 
      deletion from expunging).  Then it creates a new file with the
 
      specified name.  On most file systems, this renaming happens at
 
      the time of a successful close.
 
  
  OVERWRITE
 
  
      Output operations on the opening destructively modify the
+
Greenberg & Keene                                              [Page 42]
      existing file.  New data replaces old data at the beginning of
 
      the file; however, the file is not truncated to length zero
 
      upon opening.
 
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
      TRUNCATE
  
 +
        Output operations on the opening destructively modify the
 +
        existing file.  The file pointer is initially positioned at the
 +
        beginning of the file; at that time, TRUNCATE truncates the
 +
        file to length zero and frees disk storage occupied by it.
  
  TRUNCATE
+
      APPEND
  
      Output operations on the opening destructively modify the
+
        Output operations on the opening destructively modify the
      existing file.  The file pointer is initially positioned at the
+
        existing file.  New data is placed at the current end of the
      beginning of the file; at that time, TRUNCATE truncates the
+
        file.
      file to length zero and frees disk storage occupied by it.
 
  
  APPEND
+
      SUPERSEDE
  
      Output operations on the opening destructively modify the
+
        Supersedes the existing file.  This means that the old file is
      existing file.  New data is placed at the current end of the
+
        removed or deleted and expunged.  The new file takes its place.
      file.
+
        If possible, the file system does not destroy the old file
 +
        until the new file is closed, against the possibility that the
 +
        file will be close-abortedThis differs from NEW-VERSION in
 +
        that SUPERSEDE creates a new file with the same name as the old
 +
        one, rather than a file name with a higher version number.
  
  SUPERSEDE
+
        There are currently no standards on what a server can do if it
 +
        cannot implement some of these actions.
  
      Supersedes the existing file.  This means that the old file is
+
  IF-DOES-NOT-EXIST
      removed or deleted and expunged.  The new file takes its place.
 
      If possible, the file system does not destroy the old file
 
      until the new file is closed, against the possibility that the
 
      file will be close-aborted.  This differs from NEW-VERSION in
 
      that SUPERSEDE creates a new file with the same name as the old
 
      one, rather than a file name with a higher version number.
 
  
       There are currently no standards on what a server can do if it
+
       Meaningful for input openings, never meaningful for probe-type
       cannot implement some of these actions.
+
      openings, and sometimes meaningful for output openings.  IF-DOES-
 +
      NOT-EXIST takes a value token, which specifies the action to be
 +
      taken if the file does not already exist.  Like IF-EXISTS, it is a
 +
       derivative of Common Lisp.  The default is as follows: If this is
 +
      a probe-type opening or read opening, or if the IF-EXISTS option
 +
      is specified as OVERWRITE, TRUNCATE, or APPEND, the default is
 +
      ERROR.  Otherwise, the default is CREATE.
  
IF-DOES-NOT-EXIST
+
      These are the values for IF-DOES-NOT-EXIST:
  
  Meaningful for input openings, never meaningful for probe-type
+
      ERROR
  openings, and sometimes meaningful for output openings.  IF-DOES-
 
  NOT-EXIST takes a value token, which specifies the action to be
 
  taken if the file does not already exist.  Like IF-EXISTS, it is a
 
  derivative of Common Lisp.  The default is as follows: If this is
 
  a probe-type opening or read opening, or if the IF-EXISTS option
 
  is specified as OVERWRITE, TRUNCATE, or APPEND, the default is
 
  ERROR.  Otherwise, the default is CREATE.
 
  
  These are the values for IF-DOES-NOT-EXIST:
+
        Reports an error.
  
  ERROR
+
      CREATE
  
      Reports an error.
+
        Creates an empty file with the specified name and then proceeds
 +
        as if it already existed.
  
  CREATE
 
  
      Creates an empty file with the specified name and then proceeds
 
      as if it already existed.
 
  
  
 +
Greenberg & Keene                                              [Page 43]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
  The following optional keyword/value pairs are rarely used, if ever:
  
The following optional keyword/value pairs are rarely used, if ever:
+
  RAW
  
RAW
+
      If supplied as Boolean truth, RAW specifies that character set
 +
      translation is not to be performed, but that characters are to be
 +
      transferred intact, without inspection.  This option is meaningful
 +
      only for character openings; it is an error otherwise.  It is also
 +
      an error to supply RAW as Boolean truth for probe-type openings.
 +
      RAW can also be followed by the empty token list, which has the
 +
      same effect as if the RAW keyword/value pair were omitted
 +
      entirely.  See the section "RAW Translation Mode", Appendix B.
  
   If supplied as Boolean truth, RAW specifies that character set
+
   SUPER-IMAGE
  translation is not to be performed, but that characters are to be
 
  transferred intact, without inspection.  This option is meaningful
 
  only for character openings; it is an error otherwise.  It is also
 
  an error to supply RAW as Boolean truth for probe-type openings.
 
  RAW can also be followed by the empty token list, which has the
 
  same effect as if the RAW keyword/value pair were omitted
 
  entirely.  See the section "RAW Translation Mode", Appendix B.
 
  
SUPER-IMAGE
+
      If supplied as Boolean truth, SUPER-IMAGE specifies that Rubout
 +
      quoting is not to be performed.  This operation is meaningful only
 +
      for character openings; it is an error otherwise.  It is also an
 +
      error for probe-type openings.  SUPER-IMAGE can also be followed
 +
      by the empty token list, which has the same effect as if the
 +
      SUPER-IMAGE keyword/value pair were omitted entirely.
  
  If supplied as Boolean truth, SUPER-IMAGE specifies that Rubout
+
      SUPER-IMAGE mode causes the server to read or write character
  quoting is not to be performed.  This operation is meaningful only
+
      files where ASCII Rubout characters are a significant part of the
  for character openings; it is an error otherwise.  It is also an
+
      file content, not where they are an escape for this protocol.
  error for probe-type openings. SUPER-IMAGE can also be followed
+
      However, other translations must still be performed:  See the
  by the empty token list, which has the same effect as if the
+
      section SUPER-IMAGE Translation Mode", Appendix C.
  SUPER-IMAGE keyword/value pair were omitted entirely.
 
  
   SUPER-IMAGE mode causes the server to read or write character
+
   TEMPORARY
  files where ASCII Rubout characters are a significant part of the
 
  file content, not where they are an escape for this protocol.
 
  However, other translations must still be performed:  See the
 
  section SUPER-IMAGE Translation Mode", Appendix C.
 
  
TEMPORARY
+
      Used by the TOPS-20 server only.  TEMPORARY says to use GJ%TMP in
 +
      the GTJFN.  This is useful mainly when writing files, and
 +
      indicates that the foreign operating system is to treat the file
 +
      as temporary.  See TOPS-20 documentation for more about the
 +
      implications of this option.  Other servers can ignore it.  This
 +
      option is meaningless and an error for input or probe-type
 +
      openings.  TEMPORARY can also be followed by the empty token list,
 +
      which has the same effect as if the TEMPORARY keyword/value pair
 +
      were omitted entirely.
  
   Used by the TOPS-20 server only.  TEMPORARY says to use GJ%TMP in
+
   SUBMIT
  the GTJFN.  This is useful mainly when writing files, and
 
  indicates that the foreign operating system is to treat the file
 
  as temporary.  See TOPS-20 documentation for more about the
 
  implications of this option.  Other servers can ignore it.  This
 
  option is meaningless and an error for input or probe-type
 
  openings.  TEMPORARY can also be followed by the empty token list,
 
  which has the same effect as if the TEMPORARY keyword/value pair
 
  were omitted entirely.
 
  
SUBMIT
+
      SUBMIT is meaningful for output only.  If supplied as Boolean
 +
      truth, SUBMIT causes the server to submit the contents of the file
 +
      being written to the operating system as a job, after the file is
 +
      closed.  VMS is an example of an operating system that could
 +
      conveniently support SUBMIT.  SUBMIT can also be followed by the
 +
      empty token list, which has the same effect as if the SUBMIT
  
  SUBMIT is meaningful for output only.  If supplied as Boolean
 
  truth, SUBMIT causes the server to submit the contents of the file
 
  being written to the operating system as a job, after the file is
 
  closed.  VMS is an example of an operating system that could
 
  conveniently support SUBMIT.  SUBMIT can also be followed by the
 
  empty token list, which has the same effect as if the SUBMIT
 
  
  
 +
Greenberg & Keene                                              [Page 44]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
  keyword/value pair were omitted entirely.  Servers that do not
+
      keyword/value pair were omitted entirely.  Servers that do not
  implement this option should give an error response if requested
+
      implement this option should give an error response if requested
  to submit a file to the operating system.
+
      to submit a file to the operating system.
  
 
8.20.2  NFILE OPEN Response Return Values
 
8.20.2  NFILE OPEN Response Return Values
  
The results of a successful OPEN operation are reported in the
+
  The results of a successful OPEN operation are reported in the
command response.  Here is the specification of the OPEN response
+
  command response.  Here is the specification of the OPEN response
format:
+
  format:
  
Response Format:
+
  Response Format:
  
  (OPEN tid truename binary-p other-properties)
+
      (OPEN tid truename binary-p other-properties)
  
The return values for OPEN and CLOSE are syntactically identical, but
+
  The return values for OPEN and CLOSE are syntactically identical, but
the values can change in the time interval between open and close.
+
  the values can change in the time interval between open and close.
  
truename is a string representing the pathname of the file in the
+
  truename is a string representing the pathname of the file in the
full pathname syntax of the server host.  It should be determined by
+
  full pathname syntax of the server host.  It should be determined by
the server once it has opened the file, via some request to its
+
  the server once it has opened the file, via some request to its
operating system.  The request can be of the form:  "What file
+
  operating system.  The request can be of the form:  "What file
corresponds to this JFN, file number, pointer, etc.?"  If the
+
  corresponds to this JFN, file number, pointer, etc.?"  If the
operating system supports version numbers, this string always
+
  operating system supports version numbers, this string always
contains an explicit version number.  It always contains a directory
+
  contains an explicit version number.  It always contains a directory
name, a file name, and so on.
+
  name, a file name, and so on.
  
Some operating systems might not know the truename of an output file
+
  Some operating systems might not know the truename of an output file
until it is closed.  It is permissible not to supply an explicit
+
  until it is closed.  It is permissible not to supply an explicit
version number in the pathname in the OPEN response in this specific
+
  version number in the pathname in the OPEN response in this specific
case.  On these systems the truename when the file is opened is
+
  case.  On these systems the truename when the file is opened is
different than the truename after it has been closed.
+
  different than the truename after it has been closed.
  
The return value binary-p indicates whether the opening is a binary
+
  The return value binary-p indicates whether the opening is a binary
or character opening.  For binary openings, binary-p is supplied as
+
  or character opening.  For binary openings, binary-p is supplied as
Boolean truth; for character openings it is the empty token list.
+
  Boolean truth; for character openings it is the empty token list.
  
other-properties is a list of keyword/value pairs.  other-properties
+
  other-properties is a list of keyword/value pairs.  other-properties
must contain CREATION-DATE and LENGTH.  AUTHOR should be included if
+
  must contain CREATION-DATE and LENGTH.  AUTHOR should be included if
the server operating system has a convenient mechanism for
+
  the server operating system has a convenient mechanism for
determining the author of the sfile.  The other properties described
+
  determining the author of the sfile.  The other properties described
here can be included if desired.
+
  here can be included if desired.
  
AUTHOR
+
  AUTHOR
  
The value of AUTHOR is a string representing the name of the author
+
  The value of AUTHOR is a string representing the name of the author
of the file.  This is some kind of user identifier, whose format is
+
  of the file.  This is some kind of user identifier, whose format is
system-specific.  As with CREATION-DATE (see below), AUTHOR is
+
  system-specific.  As with CREATION-DATE (see below), AUTHOR is
supposed to represent the logical determinor of the current data
+
  supposed to represent the logical determinor of the current data
  
  
  
 +
Greenberg & Keene                                              [Page 45]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
content of the file, not necessarily the agency that actually created
 
the file.
 
  
BYTE-SIZE
+
  content of the file, not necessarily the agency that actually created
 +
  the file.
  
The byte-size agreed upon via the rules described for the BYTE-SIZE
+
  BYTE-SIZE
option.  The value of BYTE-SIZE is an integer.  For details on the
 
ramifications of BYTE-SIZE:  See the section "NFILE OPEN Optional
 
Keyword/Value Pairs", section 8.20.1.  This parameter is only
 
meaningful for BINARY openings.  However, if FILEPOS is returned in
 
the other-properties list, BYTE-SIZE should also be included, even
 
for character openings.
 
  
CREATION-DATE
+
  The byte-size agreed upon via the rules described for the BYTE-SIZE
 +
  option.  The value of BYTE-SIZE is an integer.  For details on the
 +
  ramifications of BYTE-SIZE:  See the section "NFILE OPEN Optional
 +
  Keyword/Value Pairs", section 8.20.1.  This parameter is only
 +
  meaningful for BINARY openings.  However, if FILEPOS is returned in
 +
  the other-properties list, BYTE-SIZE should also be included, even
 +
  for character openings.
  
The creation date of the file.  The date is expressed in Universal
+
  CREATION-DATE
Time format, which measures a time as the number of seconds since
 
January 1, 1900, at midnight GMT.  Creation date does not necessarily
 
mean the time the file system created the directory entry or records
 
of the file.  For systems that support modification or appending to
 
files, it is usually the modification date of the file.  Creation
 
date can mean the date that the bit count or byte count of the file
 
was set by an application program.
 
  
Some types of file systems support a user-settable quantity
+
  The creation date of the file.  The date is expressed in Universal
(CREATION-DATE) which the user can set to an arbitrary time, to
+
  Time format, which measures a time as the number of seconds since
indicate that the contents of this file were written a long time ago
+
  January 1, 1900, at midnight GMT.  Creation date does not necessarily
by someone else on another computerThe default value of this
+
  mean the time the file system created the directory entry or records
quantity, if the user has not set it, is the time someone last
+
  of the file.  For systems that support modification or appending to
modified the information in the file.  This quantity, in the OPEN
+
  files, it is usually the modification date of the file.  Creation
response for an output file, is disregarded by the user side, but
+
  date can mean the date that the bit count or byte count of the file
nevertheless must be present.
+
  was set by an application program.
  
The Symbolics computer system software uses this quantity as a unique
+
  Some types of file systems support a user-settable quantity
identifier of file contents, for a given file name, type, and
+
  (CREATION-DATE) which the user can set to an arbitrary time, to
version, to prove that a file has not changed since it last recorded
+
  indicate that the contents of this file were written a long time ago
this quantity for a file.
+
  by someone else on another computer.  The default value of this
 +
  quantity, if the user has not set it, is the time someone last
 +
  modified the information in the file.  This quantity, in the OPEN
 +
  response for an output file, is disregarded by the user side, but
 +
  nevertheless must be present.
  
FILEPOS
+
  The Symbolics computer system software uses this quantity as a unique
 +
  identifier of file contents, for a given file name, type, and
 +
  version, to prove that a file has not changed since it last recorded
 +
  this quantity for a file.
  
An integer giving the position of the logical file pointer, in
+
  FILEPOS
characters or bytes as appropriate for the type of opening.  This is
 
always zero for an input opening and for an output opening creating a
 
new file.  For an output opening appending to an existing file,
 
FILEPOS is the number of characters or bytes, as appropriate,
 
currently in the file.  This number, for character openings, is
 
measured in server units: See the section "NFILE Character Set",
 
section 6.
 
  
 +
  An integer giving the position of the logical file pointer, in
 +
  characters or bytes as appropriate for the type of opening.  This is
 +
  always zero for an input opening and for an output opening creating a
 +
  new file.  For an output opening appending to an existing file,
 +
  FILEPOS is the number of characters or bytes, as appropriate,
 +
  currently in the file.  This number, for character openings, is
 +
  measured in server units: See the section "NFILE Character Set",
 +
  section 6.
  
  
  
 +
Greenberg & Keene                                              [Page 46]
  
LENGTH
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
An integer reporting the length of the file, in characters for
+
 
character openings and in bytes of the agreed-upon size for binary
+
  LENGTH
openings.  LENGTH should be reported as zero for output openings,
+
 
even if appending to an existing file.  The server usually only knows
+
  An integer reporting the length of the file, in characters for
the length for a character opening in server units; thus, it reports
+
  character openings and in bytes of the agreed-upon size for binary
length in server units.
+
  openings.  LENGTH should be reported as zero for output openings,
 +
  even if appending to an existing file.  The server usually only knows
 +
  the length for a character opening in server units; thus, it reports
 +
  length in server units.
  
 
8.21  PROPERTIES Command
 
8.21  PROPERTIES Command
  
Command:  (PROPERTIES tid handle pathname control-keywords
+
  Command:  (PROPERTIES tid handle pathname control-keywords
properties)
+
  properties)
 +
 
 +
  Response: (PROPERTIES tid property-element settable-properties)
 +
 
 +
  PROPERTIES requests the property information about one file.  The
 +
  file is identified by the pathname argument or the handle argument,
 +
  but not both.  If pathname is supplied, it is a string in the full
 +
  pathname syntax of the server host.  See the section "Syntax of File
 +
  and Directory Pathname Arguments", section 7.4.
  
Response: (PROPERTIES tid property-element settable-properties)
+
  If handle is supplied, its value is a string identifying an opening,
 +
  which implicitly identifies a file.  For direct access mode openings,
 +
  handle must be a direct file identifier.
  
PROPERTIES requests the property information about one file.  The
+
  control-keywords is reserved in the current designHowever, it is a
file is identified by the pathname argument or the handle argument,
+
  required argument, and must be supplied as the empty token list.  Its
but not bothIf pathname is supplied, it is a string in the full
+
  presence in the NFILE specification allows for future expansionIn
pathname syntax of the server hostSee the section "Syntax of File
+
  the future the value of control-keywords might affect the listing
and Directory Pathname Arguments", section 7.4.
+
  mode.
  
If handle is supplied, its value is a string identifying an opening,
+
  properties is a token list of keywords indicating the properties the
which implicitly identifies a file.  For direct access mode openings,
+
  user wants returned.  (In command arguments, properties cannot be
handle must be a direct file identifier.
+
  specified with integers, such as indices into the Property Index
 +
  Table).  For a list of keywords associated with file properties:  See
 +
  the section "Format of NFILE File Property/Value Pairs", section 7.5.
  
control-keywords is reserved in the current designHowever, it is a
+
  The server is always free to return more properties than those
required argument, and must be supplied as the empty token list.  Its
+
  requested in the properties argumentIf properties is supplied as
presence in the NFILE specification allows for future expansion.  In
+
  the empty token list, the server transmits all known properties of
the future the value of control-keywords might affect the listing
+
  the file.
mode.
 
  
properties is a token list of keywords indicating the properties the
 
user wants returned.  (In command arguments, properties cannot be
 
specified with integers, such as indices into the Property Index
 
Table).  For a list of keywords associated with file properties:  See
 
the section "Format of NFILE File Property/Value Pairs", section 7.5.
 
  
The server is always free to return more properties than those
 
requested in the properties argument.  If properties is supplied as
 
the empty token list, the server transmits all known properties of
 
the file.
 
  
  
Line 2,492: Line 2,632:
  
  
 +
Greenberg & Keene                                              [Page 47]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
  PROPERTIES COMMAND RESPONSE
  
PROPERTIES COMMAND RESPONSE
+
  The server returns the property information for the given file in the
 +
  command response.  The PROPERTIES command does not use any data
 +
  channels.  If the specified file does not exist or is not accessible,
 +
  the server signals an error and includes an appropriate three-letter
 +
  error code in the command error response.  See the section "NFILE
 +
  Errors and Notifications", section 10.
  
The server returns the property information for the given file in the
+
  The return value property-element is a token list.  The first element
command response.  The PROPERTIES command does not use any data
+
  in that token list is the pathname of the file, in the full pathname
channelsIf the specified file does not exist or is not accessible,
+
  syntax of the server host.  The following elements of the property-
the server signals an error and includes an appropriate three-letter
+
  element token list are property/value pairsThe server is expected
error code in the command error response. See the section "NFILE
+
  to return several property/value pairs; the number of pairs is not
Errors and Notifications", section 10.
+
  constrained.  For further details on file properties and their
 +
  associated values: See the section "Format of NFILE File
 +
  Property/Value Pairs", section 7.5.
  
The return value property-element is a token list.  The first element
+
  The return value settable-properties is a token list of keywords.
in that token list is the pathname of the file, in the full pathname
+
  The number of keywords is not constrained(Note that integers
syntax of the server hostThe following elements of the property-
+
  cannot be used in settable-properties to indicate the file property;
element token list are property/value pairs.  The server is expected
+
  keywords are to be used instead.) Each keyword supplied in
to return several property/value pairs; the number of pairs is not
+
  settable-properties identifies a property considered settable by the
constrainedFor further details on file properties and their
+
  server.  The server is implicitly guaranteeing a mechanism for
associated values: See the section "Format of NFILE File
+
  changing the properties reported as settableThe user can change
Property/Value Pairs", section 7.5.
+
  any of the settable properties for this file by using the CHANGE-
 +
  PROPERTIES command. See the section "CHANGE-PROPERTIES Command",
 +
  section 8.2.
  
The return value settable-properties is a token list of keywords.
+
  The following example shows the format of the PROPERTIES command
The number of keywords is not constrained.  (Note that integers
+
  response. Remember that the number of property/value pairs and
cannot be used in settable-properties to indicate the file property;
+
  keywords is not constrained; this example has two property/value
keywords are to be used instead.)  Each keyword supplied in
+
  pairs and three settable-properties keywords returned:
settable-properties identifies a property considered settable by the
 
server.  The server is implicitly guaranteeing a mechanism for
 
changing the properties reported as settable.  The user can change
 
any of the settable properties for this file by using the CHANGE-
 
PROPERTIES command.  See the section "CHANGE-PROPERTIES Command",
 
section 8.2.
 
  
The following example shows the format of the PROPERTIES command
 
response.  Remember that the number of property/value pairs and
 
keywords is not constrained; this example has two property/value
 
pairs and three settable-properties keywords returned:
 
  
  
Line 2,546: Line 2,688:
  
  
 +
Greenberg & Keene                                              [Page 48]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
          TOP-LEVEL-LIST-BEGIN
+
            TOP-LEVEL-LIST-BEGIN
          PROPERTIES        - name of the command
+
            PROPERTIES        - name of the command
          tid                - transaction identifier
+
            tid                - transaction identifier
          LIST-BEGIN
+
            LIST-BEGIN
          pathname of file
+
            pathname of file
          prop1 value1      - file's property/value pairs
+
            prop1 value1      - file's property/value pairs
          prop2 value2
+
            prop2 value2
          LIST-END
+
            LIST-END
          LIST-BEGIN
+
            LIST-BEGIN
          keyword-1          - file's settable properties
+
            keyword-1          - file's settable properties
          keyword-2
+
            keyword-2
          keyword-3
+
            keyword-3
          LIST-END
+
            LIST-END
          TOP-LEVEL-LIST-END
+
            TOP-LEVEL-LIST-END
  
The following example is designed to better show the structure of the
+
  The following example is designed to better show the structure of the
top-level token list by depicting TOP-LEVEL-LIST-BEGIN and TOP-
+
  top-level token list by depicting TOP-LEVEL-LIST-BEGIN and TOP-
LEVEL-LIST-END by parentheses and LIST-BEGIN and LIST-END by square
+
  LEVEL-LIST-END by parentheses and LIST-BEGIN and LIST-END by square
brackets.  The indentation and newlines in the example are not part
+
  brackets.  The indentation and newlines in the example are not part
of the token list, but are used here to make the structure of the
+
  of the token list, but are used here to make the structure of the
token list clear.
+
  token list clear.
  
          (PROPERTIES tid [ pathname prop1 value1 prop2 value2 ...]
+
            (PROPERTIES tid [ pathname prop1 value1 prop2 value2 ...]
                          [ keyword1 keyword2 keyword3 ... ]
+
                            [ keyword1 keyword2 keyword3 ... ]
  
 
8.22  READ Command
 
8.22  READ Command
  
Command: (READ tid direct-file-id input-handle count FILEPOS)
+
  Command: (READ tid direct-file-id input-handle count FILEPOS)
 +
 
 +
  Response: (READ tid)
  
Response: (READ tid)
+
  READ requests input data flow for direct access openings.  The
 +
  direct-file-id is the same as the DIRECT-FILE-ID argument that was
 +
  given when opening the file; it designates the opening from which the
 +
  characters or bytes are to be transferred.  The input-handle
 +
  specifies which data channel should be used for the transfer of data
 +
  from server to user.  The data channel should have been already
 +
  established, cannot have been disestablished, and must not currently
 +
  be in use.
  
READ requests input data flow for direct access openingsThe
+
  count is an integer specifying how many bytes (or NFILE characters,
direct-file-id is the same as the DIRECT-FILE-ID argument that was
+
  as appropriate) to readcount can be supplied as the empty token
given when opening the file; it designates the opening from which the
+
  list, meaning read to the end of the file.  If the user specifies the
characters or bytes are to be transferred.  The input-handle
+
  empty token list or a count greater than the number of bytes
specifies which data channel should be used for the transfer of data
+
  remaining in the file, the server sends the keyword EOF to mark the
from server to user.  The data channel should have been already
+
  end of the file.
established, cannot have been disestablished, and must not currently
 
be in use.
 
  
count is an integer specifying how many bytes (or NFILE characters,
 
as appropriate) to read.  count can be supplied as the empty token
 
list, meaning read to the end of the file.  If the user specifies the
 
empty token list or a count greater than the number of bytes
 
remaining in the file, the server sends the keyword EOF to mark the
 
end of the file.
 
  
  
  
  
 +
Greenberg & Keene                                              [Page 49]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
FILEPOS is an optional keyword/value pair.  If the keyword FILEPOS is
+
  FILEPOS is an optional keyword/value pair.  If the keyword FILEPOS is
supplied, it must be followed by an integer.  Before data is
+
  supplied, it must be followed by an integer.  Before data is
transferred, the opening is positioned to the point specified by the
+
  transferred, the opening is positioned to the point specified by the
value of FILEPOS.  The position of the point is measured in server
+
  value of FILEPOS.  The position of the point is measured in server
units for character openings; for binary openings it is measured in
+
  units for character openings; for binary openings it is measured in
binary bytes.  See the section "FILEPOS NFILE Command".
+
  binary bytes.  See the section "FILEPOS NFILE Command".
  
Upon receiving the READ command, the server binds the data channel to
+
  Upon receiving the READ command, the server binds the data channel to
the opening and immediately begins transferring data.  The server
+
  the opening and immediately begins transferring data.  The server
stops when all data has been transferred.  After the server sends the
+
  stops when all data has been transferred.  After the server sends the
last requested byte, it unbinds the data channel, freeing it for
+
  last requested byte, it unbinds the data channel, freeing it for
other use.  When the user side has processed the last byte, the user
+
  other use.  When the user side has processed the last byte, the user
side assumes that the data channel can now be reused for another data
+
  side assumes that the data channel can now be reused for another data
transfer.
+
  transfer.
  
 
8.23  RENAME Command
 
8.23  RENAME Command
  
Command:  (RENAME tid handle pathname to-pathname)
+
  Command:  (RENAME tid handle pathname to-pathname)
 +
 
 +
  Response: (RENAME tid from-pathname to-pathname)
  
Response: (RENAME tid from-pathname to-pathname)
+
  RENAME requests the server to give a file a new name.  This is
 +
  NFILE's interface to the system's native rename operation, with all
 +
  of its system-specific semantics and constraints.
  
RENAME requests the server to give a file a new name.  This is
+
  Either a handle or a pathname (but not both) specifies the file that
NFILE's interface to the system's native rename operation, with all
+
  is to receive a new name.  The argument to-pathname designates that
of its system-specific semantics and constraints.
+
  new name.  The return value from-pathname gives the full original
 +
  name of the file, and to-pathname gives the full new name of the
 +
  file.  For systems that support version numbers, the return values
 +
  can differ in version number from the values of the arguments given
 +
  to RENAME.
  
Either a handle or a pathname (but not both) specifies the file that
+
  The arguments pathname and to-pathname and the return values from-
is to receive a new name.  The argument to-pathname designates that
+
  pathname and to-pathname are strings in the full pathname syntax of
new name.  The return value from-pathname gives the full original
+
  the server hostSee the section "Syntax of File and Directory
name of the file, and to-pathname gives the full new name of the
+
  Pathname Arguments", section 7.4.
fileFor systems that support version numbers, the return values
 
can differ in version number from the values of the arguments given
 
to RENAME.
 
  
The arguments pathname and to-pathname and the return values from-
+
  If the file to be renamed is specified by a pathname, the file should
pathname and to-pathname are strings in the full pathname syntax of
+
  be renamed immediatelyIf the file is specified by handle, it is
the server hostSee the section "Syntax of File and Directory
+
  acceptable to wait until close-time to rename the file.
Pathname Arguments", section 7.4.
 
  
If the file to be renamed is specified by a pathname, the file should
+
  Some operating systems can rename only within a directory.
be renamed immediately.  If the file is specified by handle, it is
+
  Nevertheless, the to-pathname of the RENAME must be fully specified;
acceptable to wait until close-time to rename the file.
+
  the server on these systems must check for and reject an attempted
 +
  cross-directory rename.
  
Some operating systems can rename only within a directory.
 
Nevertheless, the to-pathname of the RENAME must be fully specified;
 
the server on these systems must check for and reject an attempted
 
cross-directory rename.
 
  
  
  
  
 +
Greenberg & Keene                                              [Page 50]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 
8.24  RESYNCHRONIZE-DATA-CHANNEL Command
 
8.24  RESYNCHRONIZE-DATA-CHANNEL Command
  
The command and response format for this command varies, depending on
+
  The command and response format for this command varies, depending on
whether the handle argument indicates an input or output data
+
  whether the handle argument indicates an input or output data
channel.
+
  channel.
  
For an Input Handle:
+
  For an Input Handle:
  
Command:  (RESYNCHRONIZE-DATA-CHANNEL tid handle)
+
  Command:  (RESYNCHRONIZE-DATA-CHANNEL tid handle)
  
Response: (RESYNCHRONIZE-DATA-CHANNEL tid identifier)
+
  Response: (RESYNCHRONIZE-DATA-CHANNEL tid identifier)
  
For an Output Handle:
+
  For an Output Handle:
  
Command:  (RESYNCHRONIZE-DATA-CHANNEL tid handle identifier)
+
  Command:  (RESYNCHRONIZE-DATA-CHANNEL tid handle identifier)
  
Response: (RESYNCHRONIZE-DATA-CHANNEL tid)
+
  Response: (RESYNCHRONIZE-DATA-CHANNEL tid)
  
RESYNCHRONIZE-DATA-CHANNEL begins a prescribed procedure between user
+
  RESYNCHRONIZE-DATA-CHANNEL begins a prescribed procedure between user
and server over the unsafe data channel specified by handle.  The
+
  and server over the unsafe data channel specified by handle.  The
resynchronization procedure clears the data channel of any unwanted
+
  resynchronization procedure clears the data channel of any unwanted
data, and restores the data channel to a safe state, ready to
+
  data, and restores the data channel to a safe state, ready to
transfer data again.
+
  transfer data again.
  
All arguments to RESYNCHRONIZE-DATA-CHANNEL are required.
+
  All arguments to RESYNCHRONIZE-DATA-CHANNEL are required.
  
For a detailed description of how the user and server coordinate the
+
  For a detailed description of how the user and server coordinate the
resynchronization of data channels:  See the section "NFILE Data
+
  resynchronization of data channels:  See the section "NFILE Data
Connection Resynchronization", section 9.2.
+
  Connection Resynchronization", section 9.2.
  
 
8.24.1  Implementation Hints for RESYNCHRONIZE-DATA-CHANNEL Command
 
8.24.1  Implementation Hints for RESYNCHRONIZE-DATA-CHANNEL Command
  
In general, both the user and server should should be implemented
+
  In general, both the user and server should should be implemented
with the knowledge that a transmission can be aborted.  That is, the
+
  with the knowledge that a transmission can be aborted.  That is, the
receiving side must be careful not to act upon a transmission (that
+
  receiving side must be careful not to act upon a transmission (that
is, to perform any action or side effect) until the transmission has
+
  is, to perform any action or side effect) until the transmission has
been successfully received in entirety.  This protects the user
+
  been successfully received in entirety.  This protects the user
program from the possibility that an abort can occur after a
+
  program from the possibility that an abort can occur after a
transmission has been partially sent.
+
  transmission has been partially sent.
  
  
Line 2,706: Line 2,856:
  
  
 +
Greenberg & Keene                                              [Page 51]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
RESYNCHRONIZING AN OUTPUT DATA CHANNEL
 
  
The server will probably want to dispatch the looping and reading to
+
  RESYNCHRONIZING AN OUTPUT DATA CHANNEL
the logical data process.  Looping reading for the resynchronization
 
identifier in the control connection handler is not a viable option.
 
If the user side fails to send the resynchronization identifier (for
 
example, due to a user abort) the control connection handler can
 
never be broken out of this loop.
 
  
Should the user side send the control connection handler command
+
  The server will probably want to dispatch the looping and reading to
first, or send the marks and identifiers first?
+
  the logical data process.  Looping reading for the resynchronization
 +
  identifier in the control connection handler is not a viable option.
 +
  If the user side fails to send the resynchronization identifier (for
 +
  example, due to a user abort) the control connection handler can
 +
  never be broken out of this loop.
  
Sending the marks first is problematic, because the data channel at
+
  Should the user side send the control connection handler command
the other end might not be reading them (for it has not yet been so
+
  first, or send the marks and identifiers first?
instructed by the control connection handler).  The user might then
 
become blocked for output, thus prohibiting sending of the
 
RESYNCHRONIZE-DATA-CHANNEL command.
 
  
On the other hand, sending the control connection handler command
+
  Sending the marks first is problematic, because the data channel at
first requires that the user side can send the marks and identifiers
+
  the other end might not be reading them (for it has not yet been so
between sending the control connection handler command and receiving
+
  instructed by the control connection handler).  The user might then
a response for it.  The response will never come until the marks and
+
  become blocked for output, thus prohibiting sending of the
identifiers have been successfully received.  The user implementation
+
  RESYNCHRONIZE-DATA-CHANNEL command.
must allow for this one case of a command where a subroutine that
 
"sends a command and waits for a response" is inapplicable.
 
  
RESYNCHRONIZING AN INPUT DATA CHANNEL
+
  On the other hand, sending the control connection handler command
 +
  first requires that the user side can send the marks and identifiers
 +
  between sending the control connection handler command and receiving
 +
  a response for it.  The response will never come until the marks and
 +
  identifiers have been successfully received.  The user implementation
 +
  must allow for this one case of a command where a subroutine that
 +
  "sends a command and waits for a response" is inapplicable.
  
The server control process should dispatch the data process to send
+
  RESYNCHRONIZING AN INPUT DATA CHANNEL
the mark, and not wait, lest the data process become blocked for
+
 
output due to a user abort.  The control process must go back to its
+
  The server control process should dispatch the data process to send
command loop, to possibly receive a command that might break the data
+
  the mark, and not wait, lest the data process become blocked for
process out of that block.
+
  output due to a user abort.  The control process must go back to its
 +
  command loop, to possibly receive a command that might break the data
 +
  process out of that block.
  
 
8.25  UNDATA-CONNECTION Command
 
8.25  UNDATA-CONNECTION Command
  
Command:  (UNDATA-CONNECTION tid input-handle output-handle)
+
  Command:  (UNDATA-CONNECTION tid input-handle output-handle)
  
Response: (UNDATA-CONNECTION tid)
+
  Response: (UNDATA-CONNECTION tid)
  
UNDATA-CONNECTION explicitly disestablishes a data connection from
+
  UNDATA-CONNECTION explicitly disestablishes a data connection from
the user side.  The user side has the option of disestablishing data
+
  the user side.  The user side has the option of disestablishing data
connections at its discretion.  There is no place in the protocol
+
  connections at its discretion.  There is no place in the protocol
where disestablishment of data connections is required, other than at
+
  where disestablishment of data connections is required, other than at
the end of the session, where it is implicit.
+
  the end of the session, where it is implicit.
  
  
Line 2,759: Line 2,912:
  
  
 +
Greenberg & Keene                                              [Page 52]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
The data connection to be disestablished is the one designated by the
 
input-handle and output-handle arguments.  These two handles must
 
refer to the same data connection.
 
  
It is not permitted to explicitly disestablish a data connection
+
  The data connection to be disestablished is the one designated by the
either of whose channels is active.  If the session is terminated by
+
  input-handle and output-handle arguments.  These two handles must
the breaking of the control connection, all file handles become
+
  refer to the same data connection.
meaningless, and the server must close all data connections known to
 
it and close-abort all files opened on behalf of the user during the
 
dialogue.
 
  
In the Symbolics implementation, the user side disestablishes data
+
  It is not permitted to explicitly disestablish a data connection
connections that have not been used for a long time, such as twenty
+
  either of whose channels is active.  If the session is terminated by
minutes or so.
+
  the breaking of the control connection, all file handles become
 +
  meaningless, and the server must close all data connections known to
 +
  it and close-abort all files opened on behalf of the user during the
 +
  dialogue.
  
For more information about data connections:  See the section "NFILE
+
  In the Symbolics implementation, the user side disestablishes data
Control and Data Connections", section 4.
+
  connections that have not been used for a long time, such as twenty
 +
  minutes or so.
  
== NFILE RESYNCHRONIZATION PROCEDURE ==
+
  For more information about data connections:  See the section "NFILE
 +
  Control and Data Connections", section 4.
  
Ordinarily, the user side sends NFILE commands to the server side
+
9NFILE RESYNCHRONIZATION PROCEDURE
over the control connection; the server side responds to every user
 
command, and file data is transmitted over the data channelsThis
 
section describes a resynchronization procedure that takes place when
 
something disturbs the usual course of events.
 
  
First, if the server side aborts while sending or receiving data,
+
  Ordinarily, the user side sends NFILE commands to the server side
nothing can be done to salvage the connection between the two hosts.
+
  over the control connection; the server side responds to every user
The control connection and any data channels associated with this
+
  command, and file data is transmitted over the data channels.  This
connection are broken.  This happens rarely, if at all.
+
  section describes a resynchronization procedure that takes place when
 +
  something disturbs the usual course of events.
  
It is not unusual for the user side to abort file operations, either
+
  First, if the server side aborts while sending or receiving data,
commands or data transfer.  On a Symbolics computer, the user can do
+
  nothing can be done to salvage the connection between the two hosts.
this by pressing CONTROL-ABORTAn important aspect of any file
+
  The control connection and any data channels associated with this
protocol is the way it handles the situation when the user side
+
  connection are brokenThis happens rarely, if at all.
aborts file operations.
 
  
An NFILE user side reacts to user side aborts by immediately marking
+
  It is not unusual for the user side to abort file operations, either
the connection unsafeWhen a control connection is unsafe, it must
+
  commands or data transferOn a Symbolics computer, the user can do
be resynchronized before it can be used again.  Data channels can
+
  this by pressing CONTROL-ABORTAn important aspect of any file
also be marked unsafe, and must also be resynchronized before further
+
  protocol is the way it handles the situation when the user side
useThe resynchronization process rids the connection (whether
+
  aborts file operations.
control or data connection) of bytes of data that are now unwanted,
 
and thus cleans up the channel so it can be used again.
 
  
The resynchronization procedure is somewhat complex, but it fulfills
+
  An NFILE user side reacts to user side aborts by immediately marking
a genuine needFor those interested, a brief design discussion is
+
  the connection unsafe.  When a control connection is unsafe, it must
included as note <3>.
+
  be resynchronized before it can be used again.  Data channels can
 +
  also be marked unsafe, and must also be resynchronized before further
 +
  useThe resynchronization process rids the connection (whether
 +
  control or data connection) of bytes of data that are now unwanted,
 +
  and thus cleans up the channel so it can be used again.
  
 +
  The resynchronization procedure is somewhat complex, but it fulfills
 +
  a genuine need.  For those interested, a brief design discussion is
 +
  included as note <3>.
  
  
 +
 +
Greenberg & Keene                                              [Page 53]
 +
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 
9.1  NFILE Control Connection Resynchronization
 
9.1  NFILE Control Connection Resynchronization
  
NFILE requires any unsafe control connection to undergo a
+
  NFILE requires any unsafe control connection to undergo a
resynchronization procedure before further use.  Therefore, the
+
  resynchronization procedure before further use.  Therefore, the
resynchronization does not necessarily occur immediately after the
+
  resynchronization does not necessarily occur immediately after the
control connection is marked unsafe.  The user side initiates the
+
  control connection is marked unsafe.  The user side initiates the
control connection resynchronization when another operation on the
+
  control connection resynchronization when another operation on the
control connection is attempted.
+
  control connection is attempted.
  
A "mark" is defined in the context of Byte Stream with Mark:  See the
+
  A "mark" is defined in the context of Byte Stream with Mark:  See the
section "Discussion of Byte Stream with Mark", section 12.1.
+
  section "Discussion of Byte Stream with Mark", section 12.1.
  
USER SIDE STEPS:  CONTROL CONNECTION RESYNCHRONIZATION
+
  USER SIDE STEPS:  CONTROL CONNECTION RESYNCHRONIZATION
  
    1. The user side sends a mark over the control connection to
+
      1. The user side sends a mark over the control connection to
      the server.
+
          the server.
  
    2. The user side sends the ASCII characters USER-RESYNC-DUMMY
+
      2. The user side sends the ASCII characters USER-RESYNC-DUMMY
      (as a data token) to the server.
+
          (as a data token) to the server.
  
    3. The user side sends a second mark to the server.
+
      3. The user side sends a second mark to the server.
  
    4. The user side declares the control connection safe (at the
+
      4. The user side declares the control connection safe (at the
      token list level).
+
          token list level).
  
    5. The user side generates and sends a unique data token to
+
      5. The user side generates and sends a unique data token to
      the server.
+
          the server.
  
    6. The user side then waits, expecting to detect a mark
+
      6. The user side then waits, expecting to detect a mark
      followed by the unique data token.  The user side reads and
+
          followed by the unique data token.  The user side reads and
      discards all tokens and marks until the desired match is
+
          discards all tokens and marks until the desired match is
      found.
+
          found.
  
Once the user side detects the mark and unique data token, the
+
  Once the user side detects the mark and unique data token, the
control connection has been fully resynchronized, and can be used
+
  control connection has been fully resynchronized, and can be used
again.
+
  again.
  
  
SERVER SIDE STEPS:  CONTROL CONNECTION RESYNCHRONIZATION
+
  SERVER SIDE STEPS:  CONTROL CONNECTION RESYNCHRONIZATION
  
    1. The server side detects a mark.  The server is thus alerted
+
        1. The server side detects a mark.  The server is thus alerted
        that the control connection is unsafe, and that
+
          that the control connection is unsafe, and that
        resynchronization is in progress.
+
          resynchronization is in progress.
  
    2. The server continues to read data coming from the user side
+
        2. The server continues to read data coming from the user side
        until it detects the second mark, and the token following
+
          until it detects the second mark, and the token following
        it.
+
          it.
  
  
  
  
 +
Greenberg & Keene                                              [Page 54]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
    3. The server checks to see if the token following the mark is
 
        USER-RESYNC-DUMMY.  This rare situation occurs if the user
 
        aborts during the course of the resynchronization itself.
 
        If so, the server side discards the USER-RESYNC-DUMMY
 
        token.  The control connection is still unsafe, and the
 
        user side restarts the resynchronization procedure; the
 
        server side therefore begins at Step 2 again.
 
  
    4. If the token following the mark is not USER-RESYNC-DUMMY
+
        3. The server checks to see if the token following the mark is
        (this is the expected circumstance), the server should have
+
          USER-RESYNC-DUMMY.  This rare situation occurs if the user
        received a single data token that is the unique data token
+
          aborts during the course of the resynchronization itself.
        generated by the user side.
+
          If so, the server side discards the USER-RESYNC-DUMMY
 +
          token.  The control connection is still unsafe, and the
 +
          user side restarts the resynchronization procedure; the
 +
          server side therefore begins at Step 2 again.
  
            a. The server sends a mark to the user side.
+
        4. If the token following the mark is not USER-RESYNC-DUMMY
 +
          (this is the expected circumstance), the server should have
 +
          received a single data token that is the unique data token
 +
          generated by the user side.
  
            b. The server declares the control connection safe (at
+
              a. The server sends a mark to the user side.
              the token list level).
 
  
            c. The server sends the unique data token to the user
+
              b. The server declares the control connection safe (at
              side.
+
                  the token list level).
  
    5. If the server detects something following the mark that was
+
              c. The server sends the unique data token to the user
        neither USER-RESYNC-DUMMY nor a single data token, a
+
                  side.
        protocol error has occurred.
+
 
 +
        5. If the server detects something following the mark that was
 +
          neither USER-RESYNC-DUMMY nor a single data token, a
 +
          protocol error has occurred.
  
 
9.2  NFILE Data Connection Resynchronization
 
9.2  NFILE Data Connection Resynchronization
  
The NFILE data channel resynchronization procedure is similar to the
+
  The NFILE data channel resynchronization procedure is similar to the
NFILE control connection resynchronization.  Both procedures are
+
  NFILE control connection resynchronization.  Both procedures are
based on a mark signalling the unsafe condition, then a second mark
+
  based on a mark signalling the unsafe condition, then a second mark
followed by a unique identifier.  One important difference between
+
  followed by a unique identifier.  One important difference between
the two procedures is the circumstances in which they occur.  Control
+
  the two procedures is the circumstances in which they occur.  Control
connections are put into unsafe states only when the user aborts
+
  connections are put into unsafe states only when the user aborts
during control connection I/O operations.  Data channels are made
+
  during control connection I/O operations.  Data channels are made
unsafe by a larger set of circumstances:
+
  unsafe by a larger set of circumstances:
  
  
Line 2,918: Line 3,080:
  
  
 +
Greenberg & Keene                                              [Page 55]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
    - User aborts occur during the file protocol operations that
 
      assign and deassign data channels.  This is the most common
 
      cause of data channels becoming unsafe.
 
  
    - A server receives a CLOSE command (with abort-p supplied as
+
      - User aborts occur during the file protocol operations that
      Boolean truth) specifying an open file that has not finished
+
        assign and deassign data channelsThis is the most common
      transmitting data.  That is, file reading is aborted.
+
        cause of data channels becoming unsafe.
  
    - The ABORT command is issued, causing data channels to be
+
      - A server receives a CLOSE command (with abort-p supplied as
      made unsafe.
+
        Boolean truth) specifying an open file that has not finished
 +
        transmitting data.  That is, file reading is aborted.
  
    - The FILEPOS command is issued, causing the input data
+
      - The ABORT command is issued, causing data channels to be
      channel to become unsafe.
+
        made unsafe.
  
The resynchronization clears the data channel of unwanted data from
+
      - The FILEPOS command is issued, causing the input data
aborted operations and puts the data channel in a known state.  The
+
        channel to become unsafe.
data channel resynchronization procedure is invoked when the user
 
side gives the RESYNCHRONIZE-DATA-CHANNEL command over the control
 
connection.
 
  
The following policies can be used to improve response time, but are
+
  The resynchronization clears the data channel of unwanted data from
not required by the NFILE protocol:  The user side can initiate
+
  aborted operations and puts the data channel in a known state.  The
resynchronization only if it needs the data channel, having first
+
  data channel resynchronization procedure is invoked when the user
tried to use a free data channel that does not require
+
  side gives the RESYNCHRONIZE-DATA-CHANNEL command over the control
resynchronization.  Also, the user side can periodically
+
  connection.
resynchronize all unsafe data channels.
 
  
In giving the RESYNCHRONIZE-DATA-CHANNEL command, the user side
+
  The following policies can be used to improve response time, but are
indicates which data channel should be resynchronized.  Data channels
+
  not required by the NFILE protocol:  The user side can initiate
are unidirectional, which means that depending on the direction
+
  resynchronization only if it needs the data channel, having first
(either input or output) of the data channel, either the user side or
+
  tried to use a free data channel that does not require
the server side sends the resynchronization dataThis is another
+
  resynchronization.  Also, the user side can periodically
difference from the resynchronization of the control connection, in
+
  resynchronize all unsafe data channels.
which the resynchronization data is always sent by the user side.
 
The resynchronization steps for input data channels are different
 
than the steps for output data channels.
 
  
 +
  In giving the RESYNCHRONIZE-DATA-CHANNEL command, the user side
 +
  indicates which data channel should be resynchronized.  Data channels
 +
  are unidirectional, which means that depending on the direction
 +
  (either input or output) of the data channel, either the user side or
 +
  the server side sends the resynchronization data.  This is another
 +
  difference from the resynchronization of the control connection, in
 +
  which the resynchronization data is always sent by the user side.
 +
  The resynchronization steps for input data channels are different
 +
  than the steps for output data channels.
  
  
Line 2,972: Line 3,136:
  
  
 +
Greenberg & Keene                                              [Page 56]
  
INPUT DATA CHANNEL RESYNCHRONIZATION
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  1. The user side gives the RESYNCHRONIZE-DATA-CHANNEL command
 
      on the control connection, with only one argument, the
 
      handle of the data channel to be resynchronized.
 
  
   2. The server side of the data channel generates a unique
+
   INPUT DATA CHANNEL RESYNCHRONIZATION
      identifier, and sends that data token in its regular
 
      command response to the user side.
 
  
  3. The server side sends a mark over the data channel.
+
      1. The user side gives the RESYNCHRONIZE-DATA-CHANNEL command
 +
        on the control connection, with only one argument, the
 +
        handle of the data channel to be resynchronized.
  
  4. The server side sends the unique identifier token over the
+
      2. The server side of the data channel generates a unique
      data channel.
+
        identifier, and sends that data token in its regular
 +
        command response to the user side.
  
  5. The user side reads until it detects a mark followed by the
+
      3. The server side sends a mark over the data channel.
      unique identifier token.  The resynchronization is then
 
      complete.  The data channel is no longer in an unsafe
 
      state.
 
  
OUTPUT DATA CHANNEL RESYNCHRONIZATION
+
      4. The server side sends the unique identifier token over the
 +
        data channel.
  
  1. The user side gives the RESYNCHRONIZE-DATA-CHANNEL command
+
      5. The user side reads until it detects a mark followed by the
      on the control connection, with two arguments: the handle
+
        unique identifier token.  The resynchronization is then
      of the data channel to be resynchronized, and a unique
+
        complete.  The data channel is no longer in an unsafe
      identifier that it has just generated.
+
        state.
  
   2. The user side of the data channel sends a mark.
+
   OUTPUT DATA CHANNEL RESYNCHRONIZATION
  
  3. The user side of the data channel sends a dummy identifier
+
      1. The user side gives the RESYNCHRONIZE-DATA-CHANNEL command
      token.  The dummy identifier can be any token that the
+
        on the control connection, with two arguments: the handle
      server could not interpret as being the unique identifier.
+
        of the data channel to be resynchronized, and a unique
      One suggestion is the data token DUMMY-IDENTIFIER.
+
        identifier that it has just generated.
  
  4. The server side of the data channel was alerted by the
+
      2. The user side of the data channel sends a mark.
      RESYNCHRONIZE-DATA-CHANNEL command that resynchronization
 
      is in progress.  The server side now reads the data,
 
      seeking the first mark.
 
  
  5. The server side reads and discards the first mark and the
+
      3. The user side of the data channel sends a dummy identifier
      dummy identifier.
+
        token.  The dummy identifier can be any token that the
 +
        server could not interpret as being the unique identifier.
 +
        One suggestion is the data token DUMMY-IDENTIFIER.
  
  6. The user side sends a second mark.
+
      4. The server side of the data channel was alerted by the
 +
        RESYNCHRONIZE-DATA-CHANNEL command that resynchronization
 +
        is in progress.  The server side now reads the data,
 +
        seeking the first mark.
  
  7. The user side sends the unique identifier.
+
      5. The server side reads and discards the first mark and the
 +
        dummy identifier.
  
  8. The server side recognizes the mark and the unique
+
      6. The user side sends a second mark.
      identifier that follows, and the resynchronization is
 
  
 +
      7. The user side sends the unique identifier.
  
 +
      8. The server side recognizes the mark and the unique
 +
        identifier that follows, and the resynchronization is
  
  
  
      complete.  The data channel is no longer in the unsafe
+
Greenberg & Keene                                              [Page 57]
      state.
 
  
== NFILE ERRORS AND NOTIFICATIONS ==
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
NFILE recognizes two types of errors:  command response errors and
 
asynchronous errors.  In addition to errors, NFILE supports
 
notifications.
 
  
Command response errors:
+
        complete.  The data channel is no longer in the unsafe
 +
        state.
  
    - Signify an error that prevented the successful completion of
+
10. NFILE ERRORS AND NOTIFICATIONS
      the command; when such an error occurs, a command response
 
      error is sent instead of a normal command response.
 
    - Occur frequently in normal operations
 
  
Asynchronous errors:
+
  NFILE recognizes two types of errors: command response errors and
 +
  asynchronous errors.  In addition to errors, NFILE supports
 +
  notifications.
  
    - Are not related to any specific command
+
  Command response errors:
    - Are associated with an erring data channel
 
    - Typically indicate a problem in the transfer, such as
 
      running out of disk space or allocation, or an unreadable
 
      disk record
 
    - Occur rarely in normal operations
 
  
Notifications:
+
      - Signify an error that prevented the successful completion of
 +
        the command; when such an error occurs, a command response
 +
        error is sent instead of a normal command response.
 +
      - Occur frequently in normal operations
  
    - Are not associated with an error
+
  Asynchronous errors:
    - Are sent at the server's discretion
+
 
    - Provide general information, such as a warning that the
+
      - Are not related to any specific command
      system is going down
+
      - Are associated with an erring data channel
 +
      - Typically indicate a problem in the transfer, such as
 +
        running out of disk space or allocation, or an unreadable
 +
        disk record
 +
      - Occur rarely in normal operations
 +
 
 +
  Notifications:
 +
 
 +
      - Are not associated with an error
 +
      - Are sent at the server's discretion
 +
      - Provide general information, such as a warning that the
 +
        system is going down
  
 
10.1  Notifications From the NFILE Server
 
10.1  Notifications From the NFILE Server
  
The NFILE server can send asynchronous notifications to the user side
+
  The NFILE server can send asynchronous notifications to the user side
over the control connection.  The text of the notification contains
+
  over the control connection.  The text of the notification contains
information of interest to the person using NFILE, such as a warning
+
  information of interest to the person using NFILE, such as a warning
that the server's operating system will be going down soon.
+
  that the server's operating system will be going down soon.
Notifications can come from the server side at any time that the
+
  Notifications can come from the server side at any time that the
server is not sending something else.
+
  server is not sending something else.
  
The format of NFILE notifications is:
+
  The format of NFILE notifications is:
  
          (NOTIFICATION "" text)
+
            (NOTIFICATION "" text)
  
The empty string "" takes the place of a transaction identifier.
+
  The empty string "" takes the place of a transaction identifier.
Notifications are initiated by the server, and are not associated
+
  Notifications are initiated by the server, and are not associated
with any transaction originated by the user side.n
+
  with any transaction originated by the user side.n
  
  
  
 +
Greenberg & Keene                                              [Page 58]
 +
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 
10.2  NFILE Command Response Errors
 
10.2  NFILE Command Response Errors
  
When an error prevents the successful completion of an NFILE command,
+
  When an error prevents the successful completion of an NFILE command,
a command response error is sent instead of the normal command
+
  a command response error is sent instead of the normal command
response.  A normal command response indicates success; a command
+
  response.  A normal command response indicates success; a command
response error indicates failure of the command.
+
  response error indicates failure of the command.
  
NFILE command response errors are sent from the server to the user
+
  NFILE command response errors are sent from the server to the user
across the control connection as top-level token lists, in this
+
  across the control connection as top-level token lists, in this
format:
+
  format:
  
          (ERROR tid three-letter-code error-vars message)
+
            (ERROR tid three-letter-code error-vars message)
  
ERROR is a keyword.  The tid is the transaction identifier of the
+
  ERROR is a keyword.  The tid is the transaction identifier of the
command that encountered this error.  The arguments three-letter-
+
  command that encountered this error.  The arguments three-letter-
code, error-vars, and message are all required.
+
  code, error-vars, and message are all required.
  
The three-letter-code provides the information on what kind of an
+
  The three-letter-code provides the information on what kind of an
error was encountered.  For a table of the three-letter codes and
+
  error was encountered.  For a table of the three-letter codes and
their meanings:  See the section "NFILE Three-letter Error Codes",
+
  their meanings:  See the section "NFILE Three-letter Error Codes",
section 10.4.
+
  section 10.4.
  
message is a string that is displayed to the human user of the
+
  message is a string that is displayed to the human user of the
protocol.
+
  protocol.
  
error-vars is a keyword/value list.  The three possible keywords are:
+
  error-vars is a keyword/value list.  The three possible keywords are:
PATHNAME, OPERATION, and NEW-PATHNAME.  Before transmitting an error,
+
  PATHNAME, OPERATION, and NEW-PATHNAME.  Before transmitting an error,
the server looks at the type of error to see if it can easily
+
  the server looks at the type of error to see if it can easily
determine the value of any of the keywords.  If so, the server
+
  determine the value of any of the keywords.  If so, the server
includes the keyword/value pair in its error.  If not, the
+
  includes the keyword/value pair in its error.  If not, the
keyword/value pair is omitted.  The value associated with OPERATION
+
  keyword/value pair is omitted.  The value associated with OPERATION
is the keyword naming the NFILE command that failed.  The values
+
  is the keyword naming the NFILE command that failed.  The values
associated with PATHNAME and NEW-PATHNAME are strings in the full
+
  associated with PATHNAME and NEW-PATHNAME are strings in the full
pathname syntax of the server host.
+
  pathname syntax of the server host.
  
For example, suppose the server on a file system with hierarchical
+
  For example, suppose the server on a file system with hierarchical
directories could not access a file because its containing directory
+
  directories could not access a file because its containing directory
did not exist.  The command error response would use the PATHNAME
+
  did not exist.  The command error response would use the PATHNAME
keyword to indicate the first directory level that did not exist,
+
  keyword to indicate the first directory level that did not exist,
instead of the full pathname which was supplied as the command
+
  instead of the full pathname which was supplied as the command
argument.  This gives the user side valuable information that it
+
  argument.  This gives the user side valuable information that it
otherwise would not have known.
+
  otherwise would not have known.
  
  
Line 3,130: Line 3,304:
  
  
 +
Greenberg & Keene                                              [Page 59]
 +
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 
10.3  NFILE Asynchronous Errors
 
10.3  NFILE Asynchronous Errors
  
When a data channel process, in either direction, encounters an error
+
  When a data channel process, in either direction, encounters an error
condition, the server sends an asynchronous error description. An
+
  condition, the server sends an asynchronous error description. An
asynchronous error description consists of a top-level token list.
+
  asynchronous error description consists of a top-level token list.
Typically, asynchronous errors indicate error conditions in the
+
  Typically, asynchronous errors indicate error conditions in the
transfer, such as running out of disk space or allocation, or a
+
  transfer, such as running out of disk space or allocation, or a
unreadable disk record.
+
  unreadable disk record.
  
The format of asynchronous error descriptions is:
+
  The format of asynchronous error descriptions is:
  
      (ASYNC-ERROR handle three-letter-code error-vars message)
+
        (ASYNC-ERROR handle three-letter-code error-vars message)
  
ASYNC-ERROR is a keyword.  The handle argument identifies the erring
+
  ASYNC-ERROR is a keyword.  The handle argument identifies the erring
data channel.  The arguments three-letter-code, error-vars, and
+
  data channel.  The arguments three-letter-code, error-vars, and
message are all required.  Their meanings are the same as in NFILE
+
  message are all required.  Their meanings are the same as in NFILE
command error responses: See the section "NFILE Command Response
+
  command error responses: See the section "NFILE Command Response
Errors", section 10.2.
+
  Errors", section 10.2.
  
When the server detects an asynchronous error on an input data
+
  When the server detects an asynchronous error on an input data
channel, the server sends an asynchronous error description on that
+
  channel, the server sends an asynchronous error description on that
data channel itself.  When an asynchronous error occurs on an output
+
  data channel itself.  When an asynchronous error occurs on an output
data channel, the asynchronous error description is sent on the
+
  data channel, the asynchronous error description is sent on the
control connection.
+
  control connection.
  
Some asynchronous errors are restartable.  In this context,
+
  Some asynchronous errors are restartable.  In this context,
restartable means it makes sense to try to resume the operation.  One
+
  restartable means it makes sense to try to resume the operation.  One
example of a restartable error is an attempt to write a file to a
+
  example of a restartable error is an attempt to write a file to a
file system that is out of room.  The server side indicates whether
+
  file system that is out of room.  The server side indicates whether
an asynchronous error is restartable by prepending the keyword
+
  an asynchronous error is restartable by prepending the keyword
RESTARTABLE and the associated value Boolean truth to the error-vars
+
  RESTARTABLE and the associated value Boolean truth to the error-vars
list.  To proceed from a restartable error, the user side sends a
+
  list.  To proceed from a restartable error, the user side sends a
CONTINUE command over the control connection.
+
  CONTINUE command over the control connection.
  
On any asynchronous error, either input or output, the data channel
+
  On any asynchronous error, either input or output, the data channel
on the server side enters an "asynchronous error outstanding" state.
+
  on the server side enters an "asynchronous error outstanding" state.
The server can exit that state in one of two ways:  by receiving a
+
  The server can exit that state in one of two ways:  by receiving a
CONTINUE command or a CLOSE command with the abort-p argument
+
  CONTINUE command or a CLOSE command with the abort-p argument
supplied as Boolean truth.
+
  supplied as Boolean truth.
  
On a normal CLOSE (not a close-abort), the server side checks the
+
  On a normal CLOSE (not a close-abort), the server side checks the
channel it was requested to close.  If an asynchronous error
+
  channel it was requested to close.  If an asynchronous error
description has been sent on the data channel, but not yet processed
+
  description has been sent on the data channel, but not yet processed
by CONTINUE, the server side does not close the channel, but sends a
+
  by CONTINUE, the server side does not close the channel, but sends a
command error response.  The same thing happens on a FINISH command
+
  command error response.  The same thing happens on a FINISH command
received on a channel that has an asynchronous error pending.  In
+
  received on a channel that has an asynchronous error pending.  In
both cases, the three-letter code included in the command error
+
  both cases, the three-letter code included in the command error
response is EPC, for Error Pending on Channel.
+
  response is EPC, for Error Pending on Channel.
  
  
  
 +
Greenberg & Keene                                              [Page 60]
 +
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 
10.4  NFILE Three-letter Error Codes
 
10.4  NFILE Three-letter Error Codes
  
Usually the server's operating system provides some description of an
+
  Usually the server's operating system provides some description of an
error that occurs.  NFILE has a mechanism for conveying that
+
  error that occurs.  NFILE has a mechanism for conveying that
information to the user side.  Upon detecting an error, the NFILE
+
  information to the user side.  Upon detecting an error, the NFILE
server should characterize the error by choosing the three-letter
+
  server should characterize the error by choosing the three-letter
code that best describes the error.  The three-letter code is an
+
  code that best describes the error.  The three-letter code is an
argument in both the command response error and asynchronous error
+
  argument in both the command response error and asynchronous error
messages from the server to the user.
+
  messages from the server to the user.
  
Each of the NFILE three-letter codes represents some system error.
+
  Each of the NFILE three-letter codes represents some system error.
The set of codes enables all operating systems to use one error-
+
  The set of codes enables all operating systems to use one error-
reporting mechanism.  Some operating systems will never encounter
+
  reporting mechanism.  Some operating systems will never encounter
certain of the error conditions.
+
  certain of the error conditions.
  
Some errors fit logically into two error codes.  For example, suppose
+
  Some errors fit logically into two error codes.  For example, suppose
the server could not delete a file because the file was not found.
+
  the server could not delete a file because the file was not found.
This error could be considered either CDF (Cannot Delete File) or FNF
+
  This error could be considered either CDF (Cannot Delete File) or FNF
(File Not Found).  In this case, File Not Found gives more specific
+
  (File Not Found).  In this case, File Not Found gives more specific
and valuable information than Cannot Delete File.  Since the protocol
+
  and valuable information than Cannot Delete File.  Since the protocol
does not allow more than one error code to be reported when an error
+
  does not allow more than one error code to be reported when an error
occurs, the server must choose the most appropriate error code, given
+
  occurs, the server must choose the most appropriate error code, given
the information available to it from the operating system.
+
  the information available to it from the operating system.
  
This is the set of three-letter codes:
+
  This is the set of three-letter codes:
  
  ACC  Access error.  This indicates a protection-violation error.
+
    ACC  Access error.  This indicates a protection-violation error.
  
  ATD  Incorrect access to directory.  A directory could not be
+
    ATD  Incorrect access to directory.  A directory could not be
        accessed because the user's access rights to it did not
+
          accessed because the user's access rights to it did not
        permit this type of access.
+
          permit this type of access.
  
  ATF  Incorrect access to file.  A file could not be accessed
+
    ATF  Incorrect access to file.  A file could not be accessed
        because the user's access rights to it did not permit this
+
          because the user's access rights to it did not permit this
        type of access.
+
          type of access.
  
  BUG  File system bug.  This includes all protocol violations
+
    BUG  File system bug.  This includes all protocol violations
        detected by the server, as well as by the host file system.
+
          detected by the server, as well as by the host file system.
  
  CCD  Cannot create directory.  An error occurred in attempting to
+
    CCD  Cannot create directory.  An error occurred in attempting to
        create a directory.
+
          create a directory.
  
  CDF  Cannot delete file.  The file system reported that it cannot
+
    CDF  Cannot delete file.  The file system reported that it cannot
        delete a file.
+
          delete a file.
  
  CCL  Cannot create link.  An error occurred in attempting to
+
    CCL  Cannot create link.  An error occurred in attempting to
        create a link.
+
          create a link.
  
  
  
  
 +
Greenberg & Keene                                              [Page 61]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  CIR  Circular link.  An operation was attempted on a pathname that
 
        designates a link that eventually links back to itself.
 
  
   CRF  Cannot rename file.  An error occurred in attempting to
+
    CIR   Circular link.  An operation was attempted on a pathname that
        rename a file.
+
          designates a link that eventually links back to itself.
  
  CSP   Cannot set property.  An error occurred in attempting to
+
    CRF   Cannot rename file.  An error occurred in attempting to
        change the properties of a file.  This could mean that you
+
          rename a file.
        tried to set a property that only the file system is allowed
 
        to set, or a property that is not defined on this type of
 
        file system.
 
  
   DAE  Directory already existsA directory could not be created
+
    CSP   Cannot set property.  An error occurred in attempting to
        because a directory or file of this name already exists.
+
          change the properties of a fileThis could mean that you
 +
          tried to set a property that only the file system is allowed
 +
          to set, or a property that is not defined on this type of
 +
          file system.
  
   DAT  Data errorThe file system contains unreadable data.  This
+
    DAE   Directory already existsA directory could not be created
        could mean data errors detected by hardware or inconsistent
+
          because a directory or file of this name already exists.
        data inside the file system.
 
  
   DEV  Device not found.  The device of the file was not found or
+
    DAT   Data error.  The file system contains unreadable data.  This
        does not exist.
+
          could mean data errors detected by hardware or inconsistent
 +
          data inside the file system.
  
   DND  "Do Not Delete" flag setAn attempt was made to delete a
+
    DEV   Device not foundThe device of the file was not found or
        file that is marked by a "Do Not Delete" flag.
+
          does not exist.
  
   DNE  Directory not empty.  An invalid deletion of a nonempty
+
    DND   "Do Not Delete" flag set.  An attempt was made to delete a
        directory was attempted.
+
          file that is marked by a "Do Not Delete" flag.
  
  DNF   Directory not found.  The directory was not found or does not
+
    DNE   Directory not emptyAn invalid deletion of a nonempty
        existThis refers specifically to the containing directory;
+
          directory was attempted.
        if you are trying to access a directory, and the actual
 
        directory you are trying to access is not found, FNF (for
 
        File Not Found) should be indicated instead.
 
  
   EPC  Error pending on channel.  The server cannot close the
+
    DNF   Directory not found.  The directory was not found or does not
        channel in attempting to close or finish the channel.
+
          exist.  This refers specifically to the containing directory;
 +
          if you are trying to access a directory, and the actual
 +
          directory you are trying to access is not found, FNF (for
 +
          File Not Found) should be indicated instead.
  
   FAE  File already exists.  The file could not be created because a
+
    EPC   Error pending on channel.  The server cannot close the
        file or directory of this name already exists.
+
          channel in attempting to close or finish the channel.
  
  FNF   File not found.  The file was not found in the containing
+
    FAE   File already exists.  The file could not be created because a
        directory.  The TOPS-20 and TENEX "no such file type" and "no
+
          file or directory of this name already exists.
        such file version" errors should also report this condition.
 
  
  FOO   File open for outputOpening a file that was already opened
+
    FNF   File not foundThe file was not found in the containing
        for output was attempted.
+
          directory.  The TOPS-20 and TENEX "no such file type" and "no
 +
          such file version" errors should also report this condition.
  
   FOR  Filepos out of rangeSetting the file pointer past the
+
    FOO   File open for outputOpening a file that was already opened
 +
          for output was attempted.
  
 +
    FOR  Filepos out of range.  Setting the file pointer past the
  
  
  
 +
Greenberg & Keene                                              [Page 62]
  
        end-of-file position or to a negative position was attempted.
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  FTB  File too big.  File is larger than the maximum file size
 
        supported by the file system.
 
  
  HNA    Host not available The file server or file system is
+
          end-of-file position or to a negative position was attempted.
        intentionally denying service to user.  This does not mean
 
        that the network connection failed; it means that the file
 
        system is explicitly not available.
 
  
   IBS    Invalid byte sizeThe value of the "byte size" option was
+
    FTB   File too bigFile is larger than the maximum file size
        not valid.
+
          supported by the file system.
  
  ICO  Inconsistent optionsSome of the options given in this
+
    HNA    Host not available The file server or file system is
        operation are inconsistent with others.
+
          intentionally denying service to userThis does not mean
 +
          that the network connection failed; it means that the file
 +
          system is explicitly not available.
  
  IOD  Invalid operation for directory.  The specified operation is
+
    IBS    Invalid byte size.  The value of the "byte size" option was
        invalid for directories, and the given pathname specifies a
+
          not valid.
        directory, in directory pathname as file format.
 
  
   IOL  Invalid operation for linkThe specified operation is
+
    ICO   Inconsistent optionsSome of the options given in this
        invalid for links, and this pathname is the name of a link.
+
          operation are inconsistent with others.
  
  IP?   Invalid password.  The specified password was invalid.
+
    IOD   Invalid operation for directory.  The specified operation is
 +
          invalid for directories, and the given pathname specifies a
 +
          directory, in directory pathname as file format.
  
  IPS   Invalid pathname syntaxThis includes all invalid pathname
+
    IOL   Invalid operation for linkThe specified operation is
        syntax errors.
+
          invalid for links, and this pathname is the name of a link.
  
  IPV   Invalid property value.  The new value provided for the
+
    IP?   Invalid password.  The specified password was invalid.
        property is invalid.
 
  
  IWC   Invalid wildcardThe pathname is not a valid wildcard
+
    IPS   Invalid pathname syntaxThis includes all invalid pathname
        pathname.
+
          syntax errors.
  
   LCK  File locked.  The file is locked.  It cannot be accessed,
+
    IPV   Invalid property value.  The new value provided for the
        possibly because it is in use by some other process.
+
          property is invalid.
  
   LIP  Login problemsA problem was encountered while trying to
+
    IWC   Invalid wildcardThe pathname is not a valid wildcard
        log in to the file system.
+
          pathname.
  
   MSC  Miscellaneous problems.
+
    LCK   File locked.  The file is locked.  It cannot be accessed,
 +
          possibly because it is in use by some other process.
  
   NAV  Not availableThe file or device exists but is not
+
    LIP   Login problemsA problem was encountered while trying to
        available.  Typically, the disk pack is not mounted on a
+
          log in to the file system.
        drive, the drive is broken, or the like.  Operator
 
        intervention is probably required to fix the problem, but
 
        retrying the operation is likely to succeed after the problem
 
        is solved.
 
  
 +
    MSC  Miscellaneous problems.
  
 +
    NAV  Not available.  The file or device exists but is not
 +
          available.  Typically, the disk pack is not mounted on a
 +
          drive, the drive is broken, or the like.  Operator
 +
          intervention is probably required to fix the problem, but
 +
          retrying the operation is likely to succeed after the problem
 +
          is solved.
  
  
  
  NER  Not enough resources.  For example, a system limit on the
+
Greenberg & Keene                                              [Page 63]
        number of open files or network connections has been reached.
 
  
  NET  Network problem.  The file server had some sort of trouble
+
RFC 1037            NFILE - A File Access Protocol        December 1987
        trying to create a new data connection, or perform some other
 
        network operation, and was unable to do so.
 
  
  NFS  No file system.  The file system was not available.  For
 
        example, this host does not have any file systems, or this
 
        host's file system cannot be initialized or accessed for some
 
        reason, or the file system simply does not exist.
 
  
  NLI   Not logged inA file operation was attempted before logging
+
    NER   Not enough resourcesFor example, a system limit on the
        in.  Normally the file system interface always logs in before
+
          number of open files or network connections has been reached.
        doing any operation, but this problem can occur in certain
 
        unusual cases in which logging in has been aborted.
 
  
 +
    NET  Network problem.  The file server had some sort of trouble
 +
          trying to create a new data connection, or perform some other
 +
          network operation, and was unable to do so.
  
  NMR   No more room.  The file system is out of roomThis can mean
+
    NFS   No file system.  The file system was not availableFor
        any of several things:
+
          example, this host does not have any file systems, or this
 +
          host's file system cannot be initialized or accessed for some
 +
          reason, or the file system simply does not exist.
  
                  - The entire file system is full.
+
    NLI  Not logged in.  A file operation was attempted before logging
                  - The particular volume involved is full.
+
          in. Normally the file system interface always logs in before
                  - The particular directory involved is full.
+
          doing any operation, but this problem can occur in certain
                  - The user's allocated quota has been exceeded.
+
          unusual cases in which logging in has been aborted.
  
  RAD  Rename across directories.  The devices or directories of the
 
        initial and target pathnames are not the same, but on this
 
        file system they are required to be.
 
  
   REF  Rename to existing file.  The target name of a rename
+
    NMR   No more room.  The file system is out of room.  This can mean
        operation is the name of a file that already exists.
+
          any of several things:
  
  UKC  Unknown operation. An unsupported file system operation was
+
                      - The entire file system is full.
        attempted, or an unsupported command was attempted.
+
                      - The particular volume involved is full.
 +
                      - The particular directory involved is full.
 +
                      - The user's allocated quota has been exceeded.
  
   UKP  Unknown property.  The property is unknown.
+
    RAD   Rename across directories.  The devices or directories of the
 +
          initial and target pathnames are not the same, but on this
 +
          file system they are required to be.
  
   UNK  Unknown user.  The specified user name is unknown to this
+
    REF   Rename to existing file.  The target name of a rename
        host.
+
          operation is the name of a file that already exists.
  
   UUO  Unimplemented option. An option to a command is not
+
    UKC   Unknown operation. An unsupported file system operation was
        implemented.
+
          attempted, or an unsupported command was attempted.
  
   WKF  Wrong kind of fileThis includes errors in which an invalid
+
    UKP   Unknown propertyThe property is unknown.
        operation for a file, directory, or link was attempted.
 
  
   WNA  Wildcard not allowed.
+
    UNK   Unknown user.  The specified user name is unknown to this
 +
          host.
  
 +
    UUO  Unimplemented option.  An option to a command is not
 +
          implemented.
  
 +
    WKF  Wrong kind of file.  This includes errors in which an invalid
 +
          operation for a file, directory, or link was attempted.
  
 +
    WNA  Wildcard not allowed.
  
  
== TOKEN LIST TRANSPORT LAYER ==
 
  
PURPOSE:  The Token List Transport Layer is a protocol that
+
Greenberg & Keene                                              [Page 64]
facilitates the transmission of simple structured data, such as
+
 
lists.
+
RFC 1037            NFILE - A File Access Protocol        December 1987
 +
 
 +
 
 +
11.  TOKEN LIST TRANSPORT LAYER
 +
 
 +
  PURPOSE:  The Token List Transport Layer is a protocol that
 +
  facilitates the transmission of simple structured data, such as
 +
  lists.
  
 
11.1  Introduction to the Token List Transport Layer
 
11.1  Introduction to the Token List Transport Layer
  
The Token List Transport Layer is a general-purpose protocol.  The
+
  The Token List Transport Layer is a general-purpose protocol.  The
Token List Transport Layer sends "tokens" through its underlying
+
  Token List Transport Layer sends "tokens" through its underlying
stream.  Each token usually represents a simple quantity, such as a
+
  stream.  Each token usually represents a simple quantity, such as a
string or integer.
+
  string or integer.
 +
 
 +
  Tokens can be organized into "token lists".  Special tokens are
 +
  provided to denote the starting and ending point of lists.  The token
 +
  list transport layer differentiates between "top-level token lists",
 +
  which are not contained in other lists, and "embedded token lists",
 +
  which are contained in other lists.  Using lists makes it convenient
 +
  to send structured records, such as commands and command responses of
 +
  the client protocol.  The top-level token lists provide robustness.
  
Tokens can be organized into "token lists".  Special tokens are
+
  The Token List Transport Layer is a general term that includes two
provided to denote the starting and ending point of lists.  The token
+
  separate but related subjects:  the "token list stream" and the
list transport layer differentiates between "top-level token lists",
+
  "token list data stream".  The token list stream is commonly used for
which are not contained in other lists, and "embedded token lists",
+
  applications that can easily organize the information to be
which are contained in other lists.  Using lists makes it convenient
+
  transmitted into tokens and lists.  The token list data stream is
to send structured records, such as commands and command responses of
+
  more appropriate for transmitting a large volume of data that cannot
the client protocol.  The top-level token lists provide robustness.
+
  easily be structured into tokens and lists, such as file data, which
 +
  is simply a sequence of characters or bytes.
  
The Token List Transport Layer is a general term that includes two
+
  The following table illustrates the main differences between token
separate but related subjects:  the "token list stream" and the
+
  list streams and token list data streams:
"token list data stream".  The token list stream is commonly used for
 
applications that can easily organize the information to be
 
transmitted into tokens and lists.  The token list data stream is
 
more appropriate for transmitting a large volume of data that cannot
 
easily be structured into tokens and lists, such as file data, which
 
is simply a sequence of characters or bytes.
 
  
The following table illustrates the main differences between token
+
                    Token List Data Stream      Token List Stream
list streams and token list data streams:
+
                    ----------------------      -----------------
  
                  Token List Data Stream     Token List Stream
+
     Built on:    token list stream          Byte Stream with Mark
                  ----------------------      -----------------
 
  
  Built on:     token list stream          Byte Stream with Mark
+
    Transmits:   stream data                tokens, token lists
  
  Transmits:   stream data                 tokens, token lists
+
    Example
 +
    of use:       NFILE data channels        NFILE control
 +
                                              connection
  
  Example
 
  of use:      NFILE data channels        NFILE control
 
                                            connection
 
  
  
Line 3,447: Line 3,640:
  
  
 +
Greenberg & Keene                                              [Page 65]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
NFILE uses the the Token List Transport Layer, and provides an
+
  NFILE uses the the Token List Transport Layer, and provides an
excellent example of its usefulness.  The NFILE commands and command
+
  excellent example of its usefulness.  The NFILE commands and command
responses are sent over the control connection in a token list
+
  responses are sent over the control connection in a token list
stream.  File data is sent across each data channel in a token list
+
  stream.  File data is sent across each data channel in a token list
data stream.
+
  data stream.
  
 
11.2  Token List Stream
 
11.2  Token List Stream
Line 3,460: Line 3,655:
 
11.2.1  Types of Tokens and Token Lists
 
11.2.1  Types of Tokens and Token Lists
  
All numbers in the token list documentation are represented in
+
  All numbers in the token list documentation are represented in
decimal notation.  Bytes are 8 bits long.
+
  decimal notation.  Bytes are 8 bits long.
  
TYPES OF TOKENS
+
  TYPES OF TOKENS
  
Tokens are of the following types:
+
  Tokens are of the following types:
  
        1. Atomic tokens.
+
            1. Atomic tokens.
  
            Atomic tokens are of the following subtypes:
+
              Atomic tokens are of the following subtypes:
  
          - Data tokens.  A data token consists of a sequence of
+
              - Data tokens.  A data token consists of a sequence of
            bytes with an effectively infinite maximum length.  In
+
                bytes with an effectively infinite maximum length.  In
            some contexts a data token represents a string; in
+
                some contexts a data token represents a string; in
            other contexts, a data token is other arbitrary data.
+
                other contexts, a data token is other arbitrary data.
  
            Each data token is preceded in the token list stream
+
                Each data token is preceded in the token list stream
            by a representation of its length in bytes.
+
                by a representation of its length in bytes.
  
            Data tokens that are under 200 bytes long are preceded
+
                Data tokens that are under 200 bytes long are preceded
            by one byte containing their length in bytes.  That
+
                by one byte containing their length in bytes.  That
            is, a data token of 34 bytes is preceded by one byte
+
                is, a data token of 34 bytes is preceded by one byte
            of value 34.
+
                of value 34.
  
            Data tokens 200 bytes or over are preceded by the byte
+
                Data tokens 200 bytes or over are preceded by the byte
            known as PUNCTUATION-LONG, of value 201.  After the
+
                known as PUNCTUATION-LONG, of value 201.  After the
            201 comes a four-byte-long number (least significant
+
                201 comes a four-byte-long number (least significant
            byte first) containing the length of the data token
+
                byte first) containing the length of the data token
            that follows.
+
                that follows.
  
          - Numeric tokens.  A sequence of bytes that represent
+
              - Numeric tokens.  A sequence of bytes that represent
            and encode a nonnegative binary integer.  The largest
+
                and encode a nonnegative binary integer.  The largest
            valid integer is 2^63 - 1.
+
                valid integer is 2^63 - 1.
  
            Numeric tokens are either short integers (less than
+
                Numeric tokens are either short integers (less than
            256) or long integers (greater than or equal to 256).
+
                256) or long integers (greater than or equal to 256).
            Short integers are preceded by the byte known as
+
                Short integers are preceded by the byte known as
            PUNCTUATION-SHORT-INTEGER, of value 206.
+
                PUNCTUATION-SHORT-INTEGER, of value 206.
  
  
  
 +
Greenberg & Keene                                              [Page 66]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
            Long integers are begun by PUNCTUATION-LONG-INTEGER,
 
            of value 207.  One byte follows, containing the length
 
            (in bytes) of the long integer.  The integer itself is
 
            next, least significant byte first.
 
  
          - Keyword tokensA sequence of bytes that represent
+
                Long integers are begun by PUNCTUATION-LONG-INTEGER,
            and encode a named identifier of the implemented
+
                of value 207One byte follows, containing the length
            protocolKeyword tokens are used by the client
+
                (in bytes) of the long integerThe integer itself is
            protocol to convey a name; the only significance of a
+
                next, least significant byte first.
            keyword token is in its name.
 
  
            Each keyword is preceded by the byte known as
+
              - Keyword tokens.  A sequence of bytes that represent
            PUNCTUATION-KEYWORD, of value 208The data token
+
                and encode a named identifier of the implemented
            following PUNCTUATION-KEYWORD represents the name of
+
                protocolKeyword tokens are used by the client
            the keyword as a string.  The characters are in
+
                protocol to convey a name; the only significance of a
            upper-case standard ASCII.
+
                keyword token is in its name.
  
          - Boolean truthA special token that represents the
+
                Each keyword is preceded by the byte known as
            Boolean truth valueThis token is known as
+
                PUNCTUATION-KEYWORD, of value 208The data token
            BOOLEAN-TRUTH, of value 209 <4>.
+
                following PUNCTUATION-KEYWORD represents the name of
 +
                the keyword as a stringThe characters are in
 +
                upper-case standard ASCII.
  
2. Control tokens.
+
              - Boolean truth. A special token that represents the
 +
                Boolean truth value.  This token is known as
 +
                BOOLEAN-TRUTH, of value 209 <4>.
  
The token list stream supports four control tokens to delimit token
+
  2. Control tokens.
lists, and one padding token.
 
  
            TOP-LEVEL-LIST-BEGIN  202  This control token
+
  The token list stream supports four control tokens to delimit token
                                        appears at the start of
+
  lists, and one padding token.
                                        each top-level token list.
 
  
            TOP-LEVEL-LIST-END    203   This control token
+
              TOP-LEVEL-LIST-BEGIN  202   This control token
                                        appears at the end of
+
                                          appears at the start of
                                        each top-level token list.
+
                                          each top-level token list.
            LIST-BEGIN            204  This control token
 
                                        appears at the start of
 
                                        each embedded token list.
 
  
            LIST-END             205   This control token
+
              TOP-LEVEL-LIST-END   203   This control token
                                        appears at the end of
+
                                          appears at the end of
                                        each embedded token list.
+
                                          each top-level token list.
 +
              LIST-BEGIN            204  This control token
 +
                                          appears at the start of
 +
                                          each embedded token list.
  
            PUNCTUATION-PAD      200   This padding token should
+
              LIST-END              205   This control token
                                        be ignored by the token
+
                                          appears at the end of
                                        list stream.  It can be
+
                                          each embedded token list.
                                        sent to fill buffers.
 
  
 +
              PUNCTUATION-PAD      200  This padding token should
 +
                                          be ignored by the token
 +
                                          list stream.  It can be
 +
                                          sent to fill buffers.
  
  
Line 3,555: Line 3,752:
  
  
 +
Greenberg & Keene                                              [Page 67]
  
TOKEN LISTS
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
A token list consists of a sequence of atomic tokens or token lists.
 
Token lists are begun and ended by control tokens that delimit the
 
token lists.  There are three types of token lists:
 
  
      1. Top-level token lists.
+
  TOKEN LISTS
  
        Top-level token lists begin with TOP-LEVEL-LIST-BEGIN and
+
  A token list consists of a sequence of atomic tokens or token lists.
        end with TOP-LEVEL-LIST-ENDTop-level token lists are not
+
  Token lists are begun and ended by control tokens that delimit the
        contained in other lists.
+
  token listsThere are three types of token lists:
  
      2. Embedded token lists.
+
        1. Top-level token lists.
  
        These token lists occur inside other token lists.  They
+
            Top-level token lists begin with TOP-LEVEL-LIST-BEGIN and
        begin with LIST-BEGIN and end with LIST-END.
+
            end with TOP-LEVEL-LIST-END.  Top-level token lists are not
 +
            contained in other lists.
  
      3. The empty token list.
+
        2. Embedded token lists.
  
         This is a special example of the embedded token list.  In
+
            These token lists occur inside other token lists.  They
        some contexts, the empty token list represents Boolean
+
            begin with LIST-BEGIN and end with LIST-END.
        falsity.  An embedded empty token list is composed of a
+
 
        LIST-BEGIN followed immediately by a LIST-END.  A top-level
+
         3. The empty token list.
        empty token list is composed of TOP-LEVEL-LIST-BEGIN
+
 
        followed immediately by TOP-LEVEL-LIST-END.
+
            This is a special example of the embedded token list.  In
 +
            some contexts, the empty token list represents Boolean
 +
            falsity.  An embedded empty token list is composed of a
 +
            LIST-BEGIN followed immediately by a LIST-END.  A top-level
 +
            empty token list is composed of TOP-LEVEL-LIST-BEGIN
 +
            followed immediately by TOP-LEVEL-LIST-END.
  
 
11.2.2  Token List Stream Example
 
11.2.2  Token List Stream Example
  
This section contains an example of some data that can appear on a
+
  This section contains an example of some data that can appear on a
token list stream.  The example is a top-level token list encoding an
+
  token list stream.  The example is a top-level token list encoding an
NFILE DELETE command.
+
  NFILE DELETE command.
  
The DELETE command is composed of the following pieces:  a TOP-
+
  The DELETE command is composed of the following pieces:  a TOP-
LEVEL-LIST-BEGIN, the keyword DELETE, a data token containing the
+
  LEVEL-LIST-BEGIN, the keyword DELETE, a data token containing the
transaction identifier, a LIST-BEGIN, a LIST-END, a data token
+
  transaction identifier, a LIST-BEGIN, a LIST-END, a data token
containing a pathname of a file to be deleted, and a TOP-LEVEL-LIST-
+
  containing a pathname of a file to be deleted, and a TOP-LEVEL-LIST-
END.  This example uses t105 as the transaction identifier, and
+
  END.  This example uses t105 as the transaction identifier, and
/usr/max/temp as the pathname.
+
  /usr/max/temp as the pathname.
  
All numbers in this section are expressed in decimal notation.
+
  All numbers in this section are expressed in decimal notation.
  
The pieces of the command are displayed here in order:
+
  The pieces of the command are displayed here in order:
  
        1. TOP-LEVEL-LIST-BEGIN
+
            1. TOP-LEVEL-LIST-BEGIN
        2. The keyword token whose name is DELETE
+
            2. The keyword token whose name is DELETE
        3. The data token containing the characters:  t105
+
            3. The data token containing the characters:  t105
        4. LIST-BEGIN
+
            4. LIST-BEGIN
        5. LIST-END
+
            5. LIST-END
  
  
  
 +
Greenberg & Keene                                              [Page 68]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
        6. The data token containing the characters:  /usr/max/temp
 
        7. TOP-LEVEL-LIST-END
 
  
Now, let's translate each piece of the command into the bytes that
+
            6. The data token containing the characters:  /usr/max/temp
are transmitted through the token list stream.
+
            7. TOP-LEVEL-LIST-END
  
    1. TOP-LEVEL-LIST-BEGIN
+
  Now, let's translate each piece of the command into the bytes that
 +
  are transmitted through the token list stream.
  
         202    represents TOP-LEVEL-LIST-BEGIN
+
         1. TOP-LEVEL-LIST-BEGIN
  
    2. The keyword token whose name is DELETE.
+
          202    represents TOP-LEVEL-LIST-BEGIN
  
         A keyword token is introduced by PUNCTUATION-KEYWORD, which
+
         2. The keyword token whose name is DELETE.
        is represented in the token list stream as the byte 208.
 
  
        A data token follows, containing the string "DELETE".  A
+
          A keyword token is introduced by PUNCTUATION-KEYWORD, which
        data token under 200 bytes long is introduced by one byte
+
          is represented in the token list stream as the byte 208.
        containing its length in bytes.  The length of this data
 
        token is 6 bytes.
 
  
        The data token continues with the standard ASCII character
+
          A data token follows, containing the string "DELETE".  A
        set representation of each character in the string DELETE:
+
          data token under 200 bytes long is introduced by one byte
 +
          containing its length in bytes.  The length of this data
 +
          token is 6 bytes.
  
            208    represents PUNCTUATION-KEYWORD
+
          The data token continues with the standard ASCII character
            006    represents the length of this data token
+
          set representation of each character in the string DELETE:
            068    represents "D"
 
            069    represents "E"
 
            076    represents "L"
 
            069    represents "E"
 
            084    represents "T"
 
            069    represents "E"
 
  
    3. The data token containing the characters:  t105
+
              208    represents PUNCTUATION-KEYWORD
 +
              006    represents the length of this data token
 +
              068    represents "D"
 +
              069    represents "E"
 +
              076    represents "L"
 +
              069    represents "E"
 +
              084    represents "T"
 +
              069    represents "E"
  
         This data token is begun by its length in bytes (4), and
+
         3. The data token containing the characters: t105
        continues with the NFILE character set representation of
 
        each character in the string:
 
  
            004    represents the length of this data token
+
          This data token is begun by its length in bytes (4), and
            116    represents "t"
+
          continues with the NFILE character set representation of
            049    represents "1"
+
          each character in the string:
            048    represents "0"
 
            053    represents "5"
 
  
    4. LIST-BEGIN
+
              004    represents the length of this data token
 +
              116    represents "t"
 +
              049    represents "1"
 +
              048    represents "0"
 +
              053    represents "5"
  
            204    represents LIST-BEGIN
+
        4. LIST-BEGIN
  
 +
              204    represents LIST-BEGIN
  
  
  
  
 +
Greenberg & Keene                                              [Page 69]
  
    5. LIST-END
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
            205    represents LIST-END
 
  
    6. The data token containing the characters:  /usr/max/temp
+
        5. LIST-END
  
            013     represents length of this data token
+
              205     represents LIST-END
            047    represents "/"
 
            117    represents "u"
 
            115    represents "s"
 
            114    represents "r"
 
            047    represents "/"
 
            109    represents "m"
 
            097    represents "a"
 
            120    represents "x"
 
            047    represents "/"
 
            116    represents "t"
 
            101    represents "e"
 
            109    represents "m"
 
            112    represents "p"
 
  
    7. TOP-LEVEL-LIST-END
+
        6. The data token containing the characters:  /usr/max/temp
  
            203    represents TOP-LEVEL-LIST-END
+
              013    represents length of this data token
 +
              047    represents "/"
 +
              117    represents "u"
 +
              115    represents "s"
 +
              114    represents "r"
 +
              047    represents "/"
 +
              109    represents "m"
 +
              097    represents "a"
 +
              120    represents "x"
 +
              047    represents "/"
 +
              116    represents "t"
 +
              101    represents "e"
 +
              109    represents "m"
 +
              112    represents "p"
 +
 
 +
        7. TOP-LEVEL-LIST-END
 +
 
 +
              203    represents TOP-LEVEL-LIST-END
  
 
11.2.3  Mapping of Lisp Objects to Token List Stream Representation
 
11.2.3  Mapping of Lisp Objects to Token List Stream Representation
  
The Symbolics interface to the token list stream sends Lisp objects
+
  The Symbolics interface to the token list stream sends Lisp objects
through the underlying Byte Stream with Mark and produces Lisp
+
  through the underlying Byte Stream with Mark and produces Lisp
objects on the other end.  Not all Lisp objects can be sent in this
+
  objects on the other end.  Not all Lisp objects can be sent in this
way.  For example, compound objects other than lists are not handled.
+
  way.  For example, compound objects other than lists are not handled.
An appropriate analogy is the sending and reconstruction of list
+
  An appropriate analogy is the sending and reconstruction of list
structure via printed representation.  These are the types of objects
+
  structure via printed representation.  These are the types of objects
that can be sent, and their representations:
+
  that can be sent, and their representations:
 +
 
 +
        - Lisp strings are represented as data tokens in the NFILE
 +
          character set.  Only 8-bit strings can be sent <5>.
  
    - Lisp strings are represented as data tokens in the NFILE
+
        - Keyword symbols are represented as keyword tokens.  Although
      character setOnly 8-bit strings can be sent <5>.
+
          identifiable and reconstructable as keyword symbols, only
 +
          their names are sentAny properties, bindings, and the
 +
          like are not sent.
  
    - Keyword symbols are represented as keyword tokens.  Although
+
        - T is represented as BOOLEAN-TRUTH.
      identifiable and reconstructable as keyword symbols, only
 
      their names are sent.  Any properties, bindings, and the
 
      like are not sent.
 
  
    - T is represented as BOOLEAN-TRUTH.
+
        - NIL is represented as the empty token list.
  
    - NIL is represented as the empty token list.
+
        - Lists are represented as token lists. Circular lists cannot
  
    - Lists are represented as token lists.  Circular lists cannot
 
  
  
 +
Greenberg & Keene                                              [Page 70]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
      be sent.  See the footnote related to the ambiguity between
+
          be sent.  See the footnote related to the ambiguity between
  
      NIL and the empty list:  See the section "Types of Tokens
+
          NIL and the empty list:  See the section "Types of Tokens
      and Token Lists", section 11.2.1.
+
          and Token Lists", section 11.2.1.
  
    - Integers are represented as numeric tokens.  Only
+
        - Integers are represented as numeric tokens.  Only
      nonnegative integers less than 2^63 can be sent.
+
          nonnegative integers less than 2^63 can be sent.
  
 
11.2.4  Aborting and the Token List Stream
 
11.2.4  Aborting and the Token List Stream
  
A token list stream accrues the benefits of the abort management
+
  A token list stream accrues the benefits of the abort management
policy of the Byte Stream with Mark on which it is built.  In order
+
  policy of the Byte Stream with Mark on which it is built.  In order
to fully realize this benefit, some simple rules must be obeyed by
+
  to fully realize this benefit, some simple rules must be obeyed by
any implementation of the token list stream.
+
  any implementation of the token list stream.
 +
 
 +
  The term "transmission" means either an atomic token or a complete
 +
  top-level token list. A transmission starts with the control token
 +
  TOP-LEVEL-BEGIN and ends with TOP-LEVEL-END.  The top-level token
 +
  list can contain embedded token lists.
  
The term "transmission" means either an atomic token or a complete
+
  The interface that writes to the token list stream must be capable of
top-level token list. A transmission starts with the control token
+
  writing the representation of entire transmissions. When this
TOP-LEVEL-BEGIN and ends with TOP-LEVEL-END.  The top-level token
+
  interface is called, it must effectively lock the token list stream,
list can contain embedded token lists.
+
  and exclude access by other processes until the entire transmission
 +
  has been encoded and sent.
  
The interface that writes to the token list stream must be capable of
+
  If the sending is aborted while the stream is locked, the stream
writing the representation of entire transmissionsWhen this
+
  enters an "unsafe" state.  Trying to send data while the stream is
interface is called, it must effectively lock the token list stream,
+
  unsafe signals an errorThe application and the token list stream
and exclude access by other processes until the entire transmission
+
  must send a mark to cause resynchronization, and allow the token list
has been encoded and sent.
+
  stream to be used again.  When the reading side encounters this mark,
 +
  it resynchronizes itself according to whatever client protocol is in
 +
  use.
  
If the sending is aborted while the stream is locked, the stream
+
  Similarly, the interface that reads from the token list stream must
enters an "unsafe" state.  Trying to send data while the stream is
+
  be capable of reading entire transmissions.  When this interface is
unsafe signals an error.  The application and the token list stream
+
  called, it must lock the stream, excluding access by other processes
must send a mark to cause resynchronization, and allow the token list
+
  until the entire transmission has been read.
stream to be used again.  When the reading side encounters this mark,
 
it resynchronizes itself according to whatever client protocol is in
 
use.
 
  
Similarly, the interface that reads from the token list stream must
+
  If the reading is aborted while the stream is locked, the stream
be capable of reading entire transmissionsWhen this interface is
+
  enters an unsafe stateThe only exit from this unsafe state is by
called, it must lock the stream, excluding access by other processes
+
  means of receiving a mark.  When the stream is unsafe, the only valid
until the entire transmission has been read.
+
  operation that can be performed upon it is "read and discard all
 +
  tokens until a mark is encountered; read and discard that mark;
 +
  declare the stream safe again".
  
If the reading is aborted while the stream is locked, the stream
 
enters an unsafe state.  The only exit from this unsafe state is by
 
means of receiving a mark.  When the stream is unsafe, the only valid
 
operation that can be performed upon it is "read and discard all
 
tokens until a mark is encountered; read and discard that mark;
 
declare the stream safe again".
 
  
  
Line 3,765: Line 3,976:
  
  
 +
Greenberg & Keene                                              [Page 71]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
Depending on the client protocol, the receipt of a mark might cause
+
  Depending on the client protocol, the receipt of a mark might cause
the reading side to read for further marks.  NFILE implements the
+
  the reading side to read for further marks.  NFILE implements the
resynchronization of token list streams, and serves as a useful
+
  resynchronization of token list streams, and serves as a useful
example: See the section "NFILE Control Connection
+
  example: See the section "NFILE Control Connection
Resynchronization", section 9.1.
+
  Resynchronization", section 9.1.
  
The Symbolics implementation provides the two mark-handling
+
  The Symbolics implementation provides the two mark-handling
primitives in this way:
+
  primitives in this way:
  
  
  1. Send token (or list) preceded by a mark.  When the stream
+
      1. Send token (or list) preceded by a mark.  When the stream
      is in the unsafe state (on the output side), this is the
+
        is in the unsafe state (on the output side), this is the
      only permitted output operation (other than closing).
+
        only permitted output operation (other than closing).
  
  2. Read through to a mark and read the token (or list)
+
      2. Read through to a mark and read the token (or list)
      following the mark.  When the stream is in the unsafe state
+
        following the mark.  When the stream is in the unsafe state
      (on the input side), this is the only permitted input
+
        (on the input side), this is the only permitted input
      operation (other than closing).
+
        operation (other than closing).
  
 
11.3  Token List Data Stream
 
11.3  Token List Data Stream
  
The token list data stream is a facility to transmit stream data
+
  The token list data stream is a facility to transmit stream data
through a token list stream.  The token list data stream imposes the
+
  through a token list stream.  The token list data stream imposes the
following protocol on the data transmitted:
+
  following protocol on the data transmitted:
  
        - Data is sent in the format of loose data tokens, not
+
            - Data is sent in the format of loose data tokens, not
          contained in token lists.
+
              contained in token lists.
  
        - The keyword token EOF indicates that the end of data has
+
            - The keyword token EOF indicates that the end of data has
          been reached.
+
              been reached.
  
        - Token lists can be transmitted through the token list
+
            - Token lists can be transmitted through the token list
          data stream.
+
              data stream.
  
        - No loose tokens other than data tokens or the keyword
+
            - No loose tokens other than data tokens or the keyword
          token EOF can be sent.
+
              token EOF can be sent.
  
        - Boundaries between data tokens are not signification.
+
            - Boundaries between data tokens are not signification.
          The data is considered to be a continuous stream, with
+
              The data is considered to be a continuous stream, with
          the possible exception of marks.
+
              the possible exception of marks.
  
The token list data stream is most appropriate for sending file data.
+
  The token list data stream is most appropriate for sending file data.
It is expected (but not required) that its typical mode of use is to
+
  It is expected (but not required) that its typical mode of use is to
send a large number of data tokens, with an occasional token list.
+
  send a large number of data tokens, with an occasional token list.
The design intent was that token lists would be used by the
+
  The design intent was that token lists would be used by the
application program to indicate exceptional situations.
+
  application program to indicate exceptional situations.
  
Data tokens, the keyword token EOF, and token lists are defined in
+
  Data tokens, the keyword token EOF, and token lists are defined in
  
  
  
 +
Greenberg & Keene                                              [Page 72]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
the token list stream documentation:  See the section "Types of
 
Tokens and Token Lists", section 11.2.1.
 
  
The NFILE file protocol provides a good example of the use of token
+
  the token list stream documentation: See the section "Types of
list data streams.  NFILE sends file data through token list data
+
  Tokens and Token Lists", section 11.2.1.
streams; each NFILE data channel is a token list data stream. Errors
 
such as disk errors during the reading of a file are conveyed as
 
token lists through the token list data stream.
 
  
== BYTE STREAM WITH MARK ==
+
  The NFILE file protocol provides a good example of the use of token
 +
  list data streams.  NFILE sends file data through token list data
 +
  streams; each NFILE data channel is a token list data stream.  Errors
 +
  such as disk errors during the reading of a file are conveyed as
 +
  token lists through the token list data stream.
  
PURPOSE:  Byte Stream with Mark is a simple layer of protocol that
+
12.  BYTE STREAM WITH MARK
guarantees that an out-of-band signal can be transmitted in the case
+
 
of program interruption.  Byte Stream with Mark is designed to
+
  PURPOSE:  Byte Stream with Mark is a simple layer of protocol that
provide end-to-end stream consistency in the face of user program
+
  guarantees that an out-of-band signal can be transmitted in the case
aborts.
+
  of program interruption.  Byte Stream with Mark is designed to
 +
  provide end-to-end stream consistency in the face of user program
 +
  aborts.
  
 
12.1  Discussion of Byte Stream with Mark
 
12.1  Discussion of Byte Stream with Mark
  
INTRODUCTION
+
  INTRODUCTION
 +
 
 +
  Byte Stream with Mark is a reliable, bidirectional byte stream with
 +
  one out-of-band (but not out-of-sequence) signal called a "mark".
 +
  The design of Byte Stream with Mark ensures that the mark is always
 +
  recognizable on the receiving end.  The Byte Stream with Mark is
 +
  built on an underlying stream, which must support the transmission of
 +
  8-bit bytes.  Byte Stream with Mark has been implemented to run on
 +
  TCP and Chaos.  Marks are implemented differently on the two
 +
  protocols.
 +
 
 +
  Marks are used to resynchronize the stream when something has
 +
  occurred to interrupt normal operations.  For example, an application
 +
  layer sending data over the Byte Stream with Mark can abort in the
 +
  middle of sending that data.  Recovery is handled by sending a mark.
  
Byte Stream with Mark is a reliable, bidirectional byte stream with
+
  In the context of this document, "aborting" is defined as follows:
one out-of-band (but not out-of-sequence) signal called a "mark".
+
  Aborting the current execution of a program means to halt that
The design of Byte Stream with Mark ensures that the mark is always
+
  execution and to abandon it, never to complete it.  The data
recognizable on the receiving end.  The Byte Stream with Mark is
+
  representing the state of the execution are irrevocably discarded.
built on an underlying stream, which must support the transmission of
 
8-bit bytes.  Byte Stream with Mark has been implemented to run on
 
TCP and Chaos.  Marks are implemented differently on the two
 
protocols.
 
  
Marks are used to resynchronize the stream when something has
+
  EXAMPLE OF USE
occurred to interrupt normal operations.  For example, an application
 
layer sending data over the Byte Stream with Mark can abort in the
 
middle of sending that data.  Recovery is handled by sending a mark.
 
  
In the context of this document, "aborting" is defined as follows:
+
  Byte Stream with Mark is the layer of protocol underlying NFILE.
Aborting the current execution of a program means to halt that
+
  NFILE uses the marks implemented in Byte Stream with Mark to
execution and to abandon it, never to complete itThe data
+
  resynchronize control connections or data channels whose
representing the state of the execution are irrevocably discarded.
+
  synchronization has been lostFor a description of NFILE's use of
 +
  marks to resynchronize streams:  See the section "NFILE
 +
  Resynchronization Procedure", section 9.
  
EXAMPLE OF USE
 
  
Byte Stream with Mark is the layer of protocol underlying NFILE.
 
NFILE uses the marks implemented in Byte Stream with Mark to
 
resynchronize control connections or data channels whose
 
synchronization has been lost.  For a description of NFILE's use of
 
marks to resynchronize streams:  See the section "NFILE
 
Resynchronization Procedure", section 9.
 
  
 +
Greenberg & Keene                                              [Page 73]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
  BYTE STREAM WITH MARK ON CHAOSNET
  
BYTE STREAM WITH MARK ON CHAOSNET
+
  A mark is recognized on Chaosnet by a packet bearing the opcode 201
 +
  (octal).  There is no data in a mark packet, so the data portion of
 +
  the packet is ignored.  Byte Stream with Mark transmits all data in
 +
  packets bearing opcode 200 (octal).
  
A mark is recognized on Chaosnet by a packet bearing the opcode 201
+
  If Byte Stream with Mark is implemented on another (non-Chaos) stream
(octal).  There is no data in a mark packet, so the data portion of
+
  that supports opcode-bearing packets, the recommended implementation
the packet is ignored.  Byte Stream with Mark transmits all data in
+
  is the reservation of an opcode for the mark.
packets bearing opcode 200 (octal).
 
  
If Byte Stream with Mark is implemented on another (non-Chaos) stream
+
  BYTE STREAM WITH MARK ON TCP:  RECORD MODE
that supports opcode-bearing packets, the recommended implementation
 
is the reservation of an opcode for the mark.
 
  
BYTE STREAM WITH MARK ON TCP: RECORD MODE
+
  The purpose of Byte Stream with Mark is to guarantee that marks can
 +
  always be unambiguously identified.  Therefore, for TCP (and for any
 +
  transport layer that does not implement packets natively) a simple
 +
  record stream is imposed on the stream.  The record boundaries serve
 +
  only to distinguish where a mark can occur.  A record consists of a
 +
  two-byte byte count, most significant byte first, followed by that
 +
  many bytes of data. A byte count of zero is recognized as a mark.
  
The purpose of Byte Stream with Mark is to guarantee that marks can
+
  Both the sending side and the receiving side must rigorously maintain
always be unambiguously identified.  Therefore, for TCP (and for any
+
  the integrity of the record boundaries.  A writer to the stream must
transport layer that does not implement packets natively) a simple
+
  never output a byte count without that number of data bytes
record stream is imposed on the stream.  The record boundaries serve
+
  followingSimilarly, a reader of the stream, after reading a byte
only to distinguish where a mark can occur.  A record consists of a
+
  count, has effectively contracted to read that many bytes from the
two-byte byte count, most significant byte first, followed by that
+
  encapsulated stream, regardless of whether those bytes are requested
many bytes of data.  A byte count of zero is recognized as a mark.
+
  by the application layer.
  
Both the sending side and the receiving side must rigorously maintain
+
  MAINTAINING RECORD INTEGRITY
the integrity of the record boundaries.  A writer to the stream must
 
never output a byte count without that number of data bytes
 
following.  Similarly, a reader of the stream, after reading a byte
 
count, has effectively contracted to read that many bytes from the
 
encapsulated stream, regardless of whether those bytes are requested
 
by the application layer.
 
  
MAINTAINING RECORD INTEGRITY
+
  This subsection deals with maintaining record integrity on non-Chaos
 +
  networks.  Since Chaos implements packets natively, no special care
 +
  is required to maintain record integrity on the Chaos network.
  
This subsection deals with maintaining record integrity on non-Chaos
+
  The design discussed here guarantees record integrity; the underlying
networks.  Since Chaos implements packets natively, no special care
+
  stream must guarantee data integrity.
is required to maintain record integrity on the Chaos network.
 
  
The design discussed here guarantees record integrity; the underlying
+
  The basic design of Byte Stream with Mark on TCP (and other transport
stream must guarantee data integrity.
+
  layers that do not implement packets natively) is to preserve record
 +
  integrity by putting clearly demarcated, byte-counted records in the
 +
  natural records of the encapsulated stream.  Therefore, when the
 +
  outer stream requests a buffer's worth of file data from the
 +
  encapsulated stream, it expects to receive a buffer containing one
 +
  entire, ntegral, record of that stream, complete with byte count.
  
The basic design of Byte Stream with Mark on TCP (and other transport
+
  Because of diverse network implementations on different operating
layers that do not implement packets natively) is to preserve record
+
  systems, the software that implements the encapsulated stream might
integrity by putting clearly demarcated, byte-counted records in the
 
natural records of the encapsulated stream.  Therefore, when the
 
outer stream requests a buffer's worth of file data from the
 
encapsulated stream, it expects to receive a buffer containing one
 
entire, ntegral, record of that stream, complete with byte count.
 
  
Because of diverse network implementations on different operating
 
systems, the software that implements the encapsulated stream might
 
  
  
 +
Greenberg & Keene                                              [Page 74]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
not be able to provide integral record buffers to the Byte Stream
+
  not be able to provide integral record buffers to the Byte Stream
with Mark implementation.  For example, the writing stream could have
+
  with Mark implementation.  For example, the writing stream could have
written records that are much longer than available buffers on the
+
  written records that are much longer than available buffers on the
receiving system.  In this case, a request to read from the
+
  receiving system.  In this case, a request to read from the
encapsulated stream returns some buffer or some amount of data
+
  encapsulated stream returns some buffer or some amount of data
representing less than an entire Byte Stream with Mark record.  The
+
  representing less than an entire Byte Stream with Mark record.  The
input subroutine of the Byte Stream with Mark implementation must
+
  input subroutine of the Byte Stream with Mark implementation must
therefore return a region of this (smaller) buffer, representing less
+
  therefore return a region of this (smaller) buffer, representing less
than the full Byte Stream with Mark record.  Nevertheless, the Byte
+
  than the full Byte Stream with Mark record.  Nevertheless, the Byte
Stream with Mark must extract the count of the full Byte Stream with
+
  Stream with Mark must extract the count of the full Byte Stream with
Mark record from the first such buffer of each Byte Stream with Mark
+
  Mark record from the first such buffer of each Byte Stream with Mark
record, and maintain and update this count as succeeding component
+
  record, and maintain and update this count as succeeding component
buffers are read.
+
  buffers are read.
  
In this case, if the program reading from the Byte Stream with Mark
+
  In this case, if the program reading from the Byte Stream with Mark
aborts while reading data, the implementation of Byte Stream with
+
  aborts while reading data, the implementation of Byte Stream with
Mark must continue to read through the remaining buffers of the Byte
+
  Mark must continue to read through the remaining buffers of the Byte
Stream with Mark record that has been subdivided in this fashion.
+
  Stream with Mark record that has been subdivided in this fashion.
  
The user side program will have determined that an abort has
+
  The user side program will have determined that an abort has
occurred, and will request the Byte Stream with Mark to read up to
+
  occurred, and will request the Byte Stream with Mark to read up to
and through the next mark.  The Byte Stream with Mark will have
+
  and through the next mark.  The Byte Stream with Mark will have
processed a fractional record, and must discard the remaining buffers
+
  processed a fractional record, and must discard the remaining buffers
of the record now being read.
+
  of the record now being read.
  
 
12.2  Byte Stream with Mark Abortable States
 
12.2  Byte Stream with Mark Abortable States
  
Byte Stream with Mark is designed to provide end-to-end stream
+
  Byte Stream with Mark is designed to provide end-to-end stream
consistency in the face of user program aborts.  This section
+
  consistency in the face of user program aborts.  This section
describes user program aborts, and how Byte Stream with Mark handles
+
  describes user program aborts, and how Byte Stream with Mark handles
them.  In the context of this document, "aborting" is defined as
+
  them.  In the context of this document, "aborting" is defined as
follows:  Aborting the current execution of a program means to halt
+
  follows:  Aborting the current execution of a program means to halt
that execution and to abandon it, never to complete it.  The data
+
  that execution and to abandon it, never to complete it.  The data
representing the state of the execution are irrevocably discarded.
+
  representing the state of the execution are irrevocably discarded.
 +
 
 +
  USER PROGRAM ABORTS AND I/O STREAMS
 +
 
 +
  Aborting the execution of the code that manipulates I/O streams, in
 +
  general, poses significant problems.  Given that a stream is a static
 +
  data object, and is intended to be used over and over again, aborting
 +
  the execution of any routine manipulating a stream can leave it in an
 +
  inconsistent, unusable state.
 +
 
 +
  Many operating systems solve this problem by manipulating a large
 +
  subset of streams within the confines of the supervisor or executive
 +
  program, which is not vulnerable to aborts, short of system or
 +
  network failure.  Nevertheless, the need still exists to implement
 +
  streams outside of the boundaries of the supervisor.  Furthermore,
 +
 
 +
 
 +
 
 +
Greenberg & Keene                                              [Page 75]
 +
 
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
 +
 
 +
 
 +
  the Symbolics computer environment has no supervisor or executive
 +
  program, and is thus vulnerable to aborts everywhere.
 +
 
 +
  BYTE STREAM WITH MARK HANDLING OF USER PROGRAM ABORTS
 +
 
 +
  Byte Stream with Mark is designed to be nearly impervious to the
 +
  aborting of programs using it.  Its design is based on careful
 +
  analysis of all possible states of the stream, and of the effect of
 +
  aborts of the programs using the stream in each of these states.
 +
  This section provides that analysis.
 +
 
 +
  A "transmission" is a collection of user data sent by the application
 +
  level through the Byte Stream with Mark whose end is well-defined,
 +
  once its start has been recognized.  For instance, the token list
 +
  stream, when using Byte Stream with Mark, sends token lists.  When a
 +
  TOP-LEVEL-LIST-BEGIN has been sent, the containing transmission is
 +
  not considered complete until the corresponding TOP-LEVEL-LIST-END is
 +
  read.  See the section "Token List Transport Layer", section 11.
 +
 
 +
  The following cases are possible states of the stream when an abort
 +
  occurs:
 +
 
 +
        1. Abort occurs when the user program is not manipulating the
 +
            stream.
 +
 
 +
            This case presents no problem.
 +
 
 +
        2. Abort occurs after a transmission has been partially sent,
 +
            at a packet or record boundary.
 +
 
 +
            This implies that the datum that would indicate the
 +
            successful complete sending of that transmission has been
 +
            not yet been sent.
 +
 
 +
            The Byte Stream with Mark state is consistent, but the
 +
            application level state is not.  The application level must
 +
            determine that the execution of the code composing and
 +
            sending its transmission was, in fact, aborted, and
 +
            initiate resynchronization via marks.
 +
 
 +
            The receiving side must be careful not to act upon a
 +
            transmission (that is, to perform any action or side
 +
            effect) until the transmission has been successfully
 +
            received in entirety.  This protects the user program from
 +
            the possibility that an abort can occur after a
 +
            transmission has been partially sent.
 +
 
 +
 
 +
 
 +
 
 +
 
 +
Greenberg & Keene                                              [Page 76]
 +
 
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
 +
 
 +
 
 +
        3. Abort occurs during the sending or receiving of a record.
 +
 
 +
            This is the most vulnerable state of the mechanism.  This
 +
            case does not occur on packet-oriented media; it is
 +
            subsumed by the next case.
 +
 
 +
            This case is handled by minimizing the extent of this
 +
            window, and killing the connection when and if the
 +
            situation is detected.  Depending on the operating system
 +
            involved, this window could be minimized by using
 +
            interrupt-disabling mechanisms, auxiliary processes or
 +
            tasks, or some other technique.
  
USER PROGRAM ABORTS AND I/O STREAMS
+
            For buffered streams, input and output waiting can be done
 +
            in consistent states, thus minimizing the amount of time
 +
            manipulating the actual encapsulated stream.  For
 +
            unbuffered streams, a lot of time can be spent in this
 +
            window.  It is expected that unbuffered streams will be
 +
            exceedingly uncommon.  Nevertheless, the implementation of
 +
            Byte Stream with Mark must detect this case.
  
Aborting the execution of the code that manipulates I/O streams, in
+
        4. Abort occurs during the sending or receiving of fundamental
general, poses significant problems.  Given that a stream is a static
+
            units of the lowest-level underlying stream (packets,
data object, and is intended to be used over and over again, aborting
+
            buffers, or bytes).
the execution of any routine manipulating a stream can leave it in an
 
inconsistent, unusable state.
 
  
Many operating systems solve this problem by manipulating a large
+
            This case is usually handled by inhibiting interrupts, or
subset of streams within the confines of the supervisor or executive
+
            other forms of masking, in the code implementing the
program, which is not vulnerable to aborts, short of system or
+
            encapsulated stream, since no waiting is possible at
network failure. Nevertheless, the need still exists to implement
+
            unexpected times.
streams outside of the boundaries of the supervisor.  Furthermore,
 
  
 +
13.  POSSIBLE FUTURE EXTENSIONS
  
 +
  NFILE was designed to be extended as the needs of its clients grow,
 +
  or as new clients with different needs appear.  Currently it meets
 +
  the needs of the Symbolics Genera 7.0 operating system, although its
 +
  design is intentionally general.  If users of other operating systems
 +
  identify new features that would be useful, they could be added to
 +
  NFILE.  This section illustrates some areas areas where the design of
 +
  NFILE intentionally accommodates extensions.
  
 +
        - The NFILE protocol encodes commands and responses as text,
 +
          rather than using prearranged numbers.  This means that new
 +
          commands and responses can be added without having to obtain
 +
          a new number from a central registry.
  
 +
        - The Token List Transport Layer provides a general substrate
 +
          for the value-transmission portion of network protocols.  In
 +
          fact, it has been used at Symbolics for other protocols
  
the Symbolics computer environment has no supervisor or executive
 
program, and is thus vulnerable to aborts everywhere.
 
  
BYTE STREAM WITH MARK HANDLING OF USER PROGRAM ABORTS
 
  
Byte Stream with Mark is designed to be nearly impervious to the
+
Greenberg & Keene                                              [Page 77]
aborting of programs using it.  Its design is based on careful
 
analysis of all possible states of the stream, and of the effect of
 
aborts of the programs using the stream in each of these states.
 
This section provides that analysis.
 
  
A "transmission" is a collection of user data sent by the application
+
RFC 1037            NFILE - A File Access Protocol        December 1987
level through the Byte Stream with Mark whose end is well-defined,
 
once its start has been recognized.  For instance, the token list
 
stream, when using Byte Stream with Mark, sends token lists.  When a
 
TOP-LEVEL-LIST-BEGIN has been sent, the containing transmission is
 
not considered complete until the corresponding TOP-LEVEL-LIST-END is
 
read.  See the section "Token List Transport Layer", section 11.
 
  
The following cases are possible states of the stream when an abort
 
occurs:
 
  
      1. Abort occurs when the user program is not manipulating the
+
          besides NFILE. The Token List Transport Layer could
        stream.
+
          conveniently be extended to support transmission of other
 +
          types of values besides those it currently supports.
  
         This case presents no problem.
+
         - The character set to be used for file transfer could be made
 +
          negotiable.
  
      2. Abort occurs after a transmission has been partially sent,
+
        - The command character set could be made negotiable.
        at a packet or record boundary.
+
          Currently there is no negotiation sequence, but one could be
 +
          added.
  
         This implies that the datum that would indicate the
+
         - Greater support for more complex file organizations could be
        successful complete sending of that transmission has been
+
          added, such as record files, databases, and so on.  This
        not yet been sent.
+
          could be an extension to the direct access mode facility.
  
         The Byte Stream with Mark state is consistent, but the
+
         - Currently, the LOGIN command allows the user side to inform
        application level state is notThe application level must
+
          the server which version of NFILE it is runningThis
        determine that the execution of the code composing and
+
          feature is included in NFILE so that a server can continue
        sending its transmission was, in fact, aborted, and
+
          to support older versions of the protocol even after new,
        initiate resynchronization via marks.
+
          extended versions have been implemented.  However, the
 +
          specification is currently somewhat vague as to how the
 +
          server can make use of the version.
  
         The receiving side must be careful not to act upon a
+
         - NFILE is not restricted to using TCP or Chaos as its
        transmission (that is, to perform any action or side
+
          underlying protocolNFILE can be built on any byte stream
        effect) until the transmission has been successfully
+
          protocol that supports reliable transmission of 8-bit bytes
        received in entiretyThis protects the user program from
+
          and multiple connections.
        the possibility that an abort can occur after a
 
        transmission has been partially sent.
 
  
 +
  In addition to the possible future extensions, we would like to
 +
  mention a known limitation of NFILE.
  
 +
  Currently NFILE requires multiple connections for a single session.
 +
  That is, the control connection must be separate from the data
 +
  connections.  If NFILE is to be used over a telephone, this
 +
  requirement poses an inconvenient restriction.  It is possible to
 +
  implement a multiplexing scheme as a level between NFILE and the
 +
  communication medium.
  
  
Line 4,033: Line 4,359:
  
  
      3. Abort occurs during the sending or receiving of a record.
 
  
        This is the most vulnerable state of the mechanism.  This
 
        case does not occur on packet-oriented media; it is
 
        subsumed by the next case.
 
  
        This case is handled by minimizing the extent of this
 
        window, and killing the connection when and if the
 
        situation is detected.  Depending on the operating system
 
        involved, this window could be minimized by using
 
        interrupt-disabling mechanisms, auxiliary processes or
 
        tasks, or some other technique.
 
  
        For buffered streams, input and output waiting can be done
 
        in consistent states, thus minimizing the amount of time
 
        manipulating the actual encapsulated stream.  For
 
        unbuffered streams, a lot of time can be spent in this
 
        window.  It is expected that unbuffered streams will be
 
        exceedingly uncommon.  Nevertheless, the implementation of
 
        Byte Stream with Mark must detect this case.
 
  
      4. Abort occurs during the sending or receiving of fundamental
 
        units of the lowest-level underlying stream (packets,
 
        buffers, or bytes).
 
  
        This case is usually handled by inhibiting interrupts, or
 
        other forms of masking, in the code implementing the
 
        encapsulated stream, since no waiting is possible at
 
        unexpected times.
 
  
== POSSIBLE FUTURE EXTENSIONS ==
 
  
NFILE was designed to be extended as the needs of its clients grow,
 
or as new clients with different needs appear.  Currently it meets
 
the needs of the Symbolics Genera 7.0 operating system, although its
 
design is intentionally general.  If users of other operating systems
 
identify new features that would be useful, they could be added to
 
NFILE.  This section illustrates some areas areas where the design of
 
NFILE intentionally accommodates extensions.
 
  
      - The NFILE protocol encodes commands and responses as text,
 
        rather than using prearranged numbers.  This means that new
 
        commands and responses can be added without having to obtain
 
        a new number from a central registry.
 
  
      - The Token List Transport Layer provides a general substrate
+
Greenberg & Keene                                              [Page 78]
        for the value-transmission portion of network protocols.  In
 
        fact, it has been used at Symbolics for other protocols
 
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
                                APPENDIX A
 +
                          NORMAL TRANSLATION MODE
  
  
        besides NFILE.  The Token List Transport Layer could
+
  NORMAL translation mode guarantees the following:
        conveniently be extended to support transmission of other
 
        types of values besides those it currently supports.
 
  
      - The character set to be used for file transfer could be made
+
        - A file containing characters in the NFILE character set can
        negotiable.
+
          be written to any NFILE server and read back intact
 +
          (containing the same characters).
  
      - The command character set could be made negotiable.
+
        - A file written by NFILE should not appear as "foreign" to a
        Currently there is no negotiation sequence, but one could be
+
          server operating system unless the file contains NFILE's
        added.
+
          extended characters.  That is, a server file that uses only
 +
          the subset of the NFILE character set limited to standard
 +
          ASCII characters (the 95 printing characters, and the native
 +
          representation of return, linefeed, page, backspace, rubout,
 +
          and tab) can be read and written, with the result being the
 +
          same data in NFILE characters as exists in server
 +
          characters.
  
      - Greater support for more complex file organizations could be
+
  In this section, all numbers designating values of character codes
        added, such as record files, databases, and so onThis
+
  are to be interpreted in octalThe notation "x in c1..c2" means
        could be an extension to the direct access mode facility.
+
  "for all character codes x such that c1 <= x <= c2."
  
      - Currently, the LOGIN command allows the user side to inform
+
  The NFILE character set is an extension of standard ASCII.  The 95
        the server which version of NFILE it is runningThis
+
  ASCII printing characters have the same numerical codes in the NFILE
        feature is included in NFILE so that a server can continue
+
  character set.  Five ASCII non-printing characters have counterparts
        to support older versions of the protocol even after new,
+
  in the NFILE character set, as shown in the following tableThe
        extended versions have been implementedHowever, the
+
  NFILE character set includes a single Return character, rather than
        specification is currently somewhat vague as to how the
+
  the carriage-return line-feed sequence typically used in ASCIIThe
        server can make use of the version.
+
  NFILE character set does not include the ASCII control characters,
 +
  other than the five shown in the following table, but does include
 +
  some additional printing and formatting characters that have no
 +
  counterparts in ASCII.
  
      - NFILE is not restricted to using TCP or Chaos as its
+
                            NFILE     Standard ASCII
        underlying protocol.  NFILE can be built on any byte stream
 
        protocol that supports reliable transmission of 8-bit bytes
 
        and multiple connections.
 
  
In addition to the possible future extensions, we would like to
+
        Rubout:            207      177
mention a known limitation of NFILE.
+
        Backspace:          210      10
 +
        Tab:                211      11
 +
        Linefeed:          212      12
 +
        Page:              214      14
  
Currently NFILE requires multiple connections for a single session.
+
  Note that the NFILE Return character is of code 215. This character
That is, the control connection must be separate from the data
+
  includes "going to the next line"This is a notable difference from
connectionsIf NFILE is to be used over a telephone, this
+
  the convention used in PDP-10 ASCII in which lines are ended by a
requirement poses an inconvenient restriction.  It is possible to
+
  pair of characters, "carriage return" and "line feed".
implement a multiplexing scheme as a level between NFILE and the
 
communication medium.
 
  
  
  
  
 +
Greenberg & Keene                                              [Page 79]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
  NORMAL TRANSLATION TO UNIX SERVERS
  
 +
  The translation given in this table is appropriate for use by UNIX
 +
  servers, or other servers that use 8-bit bytes to store ASCII
 +
  characters.  Machines with 8-bit bytes usually place the extra NFILE
 +
  characters in the top half of their character set.
  
 +
      TABLE 1.  TRANSLATIONS FROM NFILE CHARACTERS TO UNIX CHARACTERS
  
  
 +
            NFILE character      UNIX character
  
 +
            x in 000..007        x
 +
            x in 010..015        x + 200
 +
            x in 016..176        x
 +
            177                  377
 +
            x in 200..207        x
 +
            x in 210..211        x - 200
 +
            212                  015
 +
            x in 213..214        x - 200
 +
            215                  012
 +
            x in 216..376        x
 +
            377                  177
  
 +
      TABLE 2.  TRANSLATIONS FROM UNIX CHARACTERS TO NFILE CHARACTERS
  
  
 +
            UNIX character        NFILE character
  
                            APPENDIX A
+
            x in 000..007        x
                      NORMAL TRANSLATION MODE
+
            x in 010..011        x + 200
 +
            012                  215
 +
            x in 013..014        x + 200
 +
            015                  212
 +
            x in 016..176        x
 +
            177                  377
 +
            x in 200..207        x
 +
            x in 210..215        x - 200
 +
            x in 216..376        x
 +
            377                  177
  
 +
  NORMAL TRANSLATION TO PDP-10 FAMILY SERVERS
  
NORMAL translation mode guarantees the following:
+
  The translation given in this table is appropriate for use by PDP-10
 +
  family servers, or other servers that use 7-bit bytes to store ASCII
 +
  characters.  On the PDP-10 the sequence CRLF, 015 012, represents a
 +
  new line.
  
      - A file containing characters in the NFILE character set can
 
        be written to any NFILE server and read back intact
 
        (containing the same characters).
 
  
      - A file written by NFILE should not appear as "foreign" to a
 
        server operating system unless the file contains NFILE's
 
        extended characters.  That is, a server file that uses only
 
        the subset of the NFILE character set limited to standard
 
        ASCII characters (the 95 printing characters, and the native
 
        representation of return, linefeed, page, backspace, rubout,
 
        and tab) can be read and written, with the result being the
 
        same data in NFILE characters as exists in server
 
        characters.
 
  
In this section, all numbers designating values of character codes
 
are to be interpreted in octal.  The notation "x in c1..c2" means
 
"for all character codes x such that c1 <= x <= c2."
 
  
The NFILE character set is an extension of standard ASCII.  The 95
+
Greenberg & Keene                                              [Page 80]
ASCII printing characters have the same numerical codes in the NFILE
 
character set.  Five ASCII non-printing characters have counterparts
 
in the NFILE character set, as shown in the following table.  The
 
NFILE character set includes a single Return character, rather than
 
the carriage-return line-feed sequence typically used in ASCII.  The
 
NFILE character set does not include the ASCII control characters,
 
other than the five shown in the following table, but does include
 
some additional printing and formatting characters that have no
 
counterparts in ASCII.
 
  
                          NFILE     Standard ASCII
+
RFC 1037            NFILE - A File Access Protocol        December 1987
  
      Rubout:            207      177
 
      Backspace:          210      10
 
      Tab:                211      11
 
      Linefeed:          212      12
 
      Page:              214      14
 
  
Note that the NFILE Return character is of code 215.  This character
+
  The mechanism for this translation on machines with 7-bit bytes is to
includes "going to the next line".  This is a notable difference from
+
  use the RUBOUT character (octal code 177) as an escape character.
the convention used in PDP-10 ASCII in which lines are ended by a
 
pair of characters, "carriage return" and "line feed".
 
  
 +
        TABLE 3.  TRANSLATIONS FROM NFILE TO PDP-10 CHARACTERS
  
  
 +
            NFILE character      PDP-10 character(s)
  
 +
            x in 000..007        x
 +
            x in 010..012        177 x
 +
            013                  013
 +
            x in 014..015        177 x
 +
            x in 016..176        x
 +
            177                  177 177
 +
            x in 200..207        177 x - 200
 +
            x in 210..212        x - 200
 +
            213                  177 013
 +
            214                  014
 +
            215                  015 012
 +
            x in 216..376        177 x - 200
 +
            377                  no corresponding code
  
 +
  These tables might seem confusing at first, but there are some
 +
  general rules about it that should make it clearer.  First, NFILE
 +
  characters in the range 000..177 are generally represented as
 +
  themselves, and x in 200..377 is generally represented as 177
 +
  followed by x - 200.  That is, 177 is used to quote the second 200
 +
  NFILE characters.  It was deemed that 177 is a more useful and common
 +
  character than 377, so 177 177 means 177, and there is no way to
 +
  describe 377 with PDP-10 ASCII characters.  In the NFILE character
 +
  set, the formatting control characters appear offset up by 200 with
 +
  respect to standard ASCII.  This explains why the preferred mode of
 +
  expressing 210 (backspace) is 010, and 010 turns into 177 010.  The
 +
  same reasoning applies to 211 (Tab), 212 (Linefeed), 214 (Formfeed),
 +
  and 215 (Return).
  
NORMAL TRANSLATION TO UNIX SERVERS
+
  More special care is needed for the Return character, which is the
 +
  mapping of the system-dependent representation of "the start of a new
 +
  line".  The NFILE Return (215) is equivalent to 015 012 (CRLF) in
 +
  some ASCII systems.  In the NFILE character set there is no
 +
  representation
  
The translation given in this table is appropriate for use by UNIX
 
servers, or other servers that use 8-bit bytes to store ASCII
 
characters.  Machines with 8-bit bytes usually place the extra NFILE
 
characters in the top half of their character set.
 
  
    TABLE 1.  TRANSLATIONS FROM NFILE CHARACTERS TO UNIX CHARACTERS
 
  
  
        NFILE character      UNIX character
 
  
        x in 000..007        x
 
        x in 010..015        x + 200
 
        x in 016..176        x
 
        177                  377
 
        x in 200..207        x
 
        x in 210..211        x - 200
 
        212                  015
 
        x in 213..214        x - 200
 
        215                  012
 
        x in 216..376        x
 
        377                  177
 
  
    TABLE 2.  TRANSLATIONS FROM UNIX CHARACTERS TO NFILE CHARACTERS
 
  
  
        UNIX character        NFILE character
 
  
        x in 000..007        x
 
        x in 010..011        x + 200
 
        012                  215
 
        x in 013..014        x + 200
 
        015                  212
 
        x in 016..176        x
 
        177                  377
 
        x in 200..207        x
 
        x in 210..215        x - 200
 
        x in 216..376        x
 
        377                  177
 
  
NORMAL TRANSLATION TO PDP-10 FAMILY SERVERS
+
Greenberg & Keene                                              [Page 81]
  
The translation given in this table is appropriate for use by PDP-10
+
RFC 1037            NFILE - A File Access Protocol        December 1987
family servers, or other servers that use 7-bit bytes to store ASCII
 
characters.  On the PDP-10 the sequence CRLF, 015 012, represents a
 
new line.
 
  
  
 +
    TABLE 4.  TRANSLATIONS FROM PDP-10 CHARACTERS TO NFILE CHARACTERS
  
  
 +
            PDP-10 character      NFILE character
  
 +
            x in 000..007        x
 +
            x in 010..012        x + 200
 +
            013                  013
 +
            014                  214
 +
            015 012              215
 +
            015 not-012          115
 +
            x in 016..176        x
 +
            177 x in 000..007    x + 200
 +
            177 x in 010..012    x
 +
            177 013              213
 +
            177 x in 014..015    x
 +
            177 x in 016..176    x + 200
 +
            177 177              177
  
The mechanism for this translation on machines with 7-bit bytes is to
+
  of a carriage that doesn't go to a new line, so if there is one in a
use the RUBOUT character (octal code 177) as an escape character.
+
  server file, it must be translated to something else.  When
 +
  converting ASCII characters to NFILE characters, an 015 followed by
 +
  an 012 therefore turns into a 215.  A stray CR is arbitrarily
 +
  translated into a single M (115).
  
      TABLE 3.  TRANSLATIONS FROM NFILE TO PDP-10 CHARACTERS
 
  
  
        NFILE character      PDP-10 character(s)
 
  
        x in 000..007        x
 
        x in 010..012        177 x
 
        013                  013
 
        x in 014..015        177 x
 
        x in 016..176        x
 
        177                  177 177
 
        x in 200..207        177 x - 200
 
        x in 210..212        x - 200
 
        213                  177 013
 
        214                  014
 
        215                  015 012
 
        x in 216..376        177 x - 200
 
        377                  no corresponding code
 
  
These tables might seem confusing at first, but there are some
 
general rules about it that should make it clearer.  First, NFILE
 
characters in the range 000..177 are generally represented as
 
themselves, and x in 200..377 is generally represented as 177
 
followed by x - 200.  That is, 177 is used to quote the second 200
 
NFILE characters.  It was deemed that 177 is a more useful and common
 
character than 377, so 177 177 means 177, and there is no way to
 
describe 377 with PDP-10 ASCII characters.  In the NFILE character
 
set, the formatting control characters appear offset up by 200 with
 
respect to standard ASCII.  This explains why the preferred mode of
 
expressing 210 (backspace) is 010, and 010 turns into 177 010.  The
 
same reasoning applies to 211 (Tab), 212 (Linefeed), 214 (Formfeed),
 
and 215 (Return).
 
  
More special care is needed for the Return character, which is the
 
mapping of the system-dependent representation of "the start of a new
 
line".  The NFILE Return (215) is equivalent to 015 012 (CRLF) in
 
some ASCII systems.  In the NFILE character set there is no
 
representation
 
  
  
Line 4,298: Line 4,583:
  
  
  TABLE 4.  TRANSLATIONS FROM PDP-10 CHARACTERS TO NFILE CHARACTERS
 
  
  
        PDP-10 character      NFILE character
 
  
        x in 000..007        x
 
        x in 010..012        x + 200
 
        013                  013
 
        014                  214
 
        015 012              215
 
        015 not-012          115
 
        x in 016..176        x
 
        177 x in 000..007    x + 200
 
        177 x in 010..012    x
 
        177 013              213
 
        177 x in 014..015    x
 
        177 x in 016..176    x + 200
 
        177 177              177
 
  
of a carriage that doesn't go to a new line, so if there is one in a
 
server file, it must be translated to something else.  When
 
converting ASCII characters to NFILE characters, an 015 followed by
 
an 012 therefore turns into a 215.  A stray CR is arbitrarily
 
translated into a single M (115).
 
  
  
Line 4,327: Line 4,592:
  
  
 +
Greenberg & Keene                                              [Page 82]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
                                APPENDIX B
 +
                          RAW TRANSLATION MODE
  
  
 +
  RAW mode means no translation should be performed.  In RAW mode the
 +
  server operating system should treat the file as a character file and
 +
  use the same data formatting that would be appropriate for a
 +
  character file, but transfer the actual binary values of the
 +
  character codes.
  
  
Line 4,351: Line 4,625:
  
  
                            APPENDIX B
 
                        RAW TRANSLATION MODE
 
  
  
RAW mode means no translation should be performed.  In RAW mode the
 
server operating system should treat the file as a character file and
 
use the same data formatting that would be appropriate for a
 
character file, but transfer the actual binary values of the
 
character codes.
 
  
  
Line 4,381: Line 4,648:
  
  
 +
Greenberg & Keene                                              [Page 83]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
                                APPENDIX C
 +
                      SUPER-IMAGE TRANSLATION MODE
  
  
 +
  SUPER-IMAGE mode is intended for use by PDP-10 family machines only.
 +
  It is included largely as an illustration of a system-dependent
 +
  extension.  A server machine that has 8-bit bytes should treat
 +
  SUPER-IMAGE mode the same as NORMAL mode.
  
 +
  In this section, all numbers designating values of character codes
 +
  are to be interpreted in octal.  The notation "x in c1..c2" means
 +
  "for all character codes x such that c1 <= x <= c2."
  
 +
  SUPER-IMAGE mode suppresses the use of the 177 character as an escape
 +
  character.  Character translation should be done as in NORMAL mode,
 +
  with one exception.  When a two-character sequence beginning with 177
 +
  is detected, the 177 should not be output at all.
  
 +
  In this section, all numbers designating values of character codes
 +
  are to be interpreted in octal.  SUPER-IMAGE mode is intended for use
 +
  by PDP-10 machines only.
  
 +
  SUPER-IMAGE suppresses the use of Rubout for quoting.  That is, for
 +
  each entry beginning with a 177 in the PDP-10 character column in the
 +
  NORMAL translation table, the NFILE character has the 177 removed.
  
 +
        TABLE 5.  SUPER-IMAGE TRANSLATION FROM NFILE TO ASCII
  
  
 +
            NFILE character  PDP-10 character(s)
  
  
 +
            x in 000..177    x
 +
            x in 200..214    <x - 200>
 +
            215              015 012
 +
            x in 216..376    <x - 200>
 +
            377              no corresponding code
  
  
Line 4,404: Line 4,699:
  
  
                            APPENDIX C
 
                    SUPER-IMAGE TRANSLATION MODE
 
  
  
SUPER-IMAGE mode is intended for use by PDP-10 family machines only.
 
It is included largely as an illustration of a system-dependent
 
extension.  A server machine that has 8-bit bytes should treat
 
SUPER-IMAGE mode the same as NORMAL mode.
 
  
In this section, all numbers designating values of character codes
 
are to be interpreted in octal.  The notation "x in c1..c2" means
 
"for all character codes x such that c1 <= x <= c2."
 
  
SUPER-IMAGE mode suppresses the use of the 177 character as an escape
 
character.  Character translation should be done as in NORMAL mode,
 
with one exception.  When a two-character sequence beginning with 177
 
is detected, the 177 should not be output at all.
 
  
In this section, all numbers designating values of character codes
+
Greenberg & Keene                                              [Page 84]
are to be interpreted in octal.  SUPER-IMAGE mode is intended for use
 
by PDP-10 machines only.
 
  
SUPER-IMAGE suppresses the use of Rubout for quoting.  That is, for
+
RFC 1037            NFILE - A File Access Protocol        December 1987
each entry beginning with a 177 in the PDP-10 character column in the
 
NORMAL translation table, the NFILE character has the 177 removed.
 
  
      TABLE 5.  SUPER-IMAGE TRANSLATION FROM NFILE TO ASCII
 
  
 +
        TABLE 6.  SUPER-IMAGE TRANSLATION FROM ASCII TO NFILE
  
        NFILE character  PDP-10 character(s)
 
  
 +
            PDP-10 character  NFILE character
  
        x in 000..177    x
 
        x in 200..214    <x - 200>
 
        215              015 012
 
        x in 216..376    <x - 200>
 
        377              no corresponding code
 
  
 +
            x in 000..007    x
 +
            x in 010..012    x + 200
 +
            013              013
 +
            014              214
 +
            015 012          215
 +
            015 not-012      115
 +
            x in <016..176>  x
 +
            177              177
  
  
Line 4,457: Line 4,738:
  
  
      TABLE 6.  SUPER-IMAGE TRANSLATION FROM ASCII TO NFILE
 
  
  
        PDP-10 character  NFILE character
 
  
  
        x in 000..007    x
 
        x in 010..012    x + 200
 
        013              013
 
        014              214
 
        015 012          215
 
        015 not-012      115
 
        x in <016..176>  x
 
        177              177
 
  
  
Line 4,489: Line 4,760:
  
  
 +
Greenberg & Keene                                              [Page 85]
  
 +
RFC 1037            NFILE - A File Access Protocol        December 1987
  
  
 +
                                  NOTES
  
 +
  1. NFILE's requirement for using the NFILE character set is
 +
      recognized as a drawback for non-Symbolics machines.  A useful
 +
      extension to NFILE would be a provision to make the character set
 +
      negotiable.
  
 +
  2. Implementation note:  Care must be taken that the freeing is done
 +
      before the control connection is allowed to process another
 +
      command, or else the control connection may find the data channel
 +
      to be falsely indicated as being in use.
  
 +
  3. The Symbolics operating system has the policy that whenever the
 +
      user side is waiting for the server side, a user abort can occur.
 +
      This user side waiting can occur in any context, such awaiting a
 +
      response, waiting in the middle of reading network input, or
 +
      waiting in the middle of transmitting network output.  Thus there
 +
      are no "hung" states.
  
 +
  4. Note that the Token List Transport Layer supplies a special token
 +
      to indicate Boolean truth, but no corresponding token to indicate
 +
      Boolean falsity.  NFILE uses an empty token list to indicate
 +
      Boolean falsity.  The historical reason for this asymmetry is the
 +
      inability of the Lisp language to differentiate between the empty
 +
      list and NIL, which is traditionally used to mean Boolean falsity.
 +
      If the flexibility of both a Boolean falsity and an empty token
 +
      list were allowed, it would create problems for an operating
 +
      system that cannot distinguish between the two.  This aspect of
 +
      the protocol is recognized as a concession to the Lisp language.
 +
      The unfortunate effect is to disallow operating systems to
 +
      distinguish between Boolean falsity and an empty list.
  
 +
  5. No so-called "fat strings" can be sent.
  
  
Line 4,510: Line 4,811:
  
  
                                NOTES
 
  
1. NFILE's requirement for using the NFILE character set is
 
  recognized as a drawback for non-Symbolics machines.  A useful
 
  extension to NFILE would be a provision to make the character set
 
  negotiable.
 
  
2. Implementation note:  Care must be taken that the freeing is done
 
  before the control connection is allowed to process another
 
  command, or else the control connection may find the data channel
 
  to be falsely indicated as being in use.
 
  
3. The Symbolics operating system has the policy that whenever the
 
  user side is waiting for the server side, a user abort can occur.
 
  This user side waiting can occur in any context, such awaiting a
 
  response, waiting in the middle of reading network input, or
 
  waiting in the middle of transmitting network output.  Thus there
 
  are no "hung" states.
 
  
4. Note that the Token List Transport Layer supplies a special token
 
  to indicate Boolean truth, but no corresponding token to indicate
 
  Boolean falsity.  NFILE uses an empty token list to indicate
 
  Boolean falsity.  The historical reason for this asymmetry is the
 
  inability of the Lisp language to differentiate between the empty
 
  list and NIL, which is traditionally used to mean Boolean falsity.
 
  If the flexibility of both a Boolean falsity and an empty token
 
  list were allowed, it would create problems for an operating
 
  system that cannot distinguish between the two.  This aspect of
 
  the protocol is recognized as a concession to the Lisp language.
 
  The unfortunate effect is to disallow operating systems to
 
  distinguish between Boolean falsity and an empty list.
 
  
5. No so-called "fat strings" can be sent.
+
Greenberg & Keene                                              [Page 86]

Revision as of 22:45, 22 September 2020




Network Working Group B. Greenberg Request for Comments: 1037 S. Keene

                                                         December 1987


                   NFILE -  A File Access Protocol


STATUS OF THIS MEMO

  This document includes a specification of the NFILE file access
  protocol and its underlying levels of protocol, the Token List
  Transport Layer and Byte Stream with Mark.  The goal of this
  specification is to promote discussion of the ideas described here,
  and to encourage designers of future file protocols to take advantage
  of these ideas.  A secondary goal is to make the specification
  available to sites that might benefit from implementing NFILE.  The
  distribution of this document is unlimited.
                            TABLE OF CONTENTS
                                                                   Page
  1.  INTRODUCTION                                                    3
  2.  NFILE PROTOCOL LAYERING                                         4
  3.  OVERVIEW OF AN NFILE SESSION                                    5
  4.  NFILE CONTROL AND DATA CONNECTIONS                              6
  5.  NFILE FILE OPENING MODES                                        7
  6.  NFILE CHARACTER SET                                             9
  7.  CONVENTIONS USED IN THIS DOCUMENT                              10
      7.1  Mapping Data Types Into Token List Representation         10
      7.2  Format of NFILE Commands and Responses                    10
      7.3  Data Channel Handles and Direct File Identifiers          13
      7.4  Syntax of File and Directory Pathname Arguments           13
      7.5  Format of NFILE File Property/Value Pairs                 14
  8.  NFILE COMMANDS                                                 16
      8.1  ABORT Command                                             16
      8.2  CHANGE-PROPERTIES Command                                 16
      8.3  CLOSE Command                                             17
      8.4  COMPLETE Command                                          19
      8.5  CONTINUE Command                                          20


Greenberg & Keene [Page 1]

RFC 1037 NFILE - A File Access Protocol December 1987


      8.6  CREATE-DIRECTORY Command                                  21
      8.7  CREATE-LINK Command                                       21
      8.8  DATA-CONNECTION Command                                   22
      8.9  DELETE Command                                            23
      8.10  DIRECT-OUTPUT Command                                    23
      8.11  DIRECTORY Command                                        24
           8.11.1  NFILE DIRECTORY Data Format                       26
      8.12  DISABLE-CAPABILITIES Command                             27
      8.13  ENABLE-CAPABILITIES Command                              28
      8.14  EXPUNGE Command                                          28
      8.15  FILEPOS Command                                          29
           8.15.1  Implementation Hint for FILEPOS Command           30
      8.16  FINISH Command                                           30
      8.17  HOME-DIRECTORY Command                                   31
      8.18  LOGIN Command                                            32
      8.19  MULTIPLE-FILE-PLISTS Command                             34
      8.20  OPEN Command                                             35
           8.20.1  NFILE OPEN Optional Keyword/Value Pairs           39
           8.20.2  NFILE OPEN Response Return Values                 45
      8.21  PROPERTIES Command                                       47
      8.22  READ Command                                             49
      8.23  RENAME Command                                           50
      8.24  RESYNCHRONIZE-DATA-CHANNEL Command                       51
           8.24.1  Implementation Hints for RESYNCHRONIZE-DATA-      51
                   CHANNEL Command
      8.25  UNDATA-CONNECTION Command                                52
  9.  NFILE RESYNCHRONIZATION PROCEDURE                              53
      9.1  NFILE Control Connection Resynchronization                54
      9.2  NFILE Data Connection Resynchronization                   55
  10.  NFILE ERRORS AND NOTIFICATIONS                                58
      10.1  Notifications From the NFILE Server                      58
      10.2  NFILE Command Response Errors                            59
      10.3  NFILE Asynchronous Errors                                60
      10.4  NFILE Three-letter Error Codes                           61
  11.  TOKEN LIST TRANSPORT LAYER                                    65
      11.1  Introduction to the Token List Transport Layer           65
      11.2  Token List Stream                                        66
           11.2.1  Types of Tokens and Token Lists                   66
           11.2.2  Token List Stream Example                         68
           11.2.3  Mapping of Lisp Objects to Token List Stream      70
                   Representation
           11.2.4  Aborting and the Token List Stream                71


Greenberg & Keene [Page 2]

RFC 1037 NFILE - A File Access Protocol December 1987


      11.3  Token List Data Stream                                   72
  12.  BYTE STREAM WITH MARK                                         73
      12.1  Discussion of Byte Stream with Mark                      73
      12.2  Byte Stream with Mark Abortable States                   75
  13.  POSSIBLE FUTURE EXTENSIONS                                    77
  APPENDIX A.  NORMAL TRANSLATION MODE                               79
  APPENDIX B.  RAW TRANSLATION MODE                                  83
  APPENDIX C.  SUPER-IMAGE TRANSLATION MODE                          84
  NOTES                                                              86
                             LIST OF TABLES
  TABLE 1.    TRANSLATIONS FROM NFILE CHARACTERS TO UNIX CHARACTERS  80
  TABLE 2.    TRANSLATIONS FROM UNIX CHARACTERS TO NFILE CHARACTERS  80
  TABLE 3.    TRANSLATIONS FROM NFILE TO PDP-10 CHARACTERS           81
  TABLE 4.    TRANSLATIONS FROM PDP-10 CHARACTERS TO NFILE           82
              CHARACTERS
  TABLE 5.    SUPER-IMAGE TRANSLATION FROM NFILE TO ASCII            84
  TABLE 6.    SUPER-IMAGE TRANSLATION FROM ASCII TO NFILE            85

1. INTRODUCTION

  NFILE stands for "New File Protocol".  NFILE was originally designed
  as a replacement for an older protocol named QFILE, with the goal of
  solving robustness problems of QFILE, hence the name "New File
  Protocol".
  NFILE was designed and implemented at Symbolics by Bernard S.
  Greenberg.  Mike McMahon made important contributions, especially in
  the design and implementation of the Byte Stream with Mark and Token
  List Transport layers.  NFILE has been used successfully for file
  access between Symbolics computers since 1985.  NFILE servers have
  been written for UNIX hosts as well.  NFILE is intended for use by
  any type of file system, not just the native Symbolics file system.
  NFILE is a file access protocol that supports a large set of
  operations on files and directories on remote systems, including:
           - Reading and writing entire files
           - Reading and writing selected portions of files
           - Deleting and renaming files


Greenberg & Keene [Page 3]

RFC 1037 NFILE - A File Access Protocol December 1987


           - Creating links
           - Listing, creating, and expunging directories
           - Listing and changing the properties of files
           - Enabling and disabling access capabilities on a remote
             host
  NFILE supports file transfer of binary or character files.
  The NFILE server provides information about any errors that occur in
  the course of a command.  In addition, NFILE has a robust scheme for
  handling aborts on the user side.
  This specification defines NFILE user version 2 and server version 2.
  We do not envision NFILE as an unchanging protocol, but rather as a
  protocol that could continue to develop if additional requirements
  are identified though the process of this Request for Comments.  The
  design of NFILE makes room for various useful extensions.  Some of
  the extensions that we are considering are described later on in this
  document:  See the section "Possible Future Extensions", section 13.

2. NFILE PROTOCOL LAYERING

  NFILE is a layered file protocol.  The layers are:
            +-----------------------------------------------+
            |client program or user interface               |
            +-----------------------------------------------+
            |NFILE                                          |
            +-----------------------------------------------+
            |Token List Transport Layer                     |
            +-----------------------------------------------+
            |Byte Stream with Mark                          |
            +-----------------------------------------------+
            |reliable host-host byte transmission protocol  |
            +-----------------------------------------------+
  Byte Stream with Mark is a simple protocol that guarantees that an
  out-of-band signal can be transmitted in the case of program
  interruption.  Byte Stream with Mark is to be layered upon extant
  byte stream protocols.  An important goal of the NFILE design was
  that NFILE could be built on any byte stream.  It is currently
  implemented on TCP and Chaosnet.  See the section "Byte Stream with
  Mark", section 12.
  The Token List Transport Layer is a protocol that facilitates the
  transmission of simple structured data, such as lists.  See the
  section "Token List Transport Layer", section 11.



Greenberg & Keene [Page 4]

RFC 1037 NFILE - A File Access Protocol December 1987


  The NFILE commands and command responses are transmitted in "token
  lists".  See the section "NFILE Commands", section 8.
  This specification does not include a client program or user
  interface to the protocol.  In the Symbolics implementation, the
  normal file operations transparently invoke NFILE, when the remote
  host is known to support NFILE.  Another possible interface to NFILE
  would be through a dedicated client program that would issue NFILE
  commands in response to explicit requests by the user.

3. OVERVIEW OF AN NFILE SESSION

  An NFILE session is a dialogue between two hosts.  The host that
  initiates the NFILE session is known as the "user side", and the
  other host is the "server side".  The user side sends all NFILE
  commands.  The server receives each command, processes it, and
  responds to it, indicating the success or failure of the command.
  The user side keeps track of commands sent and command responses
  received by using "transaction identifiers" to identify each command.
  The user side generates a transaction identifier (which must be
  unique per this dialogue) for each command, and sends the transaction
  identifier to the server along with the command.  Each NFILE server
  response includes the transaction identifier of the command with
  which the response is associated.  The server is not required to
  respond to commands in the same order that the user gave them.
  The user side sends NFILE commands over a bidirectional network
  connection called the "control connection".  The server sends its
  command responses on the same control connection.  The control
  connection governing the NFILE session is established at the
  beginning of the session.  If the control connection is ever broken,
  the NFILE session is ended.
  Whereas NFILE commands and responses are transmitted on the control
  connection, file data is transferred over "data channels".  An "input
  data channel" transfers data from server to user.  An "output data
  channel" transfers data from user to server.  Each input data channel
  is associated with an output data channel; together these two
  channels comprise a "data connection".
  Often more than one NFILE activity is occurring at any given time.
  For example, several files can be open and transferring data
  simultaneously; one or more commands can be in process at the same
  time; and the server can be simultaneously transmitting directory
  lists and processing further commands.  This happens in an
  implementation in which the user side has multiple processes, and
  several processes share a single NFILE server.


Greenberg & Keene [Page 5]

RFC 1037 NFILE - A File Access Protocol December 1987


4. NFILE CONTROL AND DATA CONNECTIONS

  The user and server communicate through a single control connection
  and a set of data connections.  Data connections are established and
  disestablished by NFILE commands.  The user side sends NFILE commands
  to the server over the control connection.  The server responds to
  every user command over this control connection.  The actual file
  data is transmitted over the data connections.
  User aborts can disrupt the normal flow of data on the control
  connection and data connections.  An important aspect of any file
  protocol is the way it handles user aborts.  NFILE uses a
  resynchronization procedure to bring the affected control connection
  or data channel from an unknown, unsafe state into a known state.
  After resynchronization, the control connection or data channel can
  be reused.  See the section "NFILE Resynchronization Procedure",
  section 9.
  THE CONTROL CONNECTION
  An NFILE session is begun when the NFILE user program connects to a
  remote host and establishes a network connection.  This initial
  connection is the control conection of the dialogue.  If TCP is used
  as the underlying protocol, contact NFILE's well-known port, 59.  If
  Chaos is used, use the contact name "NFILE".
  The control connection is the vehicle used by the user to send its
  commands, and the server to send its command responses.  These types
  of communication occur over the NFILE control connection:
        - The user side sends NFILE commands.
        - The server sends command responses.
        - The server sends "notifications" and "asynchronous errors".
          See the section "NFILE Errors and Notifications", section 10.
        - During resynchronization (a special circumstance) either the
          user or server sends a mark.
  All commands, command responses, and other data flowing over the
  NFILE control connection are transmitted in the format of "top-level
  token lists".  The control connection expects never to receive "loose
  tokens"; that is, tokens not contained in token lists.






Greenberg & Keene [Page 6]

RFC 1037 NFILE - A File Access Protocol December 1987


  DATA CONNECTIONS
  Data connections are established and discarded at user request, by
  means of two NFILE commands:  DATA-CONNECTION and UNDATA-CONNECTION.
  Each data connection is associated with a specific control
  connection, which is the same control connection that caused the data
  connection to be established.
  Each data connection is composed of two "data channels".  Each data
  channel is capable of sending data in one direction.  The term "input
  channel" refers to the data channel that transmits data from the
  server to the user side; "output channel" refers to the data channel
  that transmits data from the user to the server side.  Throughout the
  NFILE documentation, the terms "input channel" and "output channel"
  are seen from the perspective of the user side.  A single data
  channel can be used for one data transfer after another.
  The format of the data transferred on the data channels is defined as
  a "token list data stream".  See the section "Token List Data
  Stream", section 11.3. When the end of data is reached, the keyword
  token EOF is sent.  Occasionally, token lists are transmitted over
  the data channels, such as asynchronous error descriptions.

5. NFILE FILE OPENING MODES

  The NFILE OPEN command opens a file for reading, writing, or "direct
  access" at the server host.  That means, in general, asking the host
  file system to access the file and obtaining a file number, pointer,
  or other quantity for subsequent rapid access to the file; this is
  called an "opening".  The term "opening" translates to a file stream
  in Symbolics terminology, a JFN in TOPS-20 terminology, and a file
  descriptor in UNIX terminology.  An opening usually keeps track of
  how many bytes have been read or written, and other bookkeeping
  information.
  NFILE supports two ways of transferring file data, "data stream mode"
  and "direct access mode".  A single mode is associated with each
  opening.  Note that an NFILE dialogue can have more than one opening,
  and thus use both modes.
  DATA STREAM MODE:
  Data stream mode of file transfer is the default mode of NFILE's OPEN
  command.  Data stream mode is appropriate when the entire file is
  transferred, either from user to server, or from server to user.
  Data stream mode is used more often than direct access mode.



Greenberg & Keene [Page 7]

RFC 1037 NFILE - A File Access Protocol December 1987


  The OPEN command includes a "handle" argument, which identifies the
  data channel to be used to transfer the data.  The handle is used in
  subsequent commands to reference this particular opening.  When a
  data stream opening is requested with the OPEN command, the file is
  opened and the data begins to flow immediately.
  The sending side transmits the entire contents of the specified file
  over the specified data channel as rapidly as the network permits.
  When the sending side reaches the end of the file, it transmits a
  special control token to signal end of file.  The receiving side
  expects an uninterrupted stream of bytes to appear immediately on its
  side of the data channel.
  The user gives the CLOSE command to terminate a data stream transfer.
  CLOSE results in closing the file.
  DIRECT ACCESS MODE:
  Direct access mode enables reading or writing data from a given
  starting point in a file through a specified number of bytes.  In
  direct access mode, data is requested and sent in individual
  transactions.  To request a direct access mode opening, the OPEN
  command is used with a DIRECT-FILE-ID argument.  (In data stream
  mode, no DIRECT-FILE-ID is supplied.)  The direct file identifier is
  used in subsequent commands to reference the direct access opening.
  When a file is opened in direct access mode, the flow of data does
  not start immediately.  Rather, the user gives either a READ command
  (to request data to flow from server to user) or a DIRECT-OUTPUT
  command (to request data to flow from user to server).  When reading,
  the READ command allows the user to specify the starting point and
  the number of bytes of data to transfer.  When writing, the FILEPOS
  command can be used to specify the starting point, before the
  DIRECT-OUTPUT command is given.  The user can give many READ and
  DIRECT-OUTPUT commands, one after another.
  The user side terminates the direct access transfer by using the
  CLOSE command.  The ABORT command can be given to terminate without
  transmitting all of the specified bytes.







Greenberg & Keene [Page 8]

RFC 1037 NFILE - A File Access Protocol December 1987


6. NFILE CHARACTER SET

  The NFILE character set <1> is an extension of standard ASCII.  NFILE
  command and response names use only the standard ASCII characters.
  However, the protocol supports the transfer of the non-ASCII
  characters in the NFILE character set; these characters might be
  stored in files, or might be used in pathnames.
  Servers on machines that do not natively use the NFILE character set
  must perform character set translations for character openings,
  depending on the requested translation mode.  No translation is
  required for binary openings.  There are three translation modes for
  character openings:  NORMAL, RAW, and SUPER-IMAGE.  Each mode
  specifies a way to translate between the server's native set and the
  NFILE character set.
  NORMAL mode is the default of the OPEN command.  The translation for
  NORMAL mode ensures that a file containing characters in the NFILE
  character set can be written to a remote host and read back intact.
  OPEN has optional keyword arguments to specify RAW or SUPER-IMAGE.
  RAW mode means to perform no translation whatsoever.  SUPER-IMAGE
  mode is intended for use by PDP-10 family machines only.  It is
  included largely as an illustration of a system-dependent extension.
  The details of each translation mode are given in Appendices:
        See the section "NORMAL Translation Mode", Appendix A.  See the
        section "RAW Translation Mode", Appendix B.  See the section
        "SUPER-IMAGE Translation Mode", Appendix C.
  The use of the NFILE character set brings up a difficulty involved
  with determining an exact position within a character file.  Some
  NFILE characters expand to more than one native character on some
  servers.  Thus, for character files, when we speak of a given
  position in a file or the length of a file, we must specify whether
  we are speaking in "NFILE units" or "server units", because the
  counting of characters is different.  This causes major problems in
  file position reckoning for character files.  Specifically, it is
  futile for a user side to carefully monitor file position during
  output by counting characters, when character translation is in
  effect.  The server's operating system interface for "position to
  point x in a file" necessarily operates in server units, but the user
  side has counted in NFILE units.  The user side cannot try to
  second-guess the translation-counting process without losing host-
  independence.  See the section "FILEPOS NFILE Command".




Greenberg & Keene [Page 9]

RFC 1037 NFILE - A File Access Protocol December 1987


7. CONVENTIONS USED IN THIS DOCUMENT

7.1 Mapping Data Types Into Token List Representation

  Throughout this NFILE specification, the data types of arguments,
  return values, asynchronous error descriptions, and notifications are
  described as being strings, integers, dates, time intervals, and so
  on.  However, each conceptual data type must be mapped into the
  appropriate token list representation for transmission.  The mapping
  of conceptual data types to token list representation is shown here:
   Conceptual Type     Token List Representation
   ----------------------------------------------------------------
   Keyword             A keyword token
   Keyword list        A token list of keyword tokens
   Integer             A numeric data token
   String              A data token containing the characters of the
                       string in the NFILE character set.
   Boolean Truth       The token known as BOOLEAN-TRUTH.
   Boolean False       The empty token list.
   Date                A numeric data token.  The date is expressed in
                       Universal Time format, which measures a time as
                       the number of seconds since January 1, 1900, at
                       midnight GMT.
   Date-or-never       Can be either a date or the empty token list,
                       representing "never".  "Never" is used for
                       values such as the time a directory was last
                       expunged, if it has never been expunged.
   Time interval       A numeric data token.  The time interval is
                       expressed in seconds.  A time interval
                       indicating "never" is represented by the empty
                       token list.

7.2 Format of NFILE Commands and Responses

  Each command description begins by giving the command format and
  response format.  Here is the beginning of the DATA-CONNECTION
  command description:


Greenberg & Keene [Page 10]

RFC 1037 NFILE - A File Access Protocol December 1987


  Command:  (DATA-CONNECTION tid new-input-handle new-output-handle)
  Response: (DATA-CONNECTION tid connection-identifier)
  The command descriptions follow these conventions:
   1. NFILE commands and responses are transmitted as top-level token
      lists.
      Top-level token lists are enclosed in parentheses in these
      command descriptions.  These parentheses are not sent literally
      across the control or data connections, but are a shorthand
      representation of special control tokens that delimit top-level
      token lists.  Specifically, TOP-LEVEL-LIST-BEGIN starts a top-
      level token list; TOP-LEVEL-LIST-END ends a top-level token list.
   2. NFILE command names are keywords.
      The command name is required in every command and command
      response.  All NFILE command names are keywords.  Keywords appear
      in the NFILE documentation as their names in uppercase.  For
      example, DATA-CONNECTION and DELETE are two command names.
   3. A unique transaction identifier (tid) identifies each command.
      The transaction identifier is a string made up by the user side
      to identify this particular transaction, which is composed of the
      command and the response associated with this command.  The
      transaction identifier is abbreviated in the command descriptions
      as tid.  Transaction identifiers are limited to fifteen
      characters in length.  The transaction identifier is required in
      every command and command response.
  OPTIONAL ARGUMENTS
  Many NFILE commands have "optional arguments".  Optional arguments
  can be supplied (with appropriate values), or left out.  If optional
  arguments are left out, their omission must be made explicit by means
  of substituting the empty token list in their place.  The only
  exception to that rule is for trailing optional arguments or return
  values, which can be omitted without including the empty token list.
  For example, the text of the DELETE command description explains that
  either a handle or a pathname must be supplied, but not both;
  therefore, one of them is an optional argument.  Here is the command
  format of DELETE:
        (DELETE tid handle pathname)


Greenberg & Keene [Page 11]

RFC 1037 NFILE - A File Access Protocol December 1987


   If you supply a handle and no pathname, the command format is:
        (DELETE tid handle)
   If you supply a pathname and no handle, the command format is:
        (DELETE tid empty-token-list pathname)
  The empty token list in the token list stream appears as a LIST-BEGIN
  followed immediately by a LIST-END.
  OPTIONAL KEYWORD/VALUE PAIRS
  Four NFILE commands have "optional keyword/value pairs".  These
  commands are: COMPLETE, LOGIN, OPEN, and READ.  Optional
  keyword/value pairs can be either included in the command or omitted
  entirely.  There is no need to substitute the empty token list for
  ommitted optional keyword tokens, unlike optional arguments.  The
  order of the option keyword/value pairs is not significant.
  If included, optional keyword/value pairs are a sequence of
  alternating keywords and values.  The values associated with the
  keywords can be keywords, lists, strings, Booleans, integers, dates,
  date-or-never's, and time intervals.  The text of each command
  description states what type of value is appropriate for each
  optional keyword.
  Optional keyword/value pairs appear in the text as the keyword only,
  in uppercase letters.  For example, here is the format of the LOGIN
  command:
  Command Format:
        (LOGIN tid user password FILE-SYSTEM USER-VERSION)
  FILE-SYSTEM and USER-VERSION are two optional keywords associated
  with the LOGIN command.  The user side can supply USER-VERSION, and
  omit FILE-SYSTEM as shown in this example:
        (LOGIN x105 tjones let-me-in USER-VERSION 2)
  As seen above, the optional keyword/value pair USER-VERSION, if
  supplied in a command, consists of the keyword USER-VERSION followed
  by the value to be used for that keyword (in this example, 2).




Greenberg & Keene [Page 12]

RFC 1037 NFILE - A File Access Protocol December 1987


7.3 Data Channel Handles and Direct File Identifiers

  Several NFILE commands require an argument that specifies an opening.
  This kind of argument is called a handle in the command description.
  It is always a string type argument.  A handle can be either a data
  channel handle or a direct file identifier, depending on the mode of
  the opening:


  Data Stream
  The handle must identify a data channel that is bound to an opening.
  Direct Access
  In general, the handle must be a direct file identifier.  A direct
  file identifier specifies a direct access opening.  It is the same as
  the value supplied in the DIRECT-FILE-ID keyword/value pair in the
  OPEN command.  It is used for all operations that identify an opening
  rather than a data channel.
  Two NFILE commands applicable to direct access openings are
  exceptions to the general rule.  The handle supplied in ABORT and
  CONTINUE cannot be a direct file identifier, but must be a data
  channel handle instead.

7.4 Syntax of File and Directory Pathname Arguments

  Some arguments and return values in the NFILE command descriptions
  represent file pathnames.  These are strings in the pathname syntax
  native to the server host.  These pathnames contain no host
  identifiers of any kind.  These pathnames must be fully defaulted, in
  the sense that they have a directory and file name (and file type, if
  the server operating system supports file types).  If appropriate, a
  device is referenced in the pathname.  If the server file system
  supports version numbers, there is always an explicit version number,
  even if that number or other specification is that system's
  representation of "newest" or "oldest".







Greenberg & Keene [Page 13]

RFC 1037 NFILE - A File Access Protocol December 1987


  Here are some examples of file pathnames, for different server hosts:
  Server Host     Example of File Pathname
  ------------------------------------------------------------
     UNIX            /usr/max/life.c
     TOPS-20         ps:<max>life.bin.17
     VMS             MACD:[MAX]LIFE.FOR;3
     Symbolics LMFS  >max>life.lisp.newest
  ------------------------------------------------------------
  The CREATE-DIRECTORY and HOME-DIRECTORY commands take a directory as
  an argument.  In NFILE commands, a directory is represented by a
  string that names the directory.  In most cases this string is in the
  syntax native to the server host.  However in some cases the native
  format is modified somewhat to clarify that the string names a
  directory, and not a file.  For example, a directory on UNIX is
  represented by "/usr/max/", not "/usr/max".
  Here are some examples of directory pathnames for different server
  hosts:
  Server Host     Example of Directory Pathname
  ------------------------------------------------------------
     UNIX            /usr/max/
     TOPS-20         <max>
     VMS             MACD:[MAX]
     Symbolics LMFS  >max>hacks>
  ------------------------------------------------------------

7.5 Format of NFILE File Property/Value Pairs

  Several NFILE commands request information regarding the properties
  of files or directories.  These commands include:  DIRECTORY,
  MULTIPLE-FILE-PLISTS, PROPERTIES, and CHANGE-PROPERTIES.  This
  section describes how file property information is conveyed over the
  token list stream.


Greenberg & Keene [Page 14]

RFC 1037 NFILE - A File Access Protocol December 1987


  File property information is usually sent in property/value pairs,
  where the property identifies the property, and the following value
  gives the value of that property for the specified file.
  Each property is denoted either by a keyword or an integer.  You can
  mix both ways of specifying properties (keyword or integer) within a
  single description.  An integer is interpreted as an index into the
  Property Index Table, an array of property keywords.  The server can
  optionally send a Property Index Table to the user during the
  execution of the LOGIN command, although it is not required.  This
  greatly reduces the length of transmissions.
  In command arguments, file properties cannot be specified with
  integers; keywords must be used to specify file properties in command
  arguments.  Integers can be used to denote file properties only in
  command responses.
  We now list the keywords associated with file properties.  This list
  is not intended to be restrictive.  If a programmer implementing
  NFILE needs a new keyword, a new keyword (not on this list) can be
  invented.  The type of value of any new keywords is by default
  string.  The keywords are sorted here by conceptual data type:
   Data type       Keywords denoting file properties
  ----------------------------------------------------------------
   Integers        BLOCK-SIZE, BYTE-SIZE, GENERATION-RETENTION-COUNT,
                   LENGTH-IN-BLOCKS, LENGTH-IN-BYTES,
                   DEFAULT-GENERATION-RETENTION-COUNT
   Dates           CREATION-DATE, MODIFICATION-DATE
   Date-or-never's REFERENCE-DATE, INCREMENTAL-DUMP-DATE,
                   COMPLETE-DUMP-DATE, DATE-LAST-EXPUNGED,
                   EXPIRATION-DATE
   Time intervals  AUTO-EXPUNGE-INTERVAL
   Keyword Lists   SETTABLE-PROPERTIES, LINK-TRANSPARENCIES,
                   DEFAULT-LINK-TRANSPARENCIES
   Boolean values  DELETED, DONT-DELETE, DONT-DUMP, DONT-REAP,
                   SUPERSEDE-PROTECT, NOT-BACKED-UP, OFFLINE,
                   TEMPORARY, CHARACTERS, DIRECTORY




Greenberg & Keene [Page 15]

RFC 1037 NFILE - A File Access Protocol December 1987


   Strings         ACCOUNT, AUTHOR, LINK-TO, PHYSICAL-VOLUME,
                   PROTECTION, VOLUME-NAME, PACK-NUMBER, READER,
                   DISK-SPACE-DESCRIPTION, and any keywords not
                   on this list
  Note that these keyword names are intended to imply the semantics of
  the properties.  For a discussion of the semantics of CREATION-DATE:
  See the section "NFILE OPEN Response Return Values", section 8.20.2.
  The "Reference Guide to Streams, Files, and I/O" in the Symbolics
  documentation set details the semantics that Symbolics associates
  with these properties.

8. NFILE COMMANDS

  It is important to understand the conventions used in each of the
  following command descriptions.  See the section "Conventions Used in
  This Document", section 7.

8.1 ABORT Command

  Command:  (ABORT tid input-handle)
  Response: (ABORT tid)
  ABORT cleanly interrupts and prematurely terminates a single direct
  access mode data transfer initiated with READ.  The required input-
  handle string argument identifies a data channel on which an input
  transfer is currently taking place; this must be a direct access
  transfer.  input-handle must identify a data channel; it cannot be a
  direct file identifier.
  Upon receiving the ABORT command, the server checks to see if a
  transfer is still active on that channel.  If so, the server
  terminates the transfer by telling the data connection logical
  process to stop transferring bytes of data.  The user side needs to
  issue this command only when there are outstanding unread bytes.
  This excludes the case of the data channel having been disestablished
  or reallocated by the user side.
  Whether or not a transfer is active on that channel, the user side
  puts the data channel into the unsafe state.  Before the data channel
  can be used again, it must be resynchronized.

8.2 CHANGE-PROPERTIES Command

  Command:  (CHANGE-PROPERTIES tid handle pathname property-pairs)
  Response: (CHANGE-PROPERTIES tid)


Greenberg & Keene [Page 16]

RFC 1037 NFILE - A File Access Protocol December 1987


  CHANGE-PROPERTIES changes one or more properties of a file.  Either a
  handle or a pathname must be given, but not both.  Whichever one is
  given must be supplied as a string.  handle identifies a data channel
  that is bound to an open file; it can be a direct file identifier.
  pathname identifies a file on the server machine.
  property-pairs is a required token list of keyword/value pairs, where
  the name of the property to be changed is the keyword, and the
  desired new property value is the value.
  The properties that can be changed are host-dependent, as are any
  restrictions on the values of those properties.  The properties that
  can be changed are the same as those returned as settable-properties,
  in the command response for the PROPERTIES command.
  The server tries to modify all the properties listed in property-
  pairs to the desired new values.  There is currently no definition
  about what should be done if the server can successfully change some
  properties but not others.
  For further information on file property keywords and associated
  values:  See the section "Format of NFILE File Property/Value Pairs",
  section 7.5.

8.3 CLOSE Command

  Command:  (CLOSE tid handle abort-p)
  Response: (CLOSE tid truename binary-p other-properties)
  CLOSE terminates a data transfer, and frees a data channel.  The
  handle must be a data channel handle for a data stream opening, or a
  direct file identifier for a direct access opening.  If a data
  channel is given, a transfer must be active on that handle.  If
  abort-p is supplied as Boolean truth, the file is close-aborted, as
  described below.
  "Closing the file" has different implications specific to each
  operating system.  It generally implies invalidation of the pointer
  or logical identifier obtained from the operating system when the
  file was "opened", and freeing of operating system and/or job
  resources associated with active file access.  For output files, it
  involves ensuring that every last bit sent by the user has been
  successfully written to disk.  The server should not send a
  successful response until all these things have completed
  successfully.



Greenberg & Keene [Page 17]

RFC 1037 NFILE - A File Access Protocol December 1987


  In either data stream or direct access mode, the user can request the
  server to close-abort the file, instead of simply closing it.  To
  close-abort a file means to close it in such a way, if possible, that
  it is as if the file had never been opened.  In the specific case of
  a file being created, it must appear as if the file had never been
  created.  This might be more difficult to implement on certain
  operating systems than others, but tricks with temporary names and
  close-time renamings by the server can usually be used to implement
  close-abort in these cases.  In the case of a file being appended to,
  close-abort means to forget the appended data.
  AN UNSUCCESSFUL CLOSE OPERATION
  For the normal CLOSE operation (not a close-abort), after writing
  every last bit sent by the user to disk, and before closing the file,
  the server checks the data channel specified by handle to see if an
  asynchronous error is outstanding on that channel.  That is, the
  server must determine whether it has sent an asynchronous error
  description to the user, to which the user has not yet responded with
  a CONTINUE command.  If so, the server is unable to close the file,
  and therefore sends a command error response indicating that an error
  is pending on the channel.  The appropriate three-letter error code
  is EPC.  See the section "NFILE Errors and Notifications", section
  10.
  A SUCCESSFUL CLOSE OPERATION
  The return values for OPEN and CLOSE are syntactically identical, but
  the values might change between the time of the file being opened and
  when it is closed.  For example, the truename return value is
  supplied after all the close-time renaming of output files is done
  and the version numbers resolved (for operating systems supporting
  version numbers).  Therefore, on some systems the truename of a file
  has one value at the time it is opened, and a different value when it
  has been closed.  For a description of the CLOSE return values:  See
  the section "NFILE OPEN Response Return Values", section 8.20.2.
  If the user gives the CLOSE command with abort-p supplied as Boolean
  truth, thus requesting a close-abort of the file, the server need not
  check whether an asynchronous error description is outstanding on the
  channel.  The server simply close-aborts the file.






Greenberg & Keene [Page 18]

RFC 1037 NFILE - A File Access Protocol December 1987


8.4 COMPLETE Command

  Command:  (COMPLETE tid string pathname DIRECTION NEW-OK DELETED)
  Response: (COMPLETE tid new-string success)
  COMPLETE performs file pathname completion.
  string is a partial filename typed by the user and pathname is the
  default name against which it is being typed.  Both string and
  pathname are required arguments, and are of type string.  The
  remaining arguments are optional keyword/value pairs.
  NEW-OK is Boolean; if followed by Boolean truth, the server should
  allow either a file that already exists, or a file that does not yet
  exist.  The default of NEW-OK is false; that is, the server does not
  consider files that do not already exist.
  DELETED is a Boolean type argument; if followed by Boolean truth, the
  server is instructed to look for files that have been deleted but not
  yet expunged, as well as non-deleted files.  The default is to ignore
  soft-deleted files.
  DIRECTION can be followed by READ, to indicate that the file is to be
  read.  If the file is to be written, DIRECTION can be followed by
  WRITE.  The default is READ.
  The filename is completed according to the files present in the host
  file system, and the expanded string new-string is returned. New-
  string is always a string containing a file name:  either the
  original string, or a new, more specific string.  The value of
  success indicates the status of the completion. The keyword value OLD
  or NEW means complete success, whereas the empty token list means
  failure.  The following values of success are possible:
  Value               Meaning
  ----------------------------------------------------------------
  OLD                 Success:  the string completed to the name of
                      a file that exists.
  NEW                 Success:  the string completed to the name of
                      a file that could be created.
  Empty token list    Failure due to one of these reasons:
                      The file is on a file system that does not


Greenberg & Keene [Page 19]

RFC 1037 NFILE - A File Access Protocol December 1987


                      support completion.  new-string is supplied as
                      the unchanged string.
                      There is no possible completion.  new-string
                      is supplied as the unchanged string.
                      There is more than one possible completion.
                      The given string is completed up to the first
                      point of ambiguity, and the result is supplied
                      as new-string.
                      A directory name was completed.  Completion
                      was not successful because additional
                      components to the right of this directory
                      remain to be specified.  The string is
                      completed through the directory name and the
                      delimiter that follows it, and the result is
                      returned in new-string.
  The semantics of COMPLETE are not documented here.  See the
  "Reference Guide to Streams, Files, and I/O" in the Symbolics
  documentation set for the recommended semantics of COMPLETE.

8.5 CONTINUE Command

  Command:  (CONTINUE tid handle)
  Response: (CONTINUE tid)
  CONTINUE resumes a data transfer that was temporarily suspended due
  to an asynchronous error.  Each asynchronous error description has an
  optional argument of RESTARTABLE, indicating whether it makes any
  sense to try to continue after this particular error occurred.
  CONTINUE tries to resume the data transfer if the error is
  potentially recoverable, according to the RESTARTABLE argument in the
  asynchronous error description.  For a discussion of asynchronous
  errors:  See the section "NFILE Errors and Notifications", section
  10.
  handle is a required string-type argument that refers to the handle
  of the data channel that received an asynchronous error.  That data
  channel could have been in use for a data stream or direct access
  transfer.  handle cannot be a direct file identifier.
  If the asynchronous error description does not contain the
  RESTARTABLE argument, and the user issues the CONTINUE command
  anyway, the server gives a command error response.



Greenberg & Keene [Page 20]

RFC 1037 NFILE - A File Access Protocol December 1987


8.6 CREATE-DIRECTORY Command

  Command:  (CREATE-DIRECTORY tid pathname property-pairs)
  Response: (CREATE-DIRECTORY tid dir-truename)
  CREATE-DIRECTORY creates a directory on the remote file system.  The
  required pathname argument is a string identifying the pathname of
  the directory to be created.  The return value dir-truename is the
  pathname of the directory that was successfully created.  Both of
  these pathnames are directory pathnames:  See the section "Syntax of
  File and Directory Pathname Arguments", section 7.4.
  property-pairs is a keyword/value list of properties that further
  define the attributes of the directory to be created.  The allowable
  keywords and associated values are operating system dependent;
  typically they indicate arguments to be given to the native primitive
  for creating directories.
  If property-pairs is supplied as the empty token list, default access
  and creation attributes apply and should be assured by the server.
  See the section "Format of NFILE File Property/Value Pairs", section
  7.5.

8.7 CREATE-LINK Command

  Command:  (CREATE-LINK tid pathname target-pathname properties)
  Response: (CREATE-LINK tid link-truename)
  CREATE-LINK creates a link on the remote file system.
  pathname is the pathname of the link to be created; target-pathname
  is the place in the file system to which the link points.  Both are
  required arguments.  The return value link-truename names the
  resulting link.
  If a server on a file system that does not support links receives the
  CREATE-LINK command, it sends a command error response.
  The arguments pathname and target-pathname, and the return value
  link-truename, are all strings in the full pathname syntax of the
  server host.  See the section "Syntax of File and Directory Pathname
  Arguments", section 7.4.
  The required properties argument is a token list of keyword/value
  pairs. These properties and their values specify certain attributes
  to be given to the link.  The allowable keywords and associated


Greenberg & Keene [Page 21]

RFC 1037 NFILE - A File Access Protocol December 1987


  values are operating system dependent; typically they indicate
  arguments to be given to the native primitive for creating links.
  If no property pairs are given in the command, the server should
  apply a reasonable default set of attributes to the link.  See the
  section "Format of NFILE File Property/Value Pairs", section 7.5.

8.8 DATA-CONNECTION Command

  Command:  (DATA-CONNECTION tid new-input-handle new-output-handle)
  Response: (DATA-CONNECTION tid connection-identifier)
  DATA-CONNECTION enablesthe user side to initiate the establishment of
  a new data connection.  The user side supplies two required string
  arguments, new-input-handle and  new-output-handle.  These arguments
  are used by subsequent commands to reference the two data channels
  that constitute the data connection now being created.  new-input-
  handle describes the server-to-user data channel, and new-output-
  handle describes the user-to-server channel.  new-input-handle and
  new-output-handle cannot refer to any data channels already in use.
  Upon receiving the DATA-CONNECTION command, the server arranges for a
  logical port (called socket or contact name on some networks) to be
  made available on the foreign host machine.  When the server has made
  that port available, it must inform the user of its identity.  The
  server relays that information in the command response, in the
  required connection-identifier, a string.  The server then listens on
  the port named by connection-identifier, and waits for the user side
  to connect to it.
  Upon receiving the success command response, the user side supplies
  the connection-identifier to the local network implementation, in
  order to connect to the specified port.  The data connection is not
  fully established until the user side connects successfully to that
  port.  This command is unusual in that the successful command
  response does not signify the completion of the command; it indicates
  only that the server has fulfilled its responsibility in the process
  of establishing a data connection.







Greenberg & Keene [Page 22]

RFC 1037 NFILE - A File Access Protocol December 1987


  The connection-identifier informs the user of the correct identity of
  the logical port that the server has provided.  NFILE expects the
  connection-identifier to be a string.  For TCP this string is the
  port number represented in decimal.  For Chaosnet, this string is the
  contact name.  The connection-identifier is used only once; in all
  subsequent NFILE commands that need to reference either of the data
  channels that constitute this data connection, the new-input-handle
  and new-output-handle are used.
  For background information:  See the section "NFILE Control and Data
  Connections", section 4.

8.9 DELETE Command

  Command:  (DELETE tid handle pathname)
  Response: (DELETE tid)
  DELETE deletes a file on the remote file system.
  Either a handle or a pathname must be supplied, but not both.  If
  given, the handle must be a data channel handle for a data stream
  opening, or a direct file identifier for a direct access opening.
  pathname is a string in the full pathname syntax of the server host.
  See the section "Syntax of File and Directory Pathname Arguments",
  section 7.4.
  With a pathname supplied, the DELETE command causes the specified
  file to be deleted.  DELETE has different results depending on the
  operating system involved.  That is, DELETE causes soft deletion on
  TOPS-20 and LMFS, and hard deletion on UNIX and Multics.  If an
  attempt is made to delete a delete-through link on a Symbolics LMFS,
  its target is deleted instead.
  If the handle argument is supplied to DELETE, the server deletes the
  open file bound to the data channel specified by handle at close
  time.  This is true in both the output and input cases.

8.10 DIRECT-OUTPUT Command

  Command:  (DIRECT-OUTPUT tid direct-handle output-handle)
  Response: (DIRECT-OUTPUT tid)
  DIRECT-OUTPUT starts and stops output data flow for a direct access
  file opening.  DIRECT-OUTPUT explicitly controls binding and
  unbinding of an output data channel to a direct access opening.



Greenberg & Keene [Page 23]

RFC 1037 NFILE - A File Access Protocol December 1987


  direct-handle is a required argument, and output-handle is optional.
  If supplied, output-handle is a request to bind an output data
  channel (indicated by output-handle) to the direct access opening
  designated by the direct-handle.  The specified output data channel
  must be free.  The server binds the data channel and begins accepting
  data from that connection and writing it to the opening.
  If the output-handle is omitted, this is a request to unbind the
  channel and terminate the active output transfer.

8.11 DIRECTORY Command

  Command:  (DIRECTORY tid input-handle pathname control-keywords
             properties)
  Response: (DIRECTORY tid)
  DIRECTORY returns a directory listing including the identities and
  attributes for logically related groups of files, directories, and
  links.  If the command is successful, a single token list containing
  the requested information is sent over the data channel specified by
  input-handle, and the data channel is then implicitly freed by both
  sides <2>.  For details on the format of the token list:  See the
  section "NFILE DIRECTORY Data Format", section 8.11.1.
  pathname specifies the files that are to be described; it is a string
  in the full pathname syntax of the server host.  See the section
  "Syntax of File and Directory Pathname Arguments", section 7.4.
  The pathname generally contains wildcard characters, in operating-
  system-specific format, describing potential file name matches.  Most
  operating systems provide a facility that accepts such a pathname and
  returns information about all files matching this pathname.  Some
  operating systems allow wildcard (potential multiple) matches in the
  directory or device portions of the pathname; other operating systems
  do not.  There is no clear contract at this time about what is
  expected of servers on systems that do not allow wildcard matches (or
  some kinds of wild card matches), when presented with a wildcard.
  properties is a token list of keywords that are the names of
  properties.  If properties is omitted or supplied as the empty token
  list, the server sends along all properties.  If any properties are
  supplied, the user is requesting the server to send only those
  properties.




Greenberg & Keene [Page 24]

RFC 1037 NFILE - A File Access Protocol December 1987


  control-keywords ARGUMENT TO DIRECTORY
  control-keywords is a token list of keywords.  The control-keywords
  affect the way the DIRECTORY command works on the server machine.
  Although some of the options below request the server to limit (by
  some filter) the data to be returned, it is never an error if the
  server returns more information than is requested.
  The following keywords are recognized:
  DELETED
  Includes soft-deleted files in the directory list.  Without this
  option, they must not be included. Such files have the DELETED
  property indicated as true" among their properties.  DELETED is
  ignored on systems that do not support soft deletion.
  DIRECTORIES-ONLY
  This option changes the semantics of DIRECTORY fairly drastically.
  Normally, the server returns information about all files,
  directories, and links whose pathnames match the supplied pathname.
  This means that for each file, directory, or link to be listed, its
  directory name must match the potentially wildcarded) directory name
  in the supplied pathname, its file name must match the file name in
  the supplied pathname, and so on.
  When DIRECTORIES-ONLY is supplied, the server is to list only
  directories, not whose pathnames match the supplied pathname, but
  whose pathnames expressed as directory pathnames match the
  (potentially wildcarded) directory portion of the supplied pathname.
  The description of the PROBE-DIRECTORY keyword that can be supplied
  as the direction argument of the OPEN command discusses this:  See
  the section "OPEN Command", section 8.20.
  It is not yet established what servers on hosts that do not support
  this type of action natively are to do when presented with
  DIRECTORIES-ONLY and a pathname with a wildcard directory component.
  FAST Speeds up the operation and data transmission by not listing any
  properties at all for the files concerned; that is, only the
  truenames are returned.





Greenberg & Keene [Page 25]

RFC 1037 NFILE - A File Access Protocol December 1987


  NO-EXTRA-INFO
  Specifies that the server is to suppress listing those properties
  that are generally more difficult or expensive to obtain.  This
  typically eliminates listing of directory-specific properties such as
  information about default generation counts and expunge dates.
  SORTED
  This causes the directory listing to be sorted.  The sorting is done
  alphabetically by directory, then by file name, then file type, then
  file version (by increasing version number).

8.11.1 NFILE DIRECTORY Data Format

  If the NFILE DIRECTORY command completes successfully, a single token
  list containing the requested directory information is sent on the
  data channel specified by the input-handle argument in the DIRECTORY
  command.  This section describes the format of that single token
  list, and gives further detail on the properties argument to
  DIRECTORY.
  The token list is a top-level token list, so it is delimited by TOP-
  LEVEL-LIST-BEGIN and TOP-LEVEL-LIST-END.  The top-level token list
  contains embedded token lists.  The first embedded token list
  contains the empty token list followed by property/value pairs
  describing property information of the file system as a whole rather
  than of a specific file.  NFILE requires one property of the file
  system to be present: DISK-SPACE-DESCRIPTION is a string describing
  the amount of free file space available on the system.  The following
  embedded token lists contain the pathname of a file, followed by
  property/value pairs describing the properties of that file.
  The following example shows the format of the top-level token list
  returned by DIRECTORY, for two files.  It is expected that the server
  return several property/value pairs for each file; the number of
  pairs returned is not constrained.  In this example, two
  property/value pairs are returned for the file system, two pairs are
  returned for the first file, and only one pair is returned for the
  second file.
            TOP-LEVEL-LIST-BEGIN
            LIST-BEGIN       - first embedded token list starts
            LIST-BEGIN       - an empty embedded token list starts
            LIST-END         - the empty embedded token list ends
            prop1 value1     - property/value pairs of file system
            prop2 value2
            LIST-END


Greenberg & Keene [Page 26]

RFC 1037 NFILE - A File Access Protocol December 1987


            LIST-BEGIN
            pathname1        - pathname of the first file
            prop1 value1     - property/value pairs of first file
            prop2 value2
            LIST-END
            LIST-BEGIN
            pathname2        - pathname of the second file
            prop1 value1     - property/value pairs of second file
            LIST-END
            TOP-LEVEL-LIST-END
  The following example is designed to illustrate the structure of the
  top-level token list by depicting TOP-LEVEL-LIST-BEGIN and TOP-
  LEVEL-LIST-END by parentheses and LIST-BEGIN and LIST-END by squarbe
  rackets.  respectively. The indentation, blank spaces, and newlines
  in the example are not part of the token list, but are used here to
  make the structure of the token list clear.
                  ([   [ ]    prop1 value1 prop2 value2]
                   [pathname1 prop1 value1 prop2 value2]
                   [pathname2 prop1 value1])
  The pathname is a string in the full pathname syntax of the server
  host.  See the section "Syntax of File and Directory Pathname
  Arguments", section 7.4.
  For further information on file property/value pairs:  See the
  section "Format of NFILE File Property/Value Pairs", section 7.5.

8.12 DISABLE-CAPABILITIES Command

  Command:  (DISABLE-CAPABILITIES tid capability)
  Response: (DISABLE-CAPABILITIES tid cap-1 success-1
                 cap-2 success-2 cap-3 success-3 ...)
  DISABLE-CAPABILITIES causes an access capability to be disabled on
  the server machine.  capability is a string naming the capability to
  be disabled.  The meaning of the capability is dependent on the
  operating system.
  The return values cap-1, cap-2, and so on, are strings specifying
  names of capabilities.  If the capability named by cap-1 was
  successfully disabled, the corresponding success-1 is supplied as
  Boolean truth; otherwise it is the empty token list.




Greenberg & Keene [Page 27]

RFC 1037 NFILE - A File Access Protocol December 1987


  Although the user can specify only one capability to disable, it is
  conceivable that the result of disabling that particular capability
  is the disabling of other, related capabilities.  That is why the
  command response can contain information on more than one capability.

8.13 ENABLE-CAPABILITIES Command

  Command:  (ENABLE-CAPABILITIES tid capability password)}
  Response: (ENABLE-CAPABILITIES tid cap-1 success-1
             cap-2 success-2 cap-3 success-3 ...)
  ENABLE-CAPABILITIES causes an access capability to be enabled on the
  server machine.  The password argument is optional, and should be
  included only if it is needed to enable this particular capability.
  Both password and capability are strings.  The meaning of the
  capability is dependent on the operating system.
  The return values cap-1, cap-2 and so on, are strings specifying
  names of capabilities.  If the capability named by cap-1 was
  successfully enabled, the corresponding success-1 is supplied as
  Boolean truth; otherwise it is the empty token list.
  Although the user can specify only one capability to enable, it is
  conceivable that the result of enabling that particular capability is
  the enabling of other, related capabilities.  That is why the command
  response can contain information on more than one capability.

8.14 EXPUNGE Command

  Command:  (EXPUNGE tid directory-pathname)
  Response: (EXPUNGE tid server-storage-units-freed)
  EXPUNGE causes the directory specified by pathname to be expunged.
  Expunging means that any files that have been soft deleted are to be
  permanently removed.
  For file systems that do not support soft deletion, the command is to
  be ignored; a success command response is sent, but no action is
  performed on the file system.  In this case, the number-of-server-
  storage-units-freed return value should be omitted.
  directory-pathname is a required string argument in the directory
  pathname format; it must refer to a directory on the server file
  system, and not to a file.  See the section "Syntax of File and
  Directory Pathname Arguments", section 7.4.



Greenberg & Keene [Page 28]

RFC 1037 NFILE - A File Access Protocol December 1987


  The return value server-storage-units-freed is an integer specifying
  how many records, blocks, or whatever unit is used to measure file
  storage on the server host system, were recovered.  This return value
  should be omitted if the server does not know how many storage units
  were freed.
  The protocol does not define whether directory-pathname is really a
  pathname as directory or a wildcard pathname of files to be expunged.
  The protocol does not define whether or not wildcards are permitted,
  or required to be supported, in the directory portion of the pathname
  (representing an implicit request to expunge many directories).

8.15 FILEPOS Command

  Command:  (FILEPOS tid handle position resync-uid)
  Response: (FILEPOS tid)
  FILEPOS sets the file access pointer to a given position, relative to
  the beginning of the file.  FILEPOS is used to indicate the position
  of the next byte of data to be transferred.
  The handle indicates the file to be affected.  handle must be a data
  channel handle for a data stream opening, or a direct file identifier
  for a direct access opening.  Both handle and position are required
  arguments.
  position is an integer indicating to which point in the file the file
  access pointer is to be reset.  position is either a byte number
  according to the current byte size being used, or characters for
  character openings.  Position zero is the beginning of the file.  If
  this is a character opening, position is measured in server units,
  not in NFILE character set units.
  If the FILEPOS command is given on an input data channel (that is, a
  data channel currently sending data from server to user), the
  affected data channel must be resynchronized after the FILEPOS is
  accomplished, in order to identify the start of the new data.  The
  resync-uid is a unique identifier associated with the
  resynchronization of the data channel; it is unique with respect to
  this dialogue.  resync-uid must be supplied if handle is an input
  handle, but it is not supplied otherwise.  For more information on
  the resynchronization procedure:  See the section "NFILE Data
  Connection Resynchronization", section 9.2.
  In the output case, the user must somehow indicate to the server, on
  the output data channel, when there is no more data.  The user side
  sends the keyword token EOF to do so.  Upon receiving that control


Greenberg & Keene [Page 29]

RFC 1037 NFILE - A File Access Protocol December 1987


  token, the server is required to position the file pointer according
  to the position given.  When the new file position is established,
  the server resumes accepting data at the new file position.
  In most cases, using the direct access mode of transfer is more
  convenient and efficient than repeated use of FILEPOS with a data
  stream opening.
  There are problems inherent in trying to set a file position of a
  character-oriented file on a foreign host, if one machine is a
  Symbolics computer and the other is not.  For example, character set
  translation must take place.  See the section "NFILE Character Set",
  section 6.  Because of these difficulties, FILEPOS might not be
  supported in the future on character files.  FILEPOS is not
  problematic for binary files.

8.15.1 Implementation Hint for FILEPOS Command

  The server processing of this command (by the control connection
  handler) must not attempt to wait for the resynchronization procedure
  to complete.  It is possible that the user could abort between
  sending the FILEPOS command and reading for the mark and
  resynchronization identifier.  That scenario could leave the sender
  of the resynchronization identifier, on the server side, blocked for
  output indefinitely.
  Only two commands received on the control connection can break the
  data channel out of the blocked state described above:  CLOSE with
  abort-p supplied as Boolean truth, and RESYNCHRONIZE-DATA-CHANNEL.
  Therefore, the control connection must not wait for the data channel
  to finish performing the resynchronization procedure.  This wait
  should instead be performed by the process managing the data channel.

8.16 FINISH Command

  Command:  (FINISH tid handle)
  Response: (FINISH tid truename binary-p other-properties)
  FINISH closes a file and reopens it immediately with the file
  position pointer saved, thus leaving it open for further I/O.  If
  possible, the implementation should do the closing and opening in an
  indivisible operation, such that no other process can get access to
  the file.




Greenberg & Keene [Page 30]

RFC 1037 NFILE - A File Access Protocol December 1987


  The arguments, results, and their meaning are identical to those of
  the CLOSE command.  See the section "CLOSE Command", section 8.3.
  FINISH requires a handle, which has the same meaning as the handle of
  the CLOSE command.
  In the output case, for both direct mode and data stream mode of
  openings, the server writes out all buffers and sets the byte count
  of the file.  The user sends the keyword token EOF on the data
  channel, to indicate that the end of data has been reached.  The
  server leaves the file in such a state that if the system or server
  crashes anytime after the FINISH command has completed, it would
  later appear as though the file had been closed by this command.
  However, the file is not left in a closed state now; it is left open
  for further I/O operations.  FINISH is a reliability feature.
  FINISH is somewhat pointless in the input case, but valid.  The
  native Symbolics file system (LMFS) implements FINISH on an output
  file by an internal operation that effectively goes through the work
  of closing but leaves the file open for appending.
  ERRORS ON FINISH
  After writing every last bit sent by the user to disk, and before
  closing the file, the server checks the data channel specified by
  handle to see if an asynchronous error is outstanding on that
  channel.  That is, the server must determine whether it has sent an
  asynchronous error to the user, to which the user has not yet
  responded with a CONTINUE command.  If so, the server is unable to
  finish the file, and it must send a command error response response,
  indicating that an error is pending on the channel.  The appropriate
  three-letter error code is EPC.  See the section "NFILE Errors and
  Notifications", section 10.

8.17 HOME-DIRECTORY Command

  Command:  (HOME-DIRECTORY tid user)
  Response: (HOME-DIRECTORY tid directory-pathname)
  HOME-DIRECTORY returns the full pathname of the home directory on the
  server machine for the given user.
  user is a string that should be recognizable as a user's login name
  on the server operating system.  directory-pathname is a string in
  the directory pathname format.  See the section "Syntax of File and
  Directory Pathname Arguments", section 7.4.



Greenberg & Keene [Page 31]

RFC 1037 NFILE - A File Access Protocol December 1987


8.18 LOGIN Command

  Command:  (LOGIN tid user password FILE-SYSTEM USER-VERSION)
  Response: (LOGIN tid keyword/value-pairs)
  LOGIN logs the given user in to the server machine, using the
  password if necessary.  Both user and password are string arguments;
  user is required, password is optional.  An omitted password is valid
  if the host allows the specified user to log in without a password.
  Depending on the operating system and server, it might be necessary
  to log in to run a program (in this case the NFILE server program) on
  the host.  LOGIN establishes a user identity that is used by the
  operating system to establish the file author and determine file
  access rights during the current session.
  The server has the option to reject with an error any command except
  LOGIN if a successful LOGIN command has not been performed.  This is
  recommended.  Many operating systems perform the login function in a
  different process and/or environment than user programs.  The portion
  of the NFILE server running in the special login environment could
  conceivably be capable only of processing the LOGIN command; this is
  the reason for having the LOGIN command in NFILE.
  FILE-SYSTEM and USER-VERSION are optional keyword/value pairs.  The
  FILE-SYSTEM keyword/value pair selects the identity of the file
  system to which all following commands in this session are to be
  directed.  This argument has meaning only if the server host machine
  has multiple file systems, and the targeted file system is other than
  the default file system that a user would get by initiating a
  dialogue with that host.  The FILE-SYSTEM argument is an arbitrary
  token list.  If the server does not recognize it, the server gives an
  appropriate command error response.
  Currently, the only use of FILE-SYSTEM is for Symbolics servers to
  select one of the front-end processor hosts instead of the LMFS,
  which is the default.  In this case, the first element in the token
  list is the keyword FEP, and the second element in the token list is
  an integer, indicating the desired FEP disk unit number.  If the
  server discovers there is no such file system, the server gives a
  command error response including the three-letter code NFS, meaning
  "no file system".  See the section "NFILE Errors and Notifications",
  section 10.





Greenberg & Keene [Page 32]

RFC 1037 NFILE - A File Access Protocol December 1987


  The user tells the server what version of NFILE it is running by
  including the optional USER-VERSION keyword/value pair.  The value
  associated with USER-VERSION can be a string, an integer, or a token
  list.  This document describes NFILE user version 2 and server
  version 2.
  Upon receiving the representation of the user version, the server can
  either adjust certain parameters to handle this particular version,
  or simply ignore the user version altogether.  Currently, the only
  released versions of NFILE are user version 2 and server version 2.
  LOGIN RETURN VALUES:  keyword/value-pairs
  The keyword/value-pairs is a token list composed of keywords followed
  by their values.  The server includes any or all of the following
  keywords and their values; they are all optional.  The following
  keywords are recognized:
  NAME
  The value associated with NAME is a string specifying the user
  identity, in the server host's terms.
  PERSONAL-NAME
  The value associated with PERSONAL-NAME is a string representing the
  user's personal name, last name first.  For example:  "McGillicuddy,
  Aloysius X.".
  HOMEDIR-PATHNAME
  The value associated with HOMEDIR-PATHNAME is a string in the
  pathname as directory format, indicating the home directory of the
  user.  See the section "Syntax of File and Directory Pathname
  Arguments", section 7.4.
  GROUP-AFFILIATION
  The value associated with GROUP-AFFILIATION is a string specifying
  the group to which the user belongs, when this concept is
  appropriate.
  SERVER-VERSION
  The value associated with SERVER-VERSION can be a string, an integer,
  or a token list.  The value is a representation of the version of the
  server is running.  Upon receiving the server version, the user can:
  adjust certain parameters to handle this particular version; accept


Greenberg & Keene [Page 33]

RFC 1037 NFILE - A File Access Protocol December 1987


  the version; or close the connection.  Currently, the only released
  versions of NFILE are user version 2 and server version 2.
  PROPERTY-INDEX-TABLE
  The value associated with PROPERTY-INDEX-TABLE is a token list of
  keywords.  This return value enables the server to inform the user
  which file properties are meaningful on its file system.  The
  keywords in PROPERTY-INDEX-TABLE can be used by the DIRECTORY command
  (a user request for information on file properties of a specified
  directory or directories).  The server can specify a certain property
  by giving an integer that is the index of that file property into the
  PROPERTY-INDEX-TABLE.  This reduces the volume of data sent during
  directory listings.  The first element in PROPERTY-INDEX-TABLE is
  indexed by the number 0.  See the section "DIRECTORY Command",
  section 8.11.

8.19 MULTIPLE-FILE-PLISTS Command

  Command:  (MULTIPLE-FILE-PLISTS tid input-handle paths
             characters properties)
  Response: (MULTIPLE-FILE-PLISTS tid)
  MULTIPLE-FILE-PLISTS returns file property information of one or more
  files.  The server sends the information in a data structure (the
  format is described later in this section) on the given input-handle.
  paths is an embedded token list composed of the pathnames in which
  the user is interested.  Each pathname in this list is a string in
  the full pathname syntax of the server host.  Unlike for the
  DIRECTORY command, wildcards are not allowed in these pathnames.  See
  the section "Syntax of File and Directory Pathname Arguments",
  section 7.4.
  characters is either Boolean truth (indicating that each file is a
  character file), the empty token list (each file is a binary file),
  or the keyword DEFAULT.  DEFAULT indicates that the server itself is
  to figure out whether a file is a character or binary file.  For more
  information on the meaning of the DEFAULT keyword:  See the section
  "OPEN Command", section 8.20.  The value of characters can influence
  some servers' idea of a file's length.
  properties is a token list of keywords indicating which properties
  the user wants returned.  The server is always free to return more
  properties than those requested in the properties argument.  If
  properties is supplied as the empty token list, the server should
  transmit all known properties on the files.



Greenberg & Keene [Page 34]

RFC 1037 NFILE - A File Access Protocol December 1987


  The server transmits as much of the requested information as possible
  on the given input-handle.  The information is contained in a top-
  level token list of elements.  Each element corresponds with a
  supplied pathname; the order of the original pathlist must be
  retained in the returned token list.  An element is an empty token
  list if the corresponding file or any of its containing directories
  does not exist.  The elements that correspond to successfully located
  files are lists composed of truename followed by any properties.
  properties are keyword/value pairs.  truename is a string in the full
  pathname syntax of the server host.
  The following example shows TOP-LEVEL-LIST-BEGIN and TOP-LEVEL-LIST-
  END as parentheses, and LIST-BEGIN and LIST-END with square brackets.
  For example, the user supplied a pathlist argument resembling:
                           [file1 file2 file3]
  The server could not locate file1 or file3, but did locate file2, and
  found the length and author of file2.  The top-level token list
  transmitted by the server is:
       ( [] [ truename-of-file2 LENGTH 381 AUTHOR williams ] [] )
  For further detail on how file properties and values are expressed:
  See the section "Format of NFILE File Property/Value Pairs", section
  7.5.

8.20 OPEN Command

  Command:  (OPEN tid handle pathname direction binary-p
               TEMPORARY RAW SUPER-IMAGE DELETED PRESERVE-DATES
               SUBMIT DIRECT-FILE-ID ESTIMATED-LENGTH BYTE-SIZE
               IF-EXISTS IF-DOES-NOT-EXIST)
  Response: (OPEN tid truename binary-p other-properties)
  OPEN opens a file for reading, writing, or direct access at the
  server host.  That means, in general, asking the host file system to
  access the file and obtaining a file number, pointer, or other
  quantity for subsequent rapid access to the file; this is called an
  "opening".  See the section "NFILE File Opening Modes", section 5.
  The OPEN command has the most complicated syntax of any NFILE
  command.  The OPEN command has required arguments, an optional
  argument, and many optional keyword/value pairs.  For details on the
  syntax of each of these parts of the OPEN command:  See the section
  "Conventions Used in This Document", section 7.


Greenberg & Keene [Page 35]

RFC 1037 NFILE - A File Access Protocol December 1987


  The following arguments are required:  pathname, direction, and
  binary-p.  handle is an optional argument, which must either be
  supplied or explicitly omitted by means of substituting in its place
  the empty token list.
  The OPEN command has many optional keyword/value pairs, which encode
  conceptual arguments to the server file system for the OPEN
  operation.  A detailed description of all the supported OPEN optional
  keywords is given below.
  The OPEN return values reflect information about the file opened,
  when the opening is successful.  In the case of a probe-type opening,
  this information is returned when the given file (or link, or
  directory) exists and is accessible, even though the file (or link,
  or directory) is not actually opened.  For detail on the OPEN return
  values: See the section "NFILE OPEN Response Return Values", section
  8.20.2.
  THE pathname OPEN ARGUMENT
  The pathname is a required argument specifying the file to be opened.
  pathname is a string in the full pathname syntax of the server host.
  See the section "Syntax of File and Directory Pathname Arguments",
  section 7.4.
  For some purposes (for example, when the OPEN argument direction is
  supplied as PROBE-DIRECTORY), only the directory specified by this
  pathname is utilized.  See the section "NFILE OPEN Optional
  Keyword/Value Pairs", section 8.20.1.
  THE handle OPEN ARGUMENT
  The handle argument of the OPEN command specifies a data channel to
  be used for the transfer.  Subsequent commands in this session use
  the same handle to specify this opening.  It is the user side's
  responsibility to ensure that handle refers to an existing and free
  data channel that does not require resynchronization before use.  A
  handle must be supplied, unless a probe-type opening is desired (that
  is, the direction is supplied as PROBE, PROBE-DIRECTORY, or PROBE-
  LINK) or a direct access opening is being requested (that is, a
  DIRECT-FILE-ID is supplied).  In those cases, the empty token list is
  supplied for handle.
  THE direction OPEN ARGUMENT
  The direction argument must be supplied as one of these keywords:
  INPUT, OUTPUT, IO, PROBE, PROBE-DIRECTORY, and PROBE-LINK.  The
  meanings of the direction keywords are as follows:


Greenberg & Keene [Page 36]

RFC 1037 NFILE - A File Access Protocol December 1987


  INPUT
     Specifies that the file is to be opened for input server-to-user
     transfer).  To request a direct access opening, supply a value for
     DIRECT-FILE-ID. If no DIRECT-FILE-ID is supplied, the opening is a
     data stream opening.
  OUTPUT
     Specifies that the file is to be opened for output user-to-server
     transfer).  To request a direct access opening, supply a value for
     DIRECT-FILE-ID. If no DIRECT-FILE-ID is supplied, the opening is a
     data stream opening.
  IO
     Specifies that interspersed input and output will be performed on
     the file.  This is only meaningful in direct access mode.  A
     DIRECT-FILE-ID must also be supplied.  See the section "NFILE OPEN
     Optional Keyword/Value Pairs", section 8.20.1.
  If direction is supplied as PROBE, PROBE-LINK, or PROBE-DIRECTORY,
  the opening is said to be a probe-type opening.  The DIRECT-FILE-ID
  option is meaningless and an error for probe-type openings.  The file
  handle must be supplied as an empty token list for probe-type
  openings.
  PROBE
     Specifies that the file is not to be opened at all, but simply
     checked for existence.  If the file does not exist or is not
     accessible, the error indications and actions are identical to
     those that would be given for an INPUT opening.  If the file does
     exist, the successful command response contains the same
     information as it would have if the file had been opened for
     INPUT.  If it is a link, the link is followed to its target.
  PROBE-LINK
     Like PROBE, with one difference.  PROBE-LINK specifies that if the
     pathname is found to refer to a link, that link is not to be
     followed, and information about the link itself is to be returned.





Greenberg & Keene [Page 37]

RFC 1037 NFILE - A File Access Protocol December 1987


  PROBE-DIRECTORY
     PROBE-DIRECTORY requests information about the directory
     designated by the pathname argument.  In the PROBE-DIRECTORY case,
     the pathname argument refers to the directory on which information
     is requested.  In all other cases, the pathname refers to a file
     to be opened.  If pathname contains a file name and file type,
     these parts of the pathname are ignored for PROBE-DIRECTORY
     openings as long as they are syntactically valid.
  THE binary-p OPEN ARGUMENT
  The value of binary-p affects the mode in which the server opens the
  file, as well as informing it whether or not character set
  translation must be performed.
  If binary-p is supplied as the empty token list, the opening is said
  to be a character opening.  The server performs character set
  translation between its native character set and the NFILE character
  set.  The data is transferred over the data connection one character
  per eight-bit byte.  See the section "NFILE Character Set", section
  6.
  If binary-p is supplied as Boolean truth, the opening is said to be a
  binary opening.  The user side supplies the byte size via the BYTE-
  SIZE option; if not supplied, the default byte size is 16 bits.  If
  byte size is less than 9, the file data is transferred byte by byte.
  If the byte size is 9 or greater, the server transfers each byte of
  the file as two eight-bit bytes, low-order first.
  binary-p can also be supplied as the keyword DEFAULT.  DEFAULT
  specifies that the server itself is to determine whether to transfer
  binary or character data.  DEFAULT is meaningful only for input
  openings; it is an error for OUTPUT, IO, or probe-type openings.  For
  file systems that maintain the innate binary or character nature of a
  file, the server simply asks the file system which case is in force
  for the file specified by pathname.
  When binary-p is supplied as DEFAULT, on file systems that do not
  maintain thisinformation, the server is required to perform a
  heuristic check for Symbolicsobject fileson the first two 16-bit
  bytes of the file.  If the file isdetermined to be aSymbolics object
  file, the server performs a BINARY openingwith BYTE-SIZE of16;
  otherwise, it performs a CHARACTER opening.




Greenberg & Keene [Page 38]

RFC 1037 NFILE - A File Access Protocol December 1987


  The details of the check are as follows: if the first 16-bit byte is
  the octal number170023 and the second 16-bit byte is any number
  between 0 and 77 octal(inclusive), the file is recognized as a
  Symbolics object file.  In any othercase, it is not.

8.20.1 NFILE OPEN Optional Keyword/Value Pairs

  The OPEN command has many optional keyword/value pairs that encode
  conceptual arguments to the file system for the OPEN operation.
  The following options are used often:
  BYTE-SIZE
     Must be followed by an integer between 1 and 16, inclusive, or the
     empty token list.  BYTE-SIZE is meaningful only for binary
     openings.  BYTE-SIZE can be ignored for probe-type openings.  It
     can be omitted entirely for character openings, but if supplied,
     must be followed by the empty token list.  If binary-p is supplied
     as DEFAULT, BYTE-SIZE can be omitted entirely, or followed by the
     empty token list.
     If a binary opening is requested and BYTE-SIZE is not supplied,
     the assumed value is 16 for output openings. For input binary
     openings, the default is the host file system's stored conception
     of the file's byte size (for those hosts that natively support
     byte size).  For file systems that do not natively support
     natively byte size, the default byte-size on binary input is 16.
     For file systems that maintain the innate byte-size of each file,
     the server should supply this number to the appropriate operating
     system interface that performs the semantics of opening the file.
     For other operating systems, a file written with a given byte size
     must produce the same bytes in the same order when read with that
     byte size.  In this case, the server or host operating system can
     choose any packing scheme that complies with this rule.
     Operating systems that do not support byte size must ensure that
     binary files written from user ends of the current protocol can be
     read back correctly.  However, the server can choose packing
     schemes that allow all bits of the server host's word to be
     accessed and concur with other packing schemes used by native host
     software.
     For example, Multics supports 36 bit words and 9 bit bytes.  A
     packing scheme appropriate for a Multics NFILE server is:



Greenberg & Keene [Page 39]

RFC 1037 NFILE - A File Access Protocol December 1987


              Byte Size                Packing Scheme
              7, 8, or 9 bits          four per 36-bit word
              10, 11, or 12 bits       three per 36-bit word
              13, 14, 15, or 16 bits   two per 36-bit word
     In the first packing scheme in the table, native Multics
     character-oriented software can access each logical byte
     sequentially.  In the last packing scheme, each Symbolics byte is
     in a halfword, easily accessible and visible in an octal
     representation.  To achieve maximum data transfer rate and access
     all bits of a Multics word, a byte size of 12 must be specified.
  DELETED
     If supplied as Boolean truth, DELETED specifies that deleted"
     files are to be treated as though they were not "deleted".
     DELETED is meaningful only for operating systems that support
     "soft deletion" and subsequent "undeletion" of files.  Other
     operating systems must ignore this option.  Normally, deleted
     files are not visible to the OPEN operation; this option makes
     them visible.
     DELETED can also be followed by the empty token list, which has
     the same effect as omitting the DELETED keyword/value pair
     entirely.  For output openings, DELETED is meaningless and an
     error if supplied.
  DIRECT-FILE-ID
     If supplied, the DIRECT-FILE-ID indicates that the opening is to
     be a direct access mode opening.  If not supplied, the opening is
     a data stream opening.  The value of DIRECT-FILE-ID is a string
     generated by the user, that has not been used as a DIRECT-FILE-ID
     in this dialogue, and does not designate any data channel.  The
     DIRECT-FILE-ID is a unique identifier for the direct access
     opening.  It is used for all operations that identify an opening
     rather than a data channel.  The DIRECT-FILE-ID is used to
     identify a direct access opening, just as a file handle is used to
     identify a data stream opening.  The PROPERTIES, CLOSE, and RENAME
     commands use the DIRECT-FILE-ID in this way.  There are only two
     NFILE commands applicable to direct access openings (ABORT and
     CONTINUE) that do not use the DIRECT-FILE-ID, but use a data
     channel handle instead.
  PRESERVE-DATES
     If supplied as Boolean truth, PRESERVE-DATES specifies that the


Greenberg & Keene [Page 40]

RFC 1037 NFILE - A File Access Protocol December 1987


     server is to attempt to prevent the operating system from updating
     the "reference date" or date-time used" of the file.  This is
     meaningful only for input openings, and is an error otherwise.
     The Symbolics operating system invokes this option for operations
     such as View File in the editor, where it wishes to assert that
     the user did not "read" the file, but just "looked at it".
     Servers on operating systems that do not support reference dates
     or users revising or suppressing update of the reference dates
     must ignore this option.
  ESTIMATED-LENGTH
     The value of ESTIMATED-LENGTH is an integer estimating the length
     of the file to be transferred. This option is meaningful and
     permitted only for output openings.  ESTIMATED-LENGTH enables the
     user end to suggest to the server's file system how long the file
     is going to be.  This can be useful for file systems that must
     preallocate files or file maps or that accrue performance benefits
     from knowing this information at nthe time the file is first
     opened.  This estimate, if supplied, is not required to be exact.
     It is ignored by servers to which it is not useful or interesting.
     The units of the estimate are characters for character openings,
     and bytes of the agreed-upon byte size for binary openings.  The
     character units should be server units, if possible, but since
     this is only an estimate, NFILE character units are acceptable.
     See the section "NFILE Character Set", section 6.
  IF-EXISTS
     Meaningful only for output openings, ignored otherwise, but not
     diagnosed as an error.  The value of IF-EXISTS is a keyword that
     specifies the action to Be taken if a file of the given name
     already exists.  The semantics of the values are derived from the
     Common Lisp specification and repeated here for completeness.  If
     the file does not already exist, the IF-EXISTS option and its
     value are ignored.
     If the user side does not give the IF-EXISTS option, The action to
     be taken if a file of the given name already exists depends on
     whether or not the file system supports file versions.  If it
     does, the default is ERROR (if an explicit version is given in the
     file pathname) or NEW-VERSION (if the version in the file pathname
     is the newest version).  For file systems not supporting versions,
     the default is SUPERSEDE.  These actions are described below.




Greenberg & Keene [Page 41]

RFC 1037 NFILE - A File Access Protocol December 1987


     IF-EXISTS provides the mechanism for overwriting or appending to
     files.  With the default setting of IF-EXISTS, new files are
     created by every output opening.
     Operating systems supporting soft deletion can take different
     actions if a "deleted" file already exists with the same name (and
     type and version, where appropriate) as a file to be created.  The
     Symbolics file system (LMFS) effectively uses SUPERSEDE, even if
     not asked to do so.  Other servers and file systems are urged to
     do similarly.  Recommended action is to not allow deleted files to
     prevent successful file creation (with specific version number)
     even if an IF-EXISTS option weaker than SUPERSEDE, RENAME, or
     RENAME-AND-DELETE is specified or implied.
     Here are the possible values and their meanings:
     ERROR
        Reports an error.
     NEW-VERSION
        Creates a new file with the same file name but with a larger
        version number.  This is the default when the version component
        of the filename is newest.  File systems without version
        numbers can implement this by effectively treating it as
        SUPERSEDE.
     RENAME
        Renames the existing file to some other name and then creates a
        new file with the specified name.  On most file systems, this
        renaming happens at the time of a successful close.
     RENAME-AND-DELETE
        Renames the existing file to some other name and then deletes
        it (but does not expunge it, on those systems that distinguish
        deletion from expunging).  Then it creates a new file with the
        specified name.  On most file systems, this renaming happens at
        the time of a successful close.
     OVERWRITE
        Output operations on the opening destructively modify the
        existing file.  New data replaces old data at the beginning of
        the file; however, the file is not truncated to length zero
        upon opening.


Greenberg & Keene [Page 42]

RFC 1037 NFILE - A File Access Protocol December 1987


     TRUNCATE
        Output operations on the opening destructively modify the
        existing file.  The file pointer is initially positioned at the
        beginning of the file; at that time, TRUNCATE truncates the
        file to length zero and frees disk storage occupied by it.
     APPEND
        Output operations on the opening destructively modify the
        existing file.  New data is placed at the current end of the
        file.
     SUPERSEDE
        Supersedes the existing file.  This means that the old file is
        removed or deleted and expunged.  The new file takes its place.
        If possible, the file system does not destroy the old file
        until the new file is closed, against the possibility that the
        file will be close-aborted.  This differs from NEW-VERSION in
        that SUPERSEDE creates a new file with the same name as the old
        one, rather than a file name with a higher version number.
        There are currently no standards on what a server can do if it
        cannot implement some of these actions.
  IF-DOES-NOT-EXIST
     Meaningful for input openings, never meaningful for probe-type
     openings, and sometimes meaningful for output openings.  IF-DOES-
     NOT-EXIST takes a value token, which specifies the action to be
     taken if the file does not already exist.  Like IF-EXISTS, it is a
     derivative of Common Lisp.  The default is as follows: If this is
     a probe-type opening or read opening, or if the IF-EXISTS option
     is specified as OVERWRITE, TRUNCATE, or APPEND, the default is
     ERROR.  Otherwise, the default is CREATE.
     These are the values for IF-DOES-NOT-EXIST:
     ERROR
        Reports an error.
     CREATE
        Creates an empty file with the specified name and then proceeds
        as if it already existed.



Greenberg & Keene [Page 43]

RFC 1037 NFILE - A File Access Protocol December 1987


  The following optional keyword/value pairs are rarely used, if ever:
  RAW
     If supplied as Boolean truth, RAW specifies that character set
     translation is not to be performed, but that characters are to be
     transferred intact, without inspection.  This option is meaningful
     only for character openings; it is an error otherwise.  It is also
     an error to supply RAW as Boolean truth for probe-type openings.
     RAW can also be followed by the empty token list, which has the
     same effect as if the RAW keyword/value pair were omitted
     entirely.  See the section "RAW Translation Mode", Appendix B.
  SUPER-IMAGE
     If supplied as Boolean truth, SUPER-IMAGE specifies that Rubout
     quoting is not to be performed.  This operation is meaningful only
     for character openings; it is an error otherwise.  It is also an
     error for probe-type openings.  SUPER-IMAGE can also be followed
     by the empty token list, which has the same effect as if the
     SUPER-IMAGE keyword/value pair were omitted entirely.
     SUPER-IMAGE mode causes the server to read or write character
     files where ASCII Rubout characters are a significant part of the
     file content, not where they are an escape for this protocol.
     However, other translations must still be performed:  See the
     section SUPER-IMAGE Translation Mode", Appendix C.
  TEMPORARY
     Used by the TOPS-20 server only.  TEMPORARY says to use GJ%TMP in
     the GTJFN.  This is useful mainly when writing files, and
     indicates that the foreign operating system is to treat the file
     as temporary.  See TOPS-20 documentation for more about the
     implications of this option.  Other servers can ignore it.  This
     option is meaningless and an error for input or probe-type
     openings.  TEMPORARY can also be followed by the empty token list,
     which has the same effect as if the TEMPORARY keyword/value pair
     were omitted entirely.
  SUBMIT
     SUBMIT is meaningful for output only.  If supplied as Boolean
     truth, SUBMIT causes the server to submit the contents of the file
     being written to the operating system as a job, after the file is
     closed.  VMS is an example of an operating system that could
     conveniently support SUBMIT.  SUBMIT can also be followed by the
     empty token list, which has the same effect as if the SUBMIT


Greenberg & Keene [Page 44]

RFC 1037 NFILE - A File Access Protocol December 1987


     keyword/value pair were omitted entirely.  Servers that do not
     implement this option should give an error response if requested
     to submit a file to the operating system.

8.20.2 NFILE OPEN Response Return Values

  The results of a successful OPEN operation are reported in the
  command response.  Here is the specification of the OPEN response
  format:
  Response Format:
     (OPEN tid truename binary-p other-properties)
  The return values for OPEN and CLOSE are syntactically identical, but
  the values can change in the time interval between open and close.
  truename is a string representing the pathname of the file in the
  full pathname syntax of the server host.  It should be determined by
  the server once it has opened the file, via some request to its
  operating system.  The request can be of the form:  "What file
  corresponds to this JFN, file number, pointer, etc.?"  If the
  operating system supports version numbers, this string always
  contains an explicit version number.  It always contains a directory
  name, a file name, and so on.
  Some operating systems might not know the truename of an output file
  until it is closed.  It is permissible not to supply an explicit
  version number in the pathname in the OPEN response in this specific
  case.  On these systems the truename when the file is opened is
  different than the truename after it has been closed.
  The return value binary-p indicates whether the opening is a binary
  or character opening.  For binary openings, binary-p is supplied as
  Boolean truth; for character openings it is the empty token list.
  other-properties is a list of keyword/value pairs.  other-properties
  must contain CREATION-DATE and LENGTH.  AUTHOR should be included if
  the server operating system has a convenient mechanism for
  determining the author of the sfile.  The other properties described
  here can be included if desired.
  AUTHOR
  The value of AUTHOR is a string representing the name of the author
  of the file.  This is some kind of user identifier, whose format is
  system-specific.  As with CREATION-DATE (see below), AUTHOR is
  supposed to represent the logical determinor of the current data


Greenberg & Keene [Page 45]

RFC 1037 NFILE - A File Access Protocol December 1987


  content of the file, not necessarily the agency that actually created
  the file.
  BYTE-SIZE
  The byte-size agreed upon via the rules described for the BYTE-SIZE
  option.  The value of BYTE-SIZE is an integer.  For details on the
  ramifications of BYTE-SIZE:  See the section "NFILE OPEN Optional
  Keyword/Value Pairs", section 8.20.1.  This parameter is only
  meaningful for BINARY openings.  However, if FILEPOS is returned in
  the other-properties list, BYTE-SIZE should also be included, even
  for character openings.
  CREATION-DATE
  The creation date of the file.  The date is expressed in Universal
  Time format, which measures a time as the number of seconds since
  January 1, 1900, at midnight GMT.  Creation date does not necessarily
  mean the time the file system created the directory entry or records
  of the file.  For systems that support modification or appending to
  files, it is usually the modification date of the file.  Creation
  date can mean the date that the bit count or byte count of the file
  was set by an application program.
  Some types of file systems support a user-settable quantity
  (CREATION-DATE) which the user can set to an arbitrary time, to
  indicate that the contents of this file were written a long time ago
  by someone else on another computer.  The default value of this
  quantity, if the user has not set it, is the time someone last
  modified the information in the file.  This quantity, in the OPEN
  response for an output file, is disregarded by the user side, but
  nevertheless must be present.
  The Symbolics computer system software uses this quantity as a unique
  identifier of file contents, for a given file name, type, and
  version, to prove that a file has not changed since it last recorded
  this quantity for a file.
  FILEPOS
  An integer giving the position of the logical file pointer, in
  characters or bytes as appropriate for the type of opening.  This is
  always zero for an input opening and for an output opening creating a
  new file.  For an output opening appending to an existing file,
  FILEPOS is the number of characters or bytes, as appropriate,
  currently in the file.  This number, for character openings, is
  measured in server units: See the section "NFILE Character Set",
  section 6.


Greenberg & Keene [Page 46]

RFC 1037 NFILE - A File Access Protocol December 1987


  LENGTH
  An integer reporting the length of the file, in characters for
  character openings and in bytes of the agreed-upon size for binary
  openings.  LENGTH should be reported as zero for output openings,
  even if appending to an existing file.  The server usually only knows
  the length for a character opening in server units; thus, it reports
  length in server units.

8.21 PROPERTIES Command

  Command:  (PROPERTIES tid handle pathname control-keywords
  properties)
  Response: (PROPERTIES tid property-element settable-properties)
  PROPERTIES requests the property information about one file.  The
  file is identified by the pathname argument or the handle argument,
  but not both.  If pathname is supplied, it is a string in the full
  pathname syntax of the server host.  See the section "Syntax of File
  and Directory Pathname Arguments", section 7.4.
  If handle is supplied, its value is a string identifying an opening,
  which implicitly identifies a file.  For direct access mode openings,
  handle must be a direct file identifier.
  control-keywords is reserved in the current design.  However, it is a
  required argument, and must be supplied as the empty token list.  Its
  presence in the NFILE specification allows for future expansion.  In
  the future the value of control-keywords might affect the listing
  mode.
  properties is a token list of keywords indicating the properties the
  user wants returned.  (In command arguments, properties cannot be
  specified with integers, such as indices into the Property Index
  Table).  For a list of keywords associated with file properties:  See
  the section "Format of NFILE File Property/Value Pairs", section 7.5.
  The server is always free to return more properties than those
  requested in the properties argument.  If properties is supplied as
  the empty token list, the server transmits all known properties of
  the file.





Greenberg & Keene [Page 47]

RFC 1037 NFILE - A File Access Protocol December 1987


  PROPERTIES COMMAND RESPONSE
  The server returns the property information for the given file in the
  command response.  The PROPERTIES command does not use any data
  channels.  If the specified file does not exist or is not accessible,
  the server signals an error and includes an appropriate three-letter
  error code in the command error response.  See the section "NFILE
  Errors and Notifications", section 10.
  The return value property-element is a token list.  The first element
  in that token list is the pathname of the file, in the full pathname
  syntax of the server host.  The following elements of the property-
  element token list are property/value pairs.  The server is expected
  to return several property/value pairs; the number of pairs is not
  constrained.  For further details on file properties and their
  associated values:  See the section "Format of NFILE File
  Property/Value Pairs", section 7.5.
  The return value settable-properties is a token list of keywords.
  The number of keywords is not constrained.  (Note that integers
  cannot be used in settable-properties to indicate the file property;
  keywords are to be used instead.)  Each keyword supplied in
  settable-properties identifies a property considered settable by the
  server.  The server is implicitly guaranteeing a mechanism for
  changing the properties reported as settable.  The user can change
  any of the settable properties for this file by using the CHANGE-
  PROPERTIES command.  See the section "CHANGE-PROPERTIES Command",
  section 8.2.
  The following example shows the format of the PROPERTIES command
  response.  Remember that the number of property/value pairs and
  keywords is not constrained; this example has two property/value
  pairs and three settable-properties keywords returned:










Greenberg & Keene [Page 48]

RFC 1037 NFILE - A File Access Protocol December 1987


            TOP-LEVEL-LIST-BEGIN
            PROPERTIES         - name of the command
            tid                - transaction identifier
            LIST-BEGIN
            pathname of file
            prop1 value1       - file's property/value pairs
            prop2 value2
            LIST-END
            LIST-BEGIN
            keyword-1          - file's settable properties
            keyword-2
            keyword-3
            LIST-END
            TOP-LEVEL-LIST-END
  The following example is designed to better show the structure of the
  top-level token list by depicting TOP-LEVEL-LIST-BEGIN and TOP-
  LEVEL-LIST-END by parentheses and LIST-BEGIN and LIST-END by square
  brackets.  The indentation and newlines in the example are not part
  of the token list, but are used here to make the structure of the
  token list clear.
            (PROPERTIES tid [ pathname prop1 value1 prop2 value2 ...]
                            [ keyword1 keyword2 keyword3 ... ]

8.22 READ Command

  Command: (READ tid direct-file-id input-handle count FILEPOS)
  Response: (READ tid)
  READ requests input data flow for direct access openings.  The
  direct-file-id is the same as the DIRECT-FILE-ID argument that was
  given when opening the file; it designates the opening from which the
  characters or bytes are to be transferred.  The input-handle
  specifies which data channel should be used for the transfer of data
  from server to user.  The data channel should have been already
  established, cannot have been disestablished, and must not currently
  be in use.
  count is an integer specifying how many bytes (or NFILE characters,
  as appropriate) to read.  count can be supplied as the empty token
  list, meaning read to the end of the file.  If the user specifies the
  empty token list or a count greater than the number of bytes
  remaining in the file, the server sends the keyword EOF to mark the
  end of the file.



Greenberg & Keene [Page 49]

RFC 1037 NFILE - A File Access Protocol December 1987


  FILEPOS is an optional keyword/value pair.  If the keyword FILEPOS is
  supplied, it must be followed by an integer.  Before data is
  transferred, the opening is positioned to the point specified by the
  value of FILEPOS.  The position of the point is measured in server
  units for character openings; for binary openings it is measured in
  binary bytes.  See the section "FILEPOS NFILE Command".
  Upon receiving the READ command, the server binds the data channel to
  the opening and immediately begins transferring data.  The server
  stops when all data has been transferred.  After the server sends the
  last requested byte, it unbinds the data channel, freeing it for
  other use.  When the user side has processed the last byte, the user
  side assumes that the data channel can now be reused for another data
  transfer.

8.23 RENAME Command

  Command:  (RENAME tid handle pathname to-pathname)
  Response: (RENAME tid from-pathname to-pathname)
  RENAME requests the server to give a file a new name.  This is
  NFILE's interface to the system's native rename operation, with all
  of its system-specific semantics and constraints.
  Either a handle or a pathname (but not both) specifies the file that
  is to receive a new name.  The argument to-pathname designates that
  new name.  The return value from-pathname gives the full original
  name of the file, and to-pathname gives the full new name of the
  file.  For systems that support version numbers, the return values
  can differ in version number from the values of the arguments given
  to RENAME.
  The arguments pathname and to-pathname and the return values from-
  pathname and to-pathname are strings in the full pathname syntax of
  the server host.  See the section "Syntax of File and Directory
  Pathname Arguments", section 7.4.
  If the file to be renamed is specified by a pathname, the file should
  be renamed immediately.  If the file is specified by handle, it is
  acceptable to wait until close-time to rename the file.
  Some operating systems can rename only within a directory.
  Nevertheless, the to-pathname of the RENAME must be fully specified;
  the server on these systems must check for and reject an attempted
  cross-directory rename.



Greenberg & Keene [Page 50]

RFC 1037 NFILE - A File Access Protocol December 1987


8.24 RESYNCHRONIZE-DATA-CHANNEL Command

  The command and response format for this command varies, depending on
  whether the handle argument indicates an input or output data
  channel.
  For an Input Handle:
  Command:  (RESYNCHRONIZE-DATA-CHANNEL tid handle)
  Response: (RESYNCHRONIZE-DATA-CHANNEL tid identifier)
  For an Output Handle:
  Command:  (RESYNCHRONIZE-DATA-CHANNEL tid handle identifier)
  Response: (RESYNCHRONIZE-DATA-CHANNEL tid)
  RESYNCHRONIZE-DATA-CHANNEL begins a prescribed procedure between user
  and server over the unsafe data channel specified by handle.  The
  resynchronization procedure clears the data channel of any unwanted
  data, and restores the data channel to a safe state, ready to
  transfer data again.
  All arguments to RESYNCHRONIZE-DATA-CHANNEL are required.
  For a detailed description of how the user and server coordinate the
  resynchronization of data channels:  See the section "NFILE Data
  Connection Resynchronization", section 9.2.

8.24.1 Implementation Hints for RESYNCHRONIZE-DATA-CHANNEL Command

  In general, both the user and server should should be implemented
  with the knowledge that a transmission can be aborted.  That is, the
  receiving side must be careful not to act upon a transmission (that
  is, to perform any action or side effect) until the transmission has
  been successfully received in entirety.  This protects the user
  program from the possibility that an abort can occur after a
  transmission has been partially sent.







Greenberg & Keene [Page 51]

RFC 1037 NFILE - A File Access Protocol December 1987


  RESYNCHRONIZING AN OUTPUT DATA CHANNEL
  The server will probably want to dispatch the looping and reading to
  the logical data process.  Looping reading for the resynchronization
  identifier in the control connection handler is not a viable option.
  If the user side fails to send the resynchronization identifier (for
  example, due to a user abort) the control connection handler can
  never be broken out of this loop.
  Should the user side send the control connection handler command
  first, or send the marks and identifiers first?
  Sending the marks first is problematic, because the data channel at
  the other end might not be reading them (for it has not yet been so
  instructed by the control connection handler).  The user might then
  become blocked for output, thus prohibiting sending of the
  RESYNCHRONIZE-DATA-CHANNEL command.
  On the other hand, sending the control connection handler command
  first requires that the user side can send the marks and identifiers
  between sending the control connection handler command and receiving
  a response for it.  The response will never come until the marks and
  identifiers have been successfully received.  The user implementation
  must allow for this one case of a command where a subroutine that
  "sends a command and waits for a response" is inapplicable.
  RESYNCHRONIZING AN INPUT DATA CHANNEL
  The server control process should dispatch the data process to send
  the mark, and not wait, lest the data process become blocked for
  output due to a user abort.  The control process must go back to its
  command loop, to possibly receive a command that might break the data
  process out of that block.

8.25 UNDATA-CONNECTION Command

  Command:  (UNDATA-CONNECTION tid input-handle output-handle)
  Response: (UNDATA-CONNECTION tid)
  UNDATA-CONNECTION explicitly disestablishes a data connection from
  the user side.  The user side has the option of disestablishing data
  connections at its discretion.  There is no place in the protocol
  where disestablishment of data connections is required, other than at
  the end of the session, where it is implicit.




Greenberg & Keene [Page 52]

RFC 1037 NFILE - A File Access Protocol December 1987


  The data connection to be disestablished is the one designated by the
  input-handle and output-handle arguments.  These two handles must
  refer to the same data connection.
  It is not permitted to explicitly disestablish a data connection
  either of whose channels is active.  If the session is terminated by
  the breaking of the control connection, all file handles become
  meaningless, and the server must close all data connections known to
  it and close-abort all files opened on behalf of the user during the
  dialogue.
  In the Symbolics implementation, the user side disestablishes data
  connections that have not been used for a long time, such as twenty
  minutes or so.
  For more information about data connections:  See the section "NFILE
  Control and Data Connections", section 4.

9. NFILE RESYNCHRONIZATION PROCEDURE

  Ordinarily, the user side sends NFILE commands to the server side
  over the control connection; the server side responds to every user
  command, and file data is transmitted over the data channels.  This
  section describes a resynchronization procedure that takes place when
  something disturbs the usual course of events.
  First, if the server side aborts while sending or receiving data,
  nothing can be done to salvage the connection between the two hosts.
  The control connection and any data channels associated with this
  connection are broken.  This happens rarely, if at all.
  It is not unusual for the user side to abort file operations, either
  commands or data transfer.  On a Symbolics computer, the user can do
  this by pressing CONTROL-ABORT.  An important aspect of any file
  protocol is the way it handles the situation when the user side
  aborts file operations.
  An NFILE user side reacts to user side aborts by immediately marking
  the connection unsafe.  When a control connection is unsafe, it must
  be resynchronized before it can be used again.  Data channels can
  also be marked unsafe, and must also be resynchronized before further
  use.  The resynchronization process rids the connection (whether
  control or data connection) of bytes of data that are now unwanted,
  and thus cleans up the channel so it can be used again.
  The resynchronization procedure is somewhat complex, but it fulfills
  a genuine need.  For those interested, a brief design discussion is
  included as note <3>.


Greenberg & Keene [Page 53]

RFC 1037 NFILE - A File Access Protocol December 1987


9.1 NFILE Control Connection Resynchronization

  NFILE requires any unsafe control connection to undergo a
  resynchronization procedure before further use.  Therefore, the
  resynchronization does not necessarily occur immediately after the
  control connection is marked unsafe.  The user side initiates the
  control connection resynchronization when another operation on the
  control connection is attempted.
  A "mark" is defined in the context of Byte Stream with Mark:  See the
  section "Discussion of Byte Stream with Mark", section 12.1.
  USER SIDE STEPS:  CONTROL CONNECTION RESYNCHRONIZATION
      1. The user side sends a mark over the control connection to
         the server.
      2. The user side sends the ASCII characters USER-RESYNC-DUMMY
         (as a data token) to the server.
      3. The user side sends a second mark to the server.
      4. The user side declares the control connection safe (at the
         token list level).
      5. The user side generates and sends a unique data token to
         the server.
      6. The user side then waits, expecting to detect a mark
         followed by the unique data token.  The user side reads and
         discards all tokens and marks until the desired match is
         found.
  Once the user side detects the mark and unique data token, the
  control connection has been fully resynchronized, and can be used
  again.


  SERVER SIDE STEPS:  CONTROL CONNECTION RESYNCHRONIZATION
       1. The server side detects a mark.  The server is thus alerted
          that the control connection is unsafe, and that
          resynchronization is in progress.
       2. The server continues to read data coming from the user side
          until it detects the second mark, and the token following
          it.



Greenberg & Keene [Page 54]

RFC 1037 NFILE - A File Access Protocol December 1987


       3. The server checks to see if the token following the mark is
          USER-RESYNC-DUMMY.  This rare situation occurs if the user
          aborts during the course of the resynchronization itself.
          If so, the server side discards the USER-RESYNC-DUMMY
          token.  The control connection is still unsafe, and the
          user side restarts the resynchronization procedure; the
          server side therefore begins at Step 2 again.
       4. If the token following the mark is not USER-RESYNC-DUMMY
          (this is the expected circumstance), the server should have
          received a single data token that is the unique data token
          generated by the user side.
              a. The server sends a mark to the user side.
              b. The server declares the control connection safe (at
                 the token list level).
              c. The server sends the unique data token to the user
                 side.
       5. If the server detects something following the mark that was
          neither USER-RESYNC-DUMMY nor a single data token, a
          protocol error has occurred.

9.2 NFILE Data Connection Resynchronization

  The NFILE data channel resynchronization procedure is similar to the
  NFILE control connection resynchronization.  Both procedures are
  based on a mark signalling the unsafe condition, then a second mark
  followed by a unique identifier.  One important difference between
  the two procedures is the circumstances in which they occur.  Control
  connections are put into unsafe states only when the user aborts
  during control connection I/O operations.  Data channels are made
  unsafe by a larger set of circumstances:









Greenberg & Keene [Page 55]

RFC 1037 NFILE - A File Access Protocol December 1987


      - User aborts occur during the file protocol operations that
        assign and deassign data channels.  This is the most common
        cause of data channels becoming unsafe.
      - A server receives a CLOSE command (with abort-p supplied as
        Boolean truth) specifying an open file that has not finished
        transmitting data.  That is, file reading is aborted.
      - The ABORT command is issued, causing data channels to be
        made unsafe.
      - The FILEPOS command is issued, causing the input data
        channel to become unsafe.
  The resynchronization clears the data channel of unwanted data from
  aborted operations and puts the data channel in a known state.  The
  data channel resynchronization procedure is invoked when the user
  side gives the RESYNCHRONIZE-DATA-CHANNEL command over the control
  connection.
  The following policies can be used to improve response time, but are
  not required by the NFILE protocol:  The user side can initiate
  resynchronization only if it needs the data channel, having first
  tried to use a free data channel that does not require
  resynchronization.  Also, the user side can periodically
  resynchronize all unsafe data channels.
  In giving the RESYNCHRONIZE-DATA-CHANNEL command, the user side
  indicates which data channel should be resynchronized.  Data channels
  are unidirectional, which means that depending on the direction
  (either input or output) of the data channel, either the user side or
  the server side sends the resynchronization data.  This is another
  difference from the resynchronization of the control connection, in
  which the resynchronization data is always sent by the user side.
  The resynchronization steps for input data channels are different
  than the steps for output data channels.








Greenberg & Keene [Page 56]

RFC 1037 NFILE - A File Access Protocol December 1987


  INPUT DATA CHANNEL RESYNCHRONIZATION
     1. The user side gives the RESYNCHRONIZE-DATA-CHANNEL command
        on the control connection, with only one argument, the
        handle of the data channel to be resynchronized.
     2. The server side of the data channel generates a unique
        identifier, and sends that data token in its regular
        command response to the user side.
     3. The server side sends a mark over the data channel.
     4. The server side sends the unique identifier token over the
        data channel.
     5. The user side reads until it detects a mark followed by the
        unique identifier token.  The resynchronization is then
        complete.  The data channel is no longer in an unsafe
        state.
  OUTPUT DATA CHANNEL RESYNCHRONIZATION
     1. The user side gives the RESYNCHRONIZE-DATA-CHANNEL command
        on the control connection, with two arguments: the handle
        of the data channel to be resynchronized, and a unique
        identifier that it has just generated.
     2. The user side of the data channel sends a mark.
     3. The user side of the data channel sends a dummy identifier
        token.  The dummy identifier can be any token that the
        server could not interpret as being the unique identifier.
        One suggestion is the data token DUMMY-IDENTIFIER.
     4. The server side of the data channel was alerted by the
        RESYNCHRONIZE-DATA-CHANNEL command that resynchronization
        is in progress.  The server side now reads the data,
        seeking the first mark.
     5. The server side reads and discards the first mark and the
        dummy identifier.
     6. The user side sends a second mark.
     7. The user side sends the unique identifier.
     8. The server side recognizes the mark and the unique
        identifier that follows, and the resynchronization is


Greenberg & Keene [Page 57]

RFC 1037 NFILE - A File Access Protocol December 1987


        complete.  The data channel is no longer in the unsafe
        state.

10. NFILE ERRORS AND NOTIFICATIONS

  NFILE recognizes two types of errors:  command response errors and
  asynchronous errors.  In addition to errors, NFILE supports
  notifications.
  Command response errors:
      - Signify an error that prevented the successful completion of
        the command; when such an error occurs, a command response
        error is sent instead of a normal command response.
      - Occur frequently in normal operations
  Asynchronous errors:
      - Are not related to any specific command
      - Are associated with an erring data channel
      - Typically indicate a problem in the transfer, such as
        running out of disk space or allocation, or an unreadable
        disk record
      - Occur rarely in normal operations
  Notifications:
      - Are not associated with an error
      - Are sent at the server's discretion
      - Provide general information, such as a warning that the
        system is going down

10.1 Notifications From the NFILE Server

  The NFILE server can send asynchronous notifications to the user side
  over the control connection.  The text of the notification contains
  information of interest to the person using NFILE, such as a warning
  that the server's operating system will be going down soon.
  Notifications can come from the server side at any time that the
  server is not sending something else.
  The format of NFILE notifications is:
            (NOTIFICATION "" text)
  The empty string "" takes the place of a transaction identifier.
  Notifications are initiated by the server, and are not associated
  with any transaction originated by the user side.n


Greenberg & Keene [Page 58]

RFC 1037 NFILE - A File Access Protocol December 1987


10.2 NFILE Command Response Errors

  When an error prevents the successful completion of an NFILE command,
  a command response error is sent instead of the normal command
  response.  A normal command response indicates success; a command
  response error indicates failure of the command.
  NFILE command response errors are sent from the server to the user
  across the control connection as top-level token lists, in this
  format:
            (ERROR tid three-letter-code error-vars message)
  ERROR is a keyword.  The tid is the transaction identifier of the
  command that encountered this error.  The arguments three-letter-
  code, error-vars, and message are all required.
  The three-letter-code provides the information on what kind of an
  error was encountered.  For a table of the three-letter codes and
  their meanings:  See the section "NFILE Three-letter Error Codes",
  section 10.4.
  message is a string that is displayed to the human user of the
  protocol.
  error-vars is a keyword/value list.  The three possible keywords are:
  PATHNAME, OPERATION, and NEW-PATHNAME.  Before transmitting an error,
  the server looks at the type of error to see if it can easily
  determine the value of any of the keywords.  If so, the server
  includes the keyword/value pair in its error.  If not, the
  keyword/value pair is omitted.  The value associated with OPERATION
  is the keyword naming the NFILE command that failed.  The values
  associated with PATHNAME and NEW-PATHNAME are strings in the full
  pathname syntax of the server host.
  For example, suppose the server on a file system with hierarchical
  directories could not access a file because its containing directory
  did not exist.  The command error response would use the PATHNAME
  keyword to indicate the first directory level that did not exist,
  instead of the full pathname which was supplied as the command
  argument.  This gives the user side valuable information that it
  otherwise would not have known.





Greenberg & Keene [Page 59]

RFC 1037 NFILE - A File Access Protocol December 1987


10.3 NFILE Asynchronous Errors

  When a data channel process, in either direction, encounters an error
  condition, the server sends an asynchronous error description. An
  asynchronous error description consists of a top-level token list.
  Typically, asynchronous errors indicate error conditions in the
  transfer, such as running out of disk space or allocation, or a
  unreadable disk record.
  The format of asynchronous error descriptions is:
        (ASYNC-ERROR handle three-letter-code error-vars message)
  ASYNC-ERROR is a keyword.  The handle argument identifies the erring
  data channel.  The arguments three-letter-code, error-vars, and
  message are all required.  Their meanings are the same as in NFILE
  command error responses: See the section "NFILE Command Response
  Errors", section 10.2.
  When the server detects an asynchronous error on an input data
  channel, the server sends an asynchronous error description on that
  data channel itself.  When an asynchronous error occurs on an output
  data channel, the asynchronous error description is sent on the
  control connection.
  Some asynchronous errors are restartable.  In this context,
  restartable means it makes sense to try to resume the operation.  One
  example of a restartable error is an attempt to write a file to a
  file system that is out of room.  The server side indicates whether
  an asynchronous error is restartable by prepending the keyword
  RESTARTABLE and the associated value Boolean truth to the error-vars
  list.  To proceed from a restartable error, the user side sends a
  CONTINUE command over the control connection.
  On any asynchronous error, either input or output, the data channel
  on the server side enters an "asynchronous error outstanding" state.
  The server can exit that state in one of two ways:  by receiving a
  CONTINUE command or a CLOSE command with the abort-p argument
  supplied as Boolean truth.
  On a normal CLOSE (not a close-abort), the server side checks the
  channel it was requested to close.  If an asynchronous error
  description has been sent on the data channel, but not yet processed
  by CONTINUE, the server side does not close the channel, but sends a
  command error response.  The same thing happens on a FINISH command
  received on a channel that has an asynchronous error pending.  In
  both cases, the three-letter code included in the command error
  response is EPC, for Error Pending on Channel.


Greenberg & Keene [Page 60]

RFC 1037 NFILE - A File Access Protocol December 1987


10.4 NFILE Three-letter Error Codes

  Usually the server's operating system provides some description of an
  error that occurs.  NFILE has a mechanism for conveying that
  information to the user side.  Upon detecting an error, the NFILE
  server should characterize the error by choosing the three-letter
  code that best describes the error.  The three-letter code is an
  argument in both the command response error and asynchronous error
  messages from the server to the user.
  Each of the NFILE three-letter codes represents some system error.
  The set of codes enables all operating systems to use one error-
  reporting mechanism.  Some operating systems will never encounter
  certain of the error conditions.
  Some errors fit logically into two error codes.  For example, suppose
  the server could not delete a file because the file was not found.
  This error could be considered either CDF (Cannot Delete File) or FNF
  (File Not Found).  In this case, File Not Found gives more specific
  and valuable information than Cannot Delete File.  Since the protocol
  does not allow more than one error code to be reported when an error
  occurs, the server must choose the most appropriate error code, given
  the information available to it from the operating system.
  This is the set of three-letter codes:
    ACC   Access error.  This indicates a protection-violation error.
    ATD   Incorrect access to directory.  A directory could not be
          accessed because the user's access rights to it did not
          permit this type of access.
    ATF   Incorrect access to file.  A file could not be accessed
          because the user's access rights to it did not permit this
          type of access.
    BUG   File system bug.  This includes all protocol violations
          detected by the server, as well as by the host file system.
    CCD   Cannot create directory.  An error occurred in attempting to
          create a directory.
    CDF   Cannot delete file.  The file system reported that it cannot
          delete a file.
    CCL   Cannot create link.  An error occurred in attempting to
          create a link.



Greenberg & Keene [Page 61]

RFC 1037 NFILE - A File Access Protocol December 1987


    CIR   Circular link.  An operation was attempted on a pathname that
          designates a link that eventually links back to itself.
    CRF   Cannot rename file.  An error occurred in attempting to
          rename a file.
    CSP   Cannot set property.  An error occurred in attempting to
          change the properties of a file.  This could mean that you
          tried to set a property that only the file system is allowed
          to set, or a property that is not defined on this type of
          file system.
    DAE   Directory already exists.  A directory could not be created
          because a directory or file of this name already exists.
    DAT   Data error.  The file system contains unreadable data.  This
          could mean data errors detected by hardware or inconsistent
          data inside the file system.
    DEV   Device not found.  The device of the file was not found or
          does not exist.
    DND   "Do Not Delete" flag set.  An attempt was made to delete a
          file that is marked by a "Do Not Delete" flag.
    DNE   Directory not empty.  An invalid deletion of a nonempty
          directory was attempted.
    DNF   Directory not found.  The directory was not found or does not
          exist.  This refers specifically to the containing directory;
          if you are trying to access a directory, and the actual
          directory you are trying to access is not found, FNF (for
          File Not Found) should be indicated instead.
    EPC   Error pending on channel.  The server cannot close the
          channel in attempting to close or finish the channel.
    FAE   File already exists.  The file could not be created because a
          file or directory of this name already exists.
    FNF   File not found.  The file was not found in the containing
          directory.  The TOPS-20 and TENEX "no such file type" and "no
          such file version" errors should also report this condition.
    FOO   File open for output.  Opening a file that was already opened
          for output was attempted.
    FOR   Filepos out of range.  Setting the file pointer past the


Greenberg & Keene [Page 62]

RFC 1037 NFILE - A File Access Protocol December 1987


          end-of-file position or to a negative position was attempted.
    FTB   File too big.  File is larger than the maximum file size
          supported by the file system.
    HNA    Host not available The file server or file system is
          intentionally denying service to user.  This does not mean
          that the network connection failed; it means that the file
          system is explicitly not available.
    IBS    Invalid byte size.  The value of the "byte size" option was
          not valid.
    ICO   Inconsistent options.  Some of the options given in this
          operation are inconsistent with others.
    IOD   Invalid operation for directory.  The specified operation is
          invalid for directories, and the given pathname specifies a
          directory, in directory pathname as file format.
    IOL   Invalid operation for link.  The specified operation is
          invalid for links, and this pathname is the name of a link.
    IP?   Invalid password.  The specified password was invalid.
    IPS   Invalid pathname syntax.  This includes all invalid pathname
          syntax errors.
    IPV   Invalid property value.  The new value provided for the
          property is invalid.
    IWC   Invalid wildcard.  The pathname is not a valid wildcard
          pathname.
    LCK   File locked.  The file is locked.  It cannot be accessed,
          possibly because it is in use by some other process.
    LIP   Login problems.  A problem was encountered while trying to
          log in to the file system.
    MSC   Miscellaneous problems.
    NAV   Not available.  The file or device exists but is not
          available.  Typically, the disk pack is not mounted on a
          drive, the drive is broken, or the like.  Operator
          intervention is probably required to fix the problem, but
          retrying the operation is likely to succeed after the problem
          is solved.


Greenberg & Keene [Page 63]

RFC 1037 NFILE - A File Access Protocol December 1987


    NER   Not enough resources.  For example, a system limit on the
          number of open files or network connections has been reached.
    NET   Network problem.  The file server had some sort of trouble
          trying to create a new data connection, or perform some other
          network operation, and was unable to do so.
    NFS   No file system.  The file system was not available.  For
          example, this host does not have any file systems, or this
          host's file system cannot be initialized or accessed for some
          reason, or the file system simply does not exist.
    NLI   Not logged in.  A file operation was attempted before logging
          in.  Normally the file system interface always logs in before
          doing any operation, but this problem can occur in certain
          unusual cases in which logging in has been aborted.


    NMR   No more room.  The file system is out of room.  This can mean
          any of several things:
                     - The entire file system is full.
                     - The particular volume involved is full.
                     - The particular directory involved is full.
                     - The user's allocated quota has been exceeded.
    RAD   Rename across directories.  The devices or directories of the
          initial and target pathnames are not the same, but on this
          file system they are required to be.
    REF   Rename to existing file.  The target name of a rename
          operation is the name of a file that already exists.
    UKC   Unknown operation. An unsupported file system operation was
          attempted, or an unsupported command was attempted.
    UKP   Unknown property.  The property is unknown.
    UNK   Unknown user.  The specified user name is unknown to this
          host.
    UUO   Unimplemented option.  An option to a command is not
          implemented.
    WKF   Wrong kind of file.  This includes errors in which an invalid
          operation for a file, directory, or link was attempted.
    WNA   Wildcard not allowed.


Greenberg & Keene [Page 64]

RFC 1037 NFILE - A File Access Protocol December 1987


11. TOKEN LIST TRANSPORT LAYER

  PURPOSE:  The Token List Transport Layer is a protocol that
  facilitates the transmission of simple structured data, such as
  lists.

11.1 Introduction to the Token List Transport Layer

  The Token List Transport Layer is a general-purpose protocol.  The
  Token List Transport Layer sends "tokens" through its underlying
  stream.  Each token usually represents a simple quantity, such as a
  string or integer.
  Tokens can be organized into "token lists".  Special tokens are
  provided to denote the starting and ending point of lists.  The token
  list transport layer differentiates between "top-level token lists",
  which are not contained in other lists, and "embedded token lists",
  which are contained in other lists.  Using lists makes it convenient
  to send structured records, such as commands and command responses of
  the client protocol.  The top-level token lists provide robustness.
  The Token List Transport Layer is a general term that includes two
  separate but related subjects:  the "token list stream" and the
  "token list data stream".  The token list stream is commonly used for
  applications that can easily organize the information to be
  transmitted into tokens and lists.  The token list data stream is
  more appropriate for transmitting a large volume of data that cannot
  easily be structured into tokens and lists, such as file data, which
  is simply a sequence of characters or bytes.
  The following table illustrates the main differences between token
  list streams and token list data streams:
                    Token List Data Stream      Token List Stream
                    ----------------------      -----------------
    Built on:     token list stream           Byte Stream with Mark
    Transmits:    stream data                 tokens, token lists
    Example
    of use:       NFILE data channels         NFILE control
                                              connection





Greenberg & Keene [Page 65]

RFC 1037 NFILE - A File Access Protocol December 1987


  NFILE uses the the Token List Transport Layer, and provides an
  excellent example of its usefulness.  The NFILE commands and command
  responses are sent over the control connection in a token list
  stream.  File data is sent across each data channel in a token list
  data stream.

11.2 Token List Stream

11.2.1 Types of Tokens and Token Lists

  All numbers in the token list documentation are represented in
  decimal notation.  Bytes are 8 bits long.
  TYPES OF TOKENS
  Tokens are of the following types:
           1. Atomic tokens.
              Atomic tokens are of the following subtypes:
             - Data tokens.  A data token consists of a sequence of
               bytes with an effectively infinite maximum length.  In
               some contexts a data token represents a string; in
               other contexts, a data token is other arbitrary data.
               Each data token is preceded in the token list stream
               by a representation of its length in bytes.
               Data tokens that are under 200 bytes long are preceded
               by one byte containing their length in bytes.  That
               is, a data token of 34 bytes is preceded by one byte
               of value 34.
               Data tokens 200 bytes or over are preceded by the byte
               known as PUNCTUATION-LONG, of value 201.  After the
               201 comes a four-byte-long number (least significant
               byte first) containing the length of the data token
               that follows.
             - Numeric tokens.  A sequence of bytes that represent
               and encode a nonnegative binary integer.  The largest
               valid integer is 2^63 - 1.
               Numeric tokens are either short integers (less than
               256) or long integers (greater than or equal to 256).
               Short integers are preceded by the byte known as
               PUNCTUATION-SHORT-INTEGER, of value 206.


Greenberg & Keene [Page 66]

RFC 1037 NFILE - A File Access Protocol December 1987


               Long integers are begun by PUNCTUATION-LONG-INTEGER,
               of value 207.  One byte follows, containing the length
               (in bytes) of the long integer.  The integer itself is
               next, least significant byte first.
             - Keyword tokens.  A sequence of bytes that represent
               and encode a named identifier of the implemented
               protocol.  Keyword tokens are used by the client
               protocol to convey a name; the only significance of a
               keyword token is in its name.
               Each keyword is preceded by the byte known as
               PUNCTUATION-KEYWORD, of value 208.  The data token
               following PUNCTUATION-KEYWORD represents the name of
               the keyword as a string.  The characters are in
               upper-case standard ASCII.
             - Boolean truth.  A special token that represents the
               Boolean truth value.  This token is known as
               BOOLEAN-TRUTH, of value 209 <4>.
  2. Control tokens.
  The token list stream supports four control tokens to delimit token
  lists, and one padding token.
              TOP-LEVEL-LIST-BEGIN  202   This control token
                                          appears at the start of
                                          each top-level token list.
              TOP-LEVEL-LIST-END    203   This control token
                                          appears at the end of
                                          each top-level token list.
              LIST-BEGIN            204   This control token
                                          appears at the start of
                                          each embedded token list.
              LIST-END              205   This control token
                                          appears at the end of
                                          each embedded token list.
              PUNCTUATION-PAD       200   This padding token should
                                          be ignored by the token
                                          list stream.  It can be
                                          sent to fill buffers.




Greenberg & Keene [Page 67]

RFC 1037 NFILE - A File Access Protocol December 1987


  TOKEN LISTS
  A token list consists of a sequence of atomic tokens or token lists.
  Token lists are begun and ended by control tokens that delimit the
  token lists.  There are three types of token lists:
        1. Top-level token lists.
           Top-level token lists begin with TOP-LEVEL-LIST-BEGIN and
           end with TOP-LEVEL-LIST-END.  Top-level token lists are not
           contained in other lists.
        2. Embedded token lists.
           These token lists occur inside other token lists.  They
           begin with LIST-BEGIN and end with LIST-END.
        3. The empty token list.
           This is a special example of the embedded token list.  In
           some contexts, the empty token list represents Boolean
           falsity.  An embedded empty token list is composed of a
           LIST-BEGIN followed immediately by a LIST-END.  A top-level
           empty token list is composed of TOP-LEVEL-LIST-BEGIN
           followed immediately by TOP-LEVEL-LIST-END.

11.2.2 Token List Stream Example

  This section contains an example of some data that can appear on a
  token list stream.  The example is a top-level token list encoding an
  NFILE DELETE command.
  The DELETE command is composed of the following pieces:  a TOP-
  LEVEL-LIST-BEGIN, the keyword DELETE, a data token containing the
  transaction identifier, a LIST-BEGIN, a LIST-END, a data token
  containing a pathname of a file to be deleted, and a TOP-LEVEL-LIST-
  END.  This example uses t105 as the transaction identifier, and
  /usr/max/temp as the pathname.
  All numbers in this section are expressed in decimal notation.
  The pieces of the command are displayed here in order:
           1. TOP-LEVEL-LIST-BEGIN
           2. The keyword token whose name is DELETE
           3. The data token containing the characters:  t105
           4. LIST-BEGIN
           5. LIST-END


Greenberg & Keene [Page 68]

RFC 1037 NFILE - A File Access Protocol December 1987


           6. The data token containing the characters:  /usr/max/temp
           7. TOP-LEVEL-LIST-END
  Now, let's translate each piece of the command into the bytes that
  are transmitted through the token list stream.
       1. TOP-LEVEL-LIST-BEGIN
          202     represents TOP-LEVEL-LIST-BEGIN
       2. The keyword token whose name is DELETE.
          A keyword token is introduced by PUNCTUATION-KEYWORD, which
          is represented in the token list stream as the byte 208.
          A data token follows, containing the string "DELETE".  A
          data token under 200 bytes long is introduced by one byte
          containing its length in bytes.  The length of this data
          token is 6 bytes.
          The data token continues with the standard ASCII character
          set representation of each character in the string DELETE:
              208     represents PUNCTUATION-KEYWORD
              006     represents the length of this data token
              068     represents "D"
              069     represents "E"
              076     represents "L"
              069     represents "E"
              084     represents "T"
              069     represents "E"
       3. The data token containing the characters:  t105
          This data token is begun by its length in bytes (4), and
          continues with the NFILE character set representation of
          each character in the string:
              004     represents the length of this data token
              116     represents "t"
              049     represents "1"
              048     represents "0"
              053     represents "5"
       4. LIST-BEGIN
              204     represents LIST-BEGIN



Greenberg & Keene [Page 69]

RFC 1037 NFILE - A File Access Protocol December 1987


       5. LIST-END
              205     represents LIST-END
       6. The data token containing the characters:  /usr/max/temp
              013     represents length of this data token
              047     represents "/"
              117     represents "u"
              115     represents "s"
              114     represents "r"
              047     represents "/"
              109     represents "m"
              097     represents "a"
              120     represents "x"
              047     represents "/"
              116     represents "t"
              101     represents "e"
              109     represents "m"
              112     represents "p"
       7. TOP-LEVEL-LIST-END
              203     represents TOP-LEVEL-LIST-END

11.2.3 Mapping of Lisp Objects to Token List Stream Representation

  The Symbolics interface to the token list stream sends Lisp objects
  through the underlying Byte Stream with Mark and produces Lisp
  objects on the other end.  Not all Lisp objects can be sent in this
  way.  For example, compound objects other than lists are not handled.
  An appropriate analogy is the sending and reconstruction of list
  structure via printed representation.  These are the types of objects
  that can be sent, and their representations:
       - Lisp strings are represented as data tokens in the NFILE
         character set.  Only 8-bit strings can be sent <5>.
       - Keyword symbols are represented as keyword tokens.  Although
         identifiable and reconstructable as keyword symbols, only
         their names are sent.  Any properties, bindings, and the
         like are not sent.
       - T is represented as BOOLEAN-TRUTH.
       - NIL is represented as the empty token list.
       - Lists are represented as token lists.  Circular lists cannot


Greenberg & Keene [Page 70]

RFC 1037 NFILE - A File Access Protocol December 1987


         be sent.  See the footnote related to the ambiguity between
         NIL and the empty list:  See the section "Types of Tokens
         and Token Lists", section 11.2.1.
       - Integers are represented as numeric tokens.  Only
         nonnegative integers less than 2^63 can be sent.

11.2.4 Aborting and the Token List Stream

  A token list stream accrues the benefits of the abort management
  policy of the Byte Stream with Mark on which it is built.  In order
  to fully realize this benefit, some simple rules must be obeyed by
  any implementation of the token list stream.
  The term "transmission" means either an atomic token or a complete
  top-level token list. A transmission starts with the control token
  TOP-LEVEL-BEGIN and ends with TOP-LEVEL-END.  The top-level token
  list can contain embedded token lists.
  The interface that writes to the token list stream must be capable of
  writing the representation of entire transmissions.  When this
  interface is called, it must effectively lock the token list stream,
  and exclude access by other processes until the entire transmission
  has been encoded and sent.
  If the sending is aborted while the stream is locked, the stream
  enters an "unsafe" state.  Trying to send data while the stream is
  unsafe signals an error.  The application and the token list stream
  must send a mark to cause resynchronization, and allow the token list
  stream to be used again.  When the reading side encounters this mark,
  it resynchronizes itself according to whatever client protocol is in
  use.
  Similarly, the interface that reads from the token list stream must
  be capable of reading entire transmissions.  When this interface is
  called, it must lock the stream, excluding access by other processes
  until the entire transmission has been read.
  If the reading is aborted while the stream is locked, the stream
  enters an unsafe state.  The only exit from this unsafe state is by
  means of receiving a mark.  When the stream is unsafe, the only valid
  operation that can be performed upon it is "read and discard all
  tokens until a mark is encountered; read and discard that mark;
  declare the stream safe again".




Greenberg & Keene [Page 71]

RFC 1037 NFILE - A File Access Protocol December 1987


  Depending on the client protocol, the receipt of a mark might cause
  the reading side to read for further marks.  NFILE implements the
  resynchronization of token list streams, and serves as a useful
  example: See the section "NFILE Control Connection
  Resynchronization", section 9.1.
  The Symbolics implementation provides the two mark-handling
  primitives in this way:


     1. Send token (or list) preceded by a mark.  When the stream
        is in the unsafe state (on the output side), this is the
        only permitted output operation (other than closing).
     2. Read through to a mark and read the token (or list)
        following the mark.  When the stream is in the unsafe state
        (on the input side), this is the only permitted input
        operation (other than closing).

11.3 Token List Data Stream

  The token list data stream is a facility to transmit stream data
  through a token list stream.  The token list data stream imposes the
  following protocol on the data transmitted:
           - Data is sent in the format of loose data tokens, not
             contained in token lists.
           - The keyword token EOF indicates that the end of data has
             been reached.
           - Token lists can be transmitted through the token list
             data stream.
           - No loose tokens other than data tokens or the keyword
             token EOF can be sent.
           - Boundaries between data tokens are not signification.
             The data is considered to be a continuous stream, with
             the possible exception of marks.
  The token list data stream is most appropriate for sending file data.
  It is expected (but not required) that its typical mode of use is to
  send a large number of data tokens, with an occasional token list.
  The design intent was that token lists would be used by the
  application program to indicate exceptional situations.
  Data tokens, the keyword token EOF, and token lists are defined in


Greenberg & Keene [Page 72]

RFC 1037 NFILE - A File Access Protocol December 1987


  the token list stream documentation:  See the section "Types of
  Tokens and Token Lists", section 11.2.1.
  The NFILE file protocol provides a good example of the use of token
  list data streams.  NFILE sends file data through token list data
  streams; each NFILE data channel is a token list data stream.  Errors
  such as disk errors during the reading of a file are conveyed as
  token lists through the token list data stream.

12. BYTE STREAM WITH MARK

  PURPOSE:  Byte Stream with Mark is a simple layer of protocol that
  guarantees that an out-of-band signal can be transmitted in the case
  of program interruption.  Byte Stream with Mark is designed to
  provide end-to-end stream consistency in the face of user program
  aborts.

12.1 Discussion of Byte Stream with Mark

  INTRODUCTION
  Byte Stream with Mark is a reliable, bidirectional byte stream with
  one out-of-band (but not out-of-sequence) signal called a "mark".
  The design of Byte Stream with Mark ensures that the mark is always
  recognizable on the receiving end.  The Byte Stream with Mark is
  built on an underlying stream, which must support the transmission of
  8-bit bytes.  Byte Stream with Mark has been implemented to run on
  TCP and Chaos.  Marks are implemented differently on the two
  protocols.
  Marks are used to resynchronize the stream when something has
  occurred to interrupt normal operations.  For example, an application
  layer sending data over the Byte Stream with Mark can abort in the
  middle of sending that data.  Recovery is handled by sending a mark.
  In the context of this document, "aborting" is defined as follows:
  Aborting the current execution of a program means to halt that
  execution and to abandon it, never to complete it.  The data
  representing the state of the execution are irrevocably discarded.
  EXAMPLE OF USE
  Byte Stream with Mark is the layer of protocol underlying NFILE.
  NFILE uses the marks implemented in Byte Stream with Mark to
  resynchronize control connections or data channels whose
  synchronization has been lost.  For a description of NFILE's use of
  marks to resynchronize streams:  See the section "NFILE
  Resynchronization Procedure", section 9.


Greenberg & Keene [Page 73]

RFC 1037 NFILE - A File Access Protocol December 1987


  BYTE STREAM WITH MARK ON CHAOSNET
  A mark is recognized on Chaosnet by a packet bearing the opcode 201
  (octal).  There is no data in a mark packet, so the data portion of
  the packet is ignored.  Byte Stream with Mark transmits all data in
  packets bearing opcode 200 (octal).
  If Byte Stream with Mark is implemented on another (non-Chaos) stream
  that supports opcode-bearing packets, the recommended implementation
  is the reservation of an opcode for the mark.
  BYTE STREAM WITH MARK ON TCP:  RECORD MODE
  The purpose of Byte Stream with Mark is to guarantee that marks can
  always be unambiguously identified.  Therefore, for TCP (and for any
  transport layer that does not implement packets natively) a simple
  record stream is imposed on the stream.  The record boundaries serve
  only to distinguish where a mark can occur.  A record consists of a
  two-byte byte count, most significant byte first, followed by that
  many bytes of data.  A byte count of zero is recognized as a mark.
  Both the sending side and the receiving side must rigorously maintain
  the integrity of the record boundaries.  A writer to the stream must
  never output a byte count without that number of data bytes
  following.  Similarly, a reader of the stream, after reading a byte
  count, has effectively contracted to read that many bytes from the
  encapsulated stream, regardless of whether those bytes are requested
  by the application layer.
  MAINTAINING RECORD INTEGRITY
  This subsection deals with maintaining record integrity on non-Chaos
  networks.  Since Chaos implements packets natively, no special care
  is required to maintain record integrity on the Chaos network.
  The design discussed here guarantees record integrity; the underlying
  stream must guarantee data integrity.
  The basic design of Byte Stream with Mark on TCP (and other transport
  layers that do not implement packets natively) is to preserve record
  integrity by putting clearly demarcated, byte-counted records in the
  natural records of the encapsulated stream.  Therefore, when the
  outer stream requests a buffer's worth of file data from the
  encapsulated stream, it expects to receive a buffer containing one
  entire, ntegral, record of that stream, complete with byte count.
  Because of diverse network implementations on different operating
  systems, the software that implements the encapsulated stream might


Greenberg & Keene [Page 74]

RFC 1037 NFILE - A File Access Protocol December 1987


  not be able to provide integral record buffers to the Byte Stream
  with Mark implementation.  For example, the writing stream could have
  written records that are much longer than available buffers on the
  receiving system.  In this case, a request to read from the
  encapsulated stream returns some buffer or some amount of data
  representing less than an entire Byte Stream with Mark record.  The
  input subroutine of the Byte Stream with Mark implementation must
  therefore return a region of this (smaller) buffer, representing less
  than the full Byte Stream with Mark record.  Nevertheless, the Byte
  Stream with Mark must extract the count of the full Byte Stream with
  Mark record from the first such buffer of each Byte Stream with Mark
  record, and maintain and update this count as succeeding component
  buffers are read.
  In this case, if the program reading from the Byte Stream with Mark
  aborts while reading data, the implementation of Byte Stream with
  Mark must continue to read through the remaining buffers of the Byte
  Stream with Mark record that has been subdivided in this fashion.
  The user side program will have determined that an abort has
  occurred, and will request the Byte Stream with Mark to read up to
  and through the next mark.  The Byte Stream with Mark will have
  processed a fractional record, and must discard the remaining buffers
  of the record now being read.

12.2 Byte Stream with Mark Abortable States

  Byte Stream with Mark is designed to provide end-to-end stream
  consistency in the face of user program aborts.  This section
  describes user program aborts, and how Byte Stream with Mark handles
  them.  In the context of this document, "aborting" is defined as
  follows:  Aborting the current execution of a program means to halt
  that execution and to abandon it, never to complete it.  The data
  representing the state of the execution are irrevocably discarded.
  USER PROGRAM ABORTS AND I/O STREAMS
  Aborting the execution of the code that manipulates I/O streams, in
  general, poses significant problems.  Given that a stream is a static
  data object, and is intended to be used over and over again, aborting
  the execution of any routine manipulating a stream can leave it in an
  inconsistent, unusable state.
  Many operating systems solve this problem by manipulating a large
  subset of streams within the confines of the supervisor or executive
  program, which is not vulnerable to aborts, short of system or
  network failure.  Nevertheless, the need still exists to implement
  streams outside of the boundaries of the supervisor.  Furthermore,


Greenberg & Keene [Page 75]

RFC 1037 NFILE - A File Access Protocol December 1987


  the Symbolics computer environment has no supervisor or executive
  program, and is thus vulnerable to aborts everywhere.
  BYTE STREAM WITH MARK HANDLING OF USER PROGRAM ABORTS
  Byte Stream with Mark is designed to be nearly impervious to the
  aborting of programs using it.  Its design is based on careful
  analysis of all possible states of the stream, and of the effect of
  aborts of the programs using the stream in each of these states.
  This section provides that analysis.
  A "transmission" is a collection of user data sent by the application
  level through the Byte Stream with Mark whose end is well-defined,
  once its start has been recognized.  For instance, the token list
  stream, when using Byte Stream with Mark, sends token lists.  When a
  TOP-LEVEL-LIST-BEGIN has been sent, the containing transmission is
  not considered complete until the corresponding TOP-LEVEL-LIST-END is
  read.  See the section "Token List Transport Layer", section 11.
  The following cases are possible states of the stream when an abort
  occurs:
        1. Abort occurs when the user program is not manipulating the
           stream.
           This case presents no problem.
        2. Abort occurs after a transmission has been partially sent,
           at a packet or record boundary.
           This implies that the datum that would indicate the
           successful complete sending of that transmission has been
           not yet been sent.
           The Byte Stream with Mark state is consistent, but the
           application level state is not.  The application level must
           determine that the execution of the code composing and
           sending its transmission was, in fact, aborted, and
           initiate resynchronization via marks.
           The receiving side must be careful not to act upon a
           transmission (that is, to perform any action or side
           effect) until the transmission has been successfully
           received in entirety.  This protects the user program from
           the possibility that an abort can occur after a
           transmission has been partially sent.



Greenberg & Keene [Page 76]

RFC 1037 NFILE - A File Access Protocol December 1987


        3. Abort occurs during the sending or receiving of a record.
           This is the most vulnerable state of the mechanism.  This
           case does not occur on packet-oriented media; it is
           subsumed by the next case.
           This case is handled by minimizing the extent of this
           window, and killing the connection when and if the
           situation is detected.  Depending on the operating system
           involved, this window could be minimized by using
           interrupt-disabling mechanisms, auxiliary processes or
           tasks, or some other technique.
           For buffered streams, input and output waiting can be done
           in consistent states, thus minimizing the amount of time
           manipulating the actual encapsulated stream.  For
           unbuffered streams, a lot of time can be spent in this
           window.  It is expected that unbuffered streams will be
           exceedingly uncommon.  Nevertheless, the implementation of
           Byte Stream with Mark must detect this case.
        4. Abort occurs during the sending or receiving of fundamental
           units of the lowest-level underlying stream (packets,
           buffers, or bytes).
           This case is usually handled by inhibiting interrupts, or
           other forms of masking, in the code implementing the
           encapsulated stream, since no waiting is possible at
           unexpected times.

13. POSSIBLE FUTURE EXTENSIONS

  NFILE was designed to be extended as the needs of its clients grow,
  or as new clients with different needs appear.  Currently it meets
  the needs of the Symbolics Genera 7.0 operating system, although its
  design is intentionally general.  If users of other operating systems
  identify new features that would be useful, they could be added to
  NFILE.  This section illustrates some areas areas where the design of
  NFILE intentionally accommodates extensions.
        - The NFILE protocol encodes commands and responses as text,
          rather than using prearranged numbers.  This means that new
          commands and responses can be added without having to obtain
          a new number from a central registry.
        - The Token List Transport Layer provides a general substrate
          for the value-transmission portion of network protocols.  In
          fact, it has been used at Symbolics for other protocols


Greenberg & Keene [Page 77]

RFC 1037 NFILE - A File Access Protocol December 1987


          besides NFILE.  The Token List Transport Layer could
          conveniently be extended to support transmission of other
          types of values besides those it currently supports.
        - The character set to be used for file transfer could be made
          negotiable.
        - The command character set could be made negotiable.
          Currently there is no negotiation sequence, but one could be
          added.
        - Greater support for more complex file organizations could be
          added, such as record files, databases, and so on.  This
          could be an extension to the direct access mode facility.
        - Currently, the LOGIN command allows the user side to inform
          the server which version of NFILE it is running.  This
          feature is included in NFILE so that a server can continue
          to support older versions of the protocol even after new,
          extended versions have been implemented.  However, the
          specification is currently somewhat vague as to how the
          server can make use of the version.
        - NFILE is not restricted to using TCP or Chaos as its
          underlying protocol.  NFILE can be built on any byte stream
          protocol that supports reliable transmission of 8-bit bytes
          and multiple connections.
  In addition to the possible future extensions, we would like to
  mention a known limitation of NFILE.
  Currently NFILE requires multiple connections for a single session.
  That is, the control connection must be separate from the data
  connections.  If NFILE is to be used over a telephone, this
  requirement poses an inconvenient restriction.  It is possible to
  implement a multiplexing scheme as a level between NFILE and the
  communication medium.








Greenberg & Keene [Page 78]

RFC 1037 NFILE - A File Access Protocol December 1987


                               APPENDIX A
                         NORMAL TRANSLATION MODE


  NORMAL translation mode guarantees the following:
        - A file containing characters in the NFILE character set can
          be written to any NFILE server and read back intact
          (containing the same characters).
        - A file written by NFILE should not appear as "foreign" to a
          server operating system unless the file contains NFILE's
          extended characters.  That is, a server file that uses only
          the subset of the NFILE character set limited to standard
          ASCII characters (the 95 printing characters, and the native
          representation of return, linefeed, page, backspace, rubout,
          and tab) can be read and written, with the result being the
          same data in NFILE characters as exists in server
          characters.
  In this section, all numbers designating values of character codes
  are to be interpreted in octal.  The notation "x in c1..c2" means
  "for all character codes x such that c1 <= x <= c2."
  The NFILE character set is an extension of standard ASCII.  The 95
  ASCII printing characters have the same numerical codes in the NFILE
  character set.  Five ASCII non-printing characters have counterparts
  in the NFILE character set, as shown in the following table.  The
  NFILE character set includes a single Return character, rather than
  the carriage-return line-feed sequence typically used in ASCII.  The
  NFILE character set does not include the ASCII control characters,
  other than the five shown in the following table, but does include
  some additional printing and formatting characters that have no
  counterparts in ASCII.
                            NFILE     Standard ASCII
        Rubout:             207       177
        Backspace:          210       10
        Tab:                211       11
        Linefeed:           212       12
        Page:               214       14
  Note that the NFILE Return character is of code 215.  This character
  includes "going to the next line".  This is a notable difference from
  the convention used in PDP-10 ASCII in which lines are ended by a
  pair of characters, "carriage return" and "line feed".



Greenberg & Keene [Page 79]

RFC 1037 NFILE - A File Access Protocol December 1987


  NORMAL TRANSLATION TO UNIX SERVERS
  The translation given in this table is appropriate for use by UNIX
  servers, or other servers that use 8-bit bytes to store ASCII
  characters.  Machines with 8-bit bytes usually place the extra NFILE
  characters in the top half of their character set.
      TABLE 1.   TRANSLATIONS FROM NFILE CHARACTERS TO UNIX CHARACTERS


           NFILE character       UNIX character
           x in 000..007         x
           x in 010..015         x + 200
           x in 016..176         x
           177                   377
           x in 200..207         x
           x in 210..211         x - 200
           212                   015
           x in 213..214         x - 200
           215                   012
           x in 216..376         x
           377                   177
      TABLE 2.   TRANSLATIONS FROM UNIX CHARACTERS TO NFILE CHARACTERS


           UNIX character        NFILE character
           x in 000..007         x
           x in 010..011         x + 200
           012                   215
           x in 013..014         x + 200
           015                   212
           x in 016..176         x
           177                   377
           x in 200..207         x
           x in 210..215         x - 200
           x in 216..376         x
           377                   177
  NORMAL TRANSLATION TO PDP-10 FAMILY SERVERS
  The translation given in this table is appropriate for use by PDP-10
  family servers, or other servers that use 7-bit bytes to store ASCII
  characters.  On the PDP-10 the sequence CRLF, 015 012, represents a
  new line.



Greenberg & Keene [Page 80]

RFC 1037 NFILE - A File Access Protocol December 1987


  The mechanism for this translation on machines with 7-bit bytes is to
  use the RUBOUT character (octal code 177) as an escape character.
        TABLE 3.   TRANSLATIONS FROM NFILE TO PDP-10 CHARACTERS


           NFILE character       PDP-10 character(s)
           x in 000..007         x
           x in 010..012         177 x
           013                   013
           x in 014..015         177 x
           x in 016..176         x
           177                   177 177
           x in 200..207         177 x - 200
           x in 210..212         x - 200
           213                   177 013
           214                   014
           215                   015 012
           x in 216..376         177 x - 200
           377                   no corresponding code
  These tables might seem confusing at first, but there are some
  general rules about it that should make it clearer.  First, NFILE
  characters in the range 000..177 are generally represented as
  themselves, and x in 200..377 is generally represented as 177
  followed by x - 200.  That is, 177 is used to quote the second 200
  NFILE characters.  It was deemed that 177 is a more useful and common
  character than 377, so 177 177 means 177, and there is no way to
  describe 377 with PDP-10 ASCII characters.  In the NFILE character
  set, the formatting control characters appear offset up by 200 with
  respect to standard ASCII.  This explains why the preferred mode of
  expressing 210 (backspace) is 010, and 010 turns into 177 010.  The
  same reasoning applies to 211 (Tab), 212 (Linefeed), 214 (Formfeed),
  and 215 (Return).
  More special care is needed for the Return character, which is the
  mapping of the system-dependent representation of "the start of a new
  line".  The NFILE Return (215) is equivalent to 015 012 (CRLF) in
  some ASCII systems.  In the NFILE character set there is no
  representation






Greenberg & Keene [Page 81]

RFC 1037 NFILE - A File Access Protocol December 1987


    TABLE 4.   TRANSLATIONS FROM PDP-10 CHARACTERS TO NFILE CHARACTERS


           PDP-10 character      NFILE character
           x in 000..007         x
           x in 010..012         x + 200
           013                   013
           014                   214
           015 012               215
           015 not-012           115
           x in 016..176         x
           177 x in 000..007     x + 200
           177 x in 010..012     x
           177 013               213
           177 x in 014..015     x
           177 x in 016..176     x + 200
           177 177               177
  of a carriage that doesn't go to a new line, so if there is one in a
  server file, it must be translated to something else.  When
  converting ASCII characters to NFILE characters, an 015 followed by
  an 012 therefore turns into a 215.  A stray CR is arbitrarily
  translated into a single M (115).














Greenberg & Keene [Page 82]

RFC 1037 NFILE - A File Access Protocol December 1987


                               APPENDIX B
                          RAW TRANSLATION MODE


  RAW mode means no translation should be performed.  In RAW mode the
  server operating system should treat the file as a character file and
  use the same data formatting that would be appropriate for a
  character file, but transfer the actual binary values of the
  character codes.






















Greenberg & Keene [Page 83]

RFC 1037 NFILE - A File Access Protocol December 1987


                               APPENDIX C
                      SUPER-IMAGE TRANSLATION MODE


  SUPER-IMAGE mode is intended for use by PDP-10 family machines only.
  It is included largely as an illustration of a system-dependent
  extension.  A server machine that has 8-bit bytes should treat
  SUPER-IMAGE mode the same as NORMAL mode.
  In this section, all numbers designating values of character codes
  are to be interpreted in octal.  The notation "x in c1..c2" means
  "for all character codes x such that c1 <= x <= c2."
  SUPER-IMAGE mode suppresses the use of the 177 character as an escape
  character.  Character translation should be done as in NORMAL mode,
  with one exception.  When a two-character sequence beginning with 177
  is detected, the 177 should not be output at all.
  In this section, all numbers designating values of character codes
  are to be interpreted in octal.  SUPER-IMAGE mode is intended for use
  by PDP-10 machines only.
  SUPER-IMAGE suppresses the use of Rubout for quoting.  That is, for
  each entry beginning with a 177 in the PDP-10 character column in the
  NORMAL translation table, the NFILE character has the 177 removed.
        TABLE 5.   SUPER-IMAGE TRANSLATION FROM NFILE TO ASCII


           NFILE character   PDP-10 character(s)


           x in 000..177     x
           x in 200..214     <x - 200>
           215               015 012
           x in 216..376     <x - 200>
           377               no corresponding code








Greenberg & Keene [Page 84]

RFC 1037 NFILE - A File Access Protocol December 1987


        TABLE 6.   SUPER-IMAGE TRANSLATION FROM ASCII TO NFILE


           PDP-10 character  NFILE character


           x in 000..007     x
           x in 010..012     x + 200
           013               013
           014               214
           015 012           215
           015 not-012       115
           x in <016..176>   x
           177               177



















Greenberg & Keene [Page 85]

RFC 1037 NFILE - A File Access Protocol December 1987


                                  NOTES
  1. NFILE's requirement for using the NFILE character set is
     recognized as a drawback for non-Symbolics machines.  A useful
     extension to NFILE would be a provision to make the character set
     negotiable.
  2. Implementation note:  Care must be taken that the freeing is done
     before the control connection is allowed to process another
     command, or else the control connection may find the data channel
     to be falsely indicated as being in use.
  3. The Symbolics operating system has the policy that whenever the
     user side is waiting for the server side, a user abort can occur.
     This user side waiting can occur in any context, such awaiting a
     response, waiting in the middle of reading network input, or
     waiting in the middle of transmitting network output.  Thus there
     are no "hung" states.
  4. Note that the Token List Transport Layer supplies a special token
     to indicate Boolean truth, but no corresponding token to indicate
     Boolean falsity.  NFILE uses an empty token list to indicate
     Boolean falsity.  The historical reason for this asymmetry is the
     inability of the Lisp language to differentiate between the empty
     list and NIL, which is traditionally used to mean Boolean falsity.
     If the flexibility of both a Boolean falsity and an empty token
     list were allowed, it would create problems for an operating
     system that cannot distinguish between the two.  This aspect of
     the protocol is recognized as a concession to the Lisp language.
     The unfortunate effect is to disallow operating systems to
     distinguish between Boolean falsity and an empty list.
  5. No so-called "fat strings" can be sent.










Greenberg & Keene [Page 86]