RFC 645 UNKNOWN NAMING · SYNTAX · FILE TRANSFER

NSDS: Network Standard Data Specification syntax

A 1974 proposal for a common way to name a file on any network host, in forms for humans and for programs.

On rfc-editor.org ↗
PUBLISHED
June 1974
AUTHORS
D. Crocker
STREAM
Legacy
BUILDS ON
RFC 615 — NSDP
SEMI-STRUCTURED FLAG
%
HIGHLY-STRUCTURED FLAG
%%
MACHINE KEYWORD LENGTH
4 characters
MACHINE COUNT FIELD
one byte
DOI
10.17487/RFC0645
LINEAGE · FROM THE RFC INDEXOpen full graph →

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                                         D. Crocker
Request for Comments: 645                                       UCLA-NMC
NIC: 30899:                                                    JUNE 1974
Obsolets: 615 (NIC: 21531)


               Network Standard Data Specification Syntax

INTRODUCTION

   This document defines the basic components of a Network Standard Data
   Specification (NSDS) syntax.  A NSDS is intended to provide a
   mechanism for specifying all the attributes of a collection of bits.

      The definition of a complete NSDS syntax is expected to require an
      extended effort.  Therefore the initial scope of this document has
      been constrained to provide only a basic syntactic environment.

   In order to demonstrate a specific use for the NSDS, this document
   also provides the complete syntax for specifying the PATHNAME
   attributes of a collection of bits, to the level of a file.  Addition
   of new subparamters should not be difficult.

      In this context, "pathname" referes to that information which
      specifies the LOCATION of a collection of bits.

      The pathname syntax is essentially the same as that proposed in
      RFC 615 (NIC -- 21531,).  Modifications were made in order to
      allow for graceful addition of other file attributes and to
      optimize use by humans and by processes.

   I would like to thank Jon Postel, Jerry Popek, Vint Cerf, Jim White,
   Charlie Kline, Buz Owen, Ken Pogran, Jerry Burchfiel and Tom Boynton
   for their suggestions.

HUMAN AND MACHINE FACTORS

   Since computers tend to prefer more highly structured envireonments
   than do humans, aspects of the NSDS syntax are permitted to be
   different for computers than they are for humans.  Specifically:

      For computers (highly-structured mode), keyword fields are fixed
      length and the variable-length data subfields are prefaced by a
      byte count.  Additionally in highly structured mode, the possible
      contents of data subfields may be more constrained than for the
      semi-structured mode.

      For humans (semi-structured mode), keyword subfields are variable
      length and data subfields are surrounded by delimeter characters.
      A keyword must be long enough to distinguish it from other
      keywords.  That is, partial-name specification is permitted.

STRUCTURE OF THE GENERAL SYNTACTIC ENVIRONMENT

Overview:

   A NSDS is prefaced by one or two percent signs, followed by a set of
   fields subject to context-free interpretation, and terminated with a
   space.  Pathname fields precede any other file attribute
   specifications.

The BNF:

   <NSDS>        ::=  <flag> <path> <otherstuff> <sp>

   <flag>        ::=  % / %%

   <path>        ::=  pathname fields, as described below.

   <otherstuff>  ::=  fields for specifying data storage and accesss
                      characteristics, to be defined later.

   <sp>          ::=  space.

Comments:

   The <flag> indicates escape-tp-NSDS-syntax.  One percent sign
   indicates semi-structured syntax, two indicate that highly-structured
   syntax is being used.

      Only <flag> must be considered in relation to any host's current
      syntax.  It is not currently known to conflict with any host's
      syntax.

         Exclamation mark (!) is the only other character that seems
         permissible (on the assumption that the character should be a
         graphic).  Its use would cause minor problems at Multics; but
         more importantly as a graphic, it is too similar to the numeral
         "1".

   The basic (highest-level) syntax for individual <path> and
   <otherstuff> fields is the same, as defined below.  The remaining
   lower-level syntax (including permissible keywords and data subfield
   contents) for <otherstuff> fields is left for later.

BASIC UNITS OF SUBSTRUCTURE

Overview:

   A semi-structured field begins with a varying-length descriptor.  The
   descriptor is followed by a varying-length data subfield, which is
   surrounded by delimeter characters.

   Highly-structured fields have fixed-length descriptors, followed by a
   data byte-count, followed by the data

BNF for individual fields:

   <field>       ::=  <machine> / <human>

   <machine>     ::=  <stru-field> / <stru-field> <machine>

   <stru-field>  ::=  <stru-key> <count> <data>

   <stru-key>    ::=  4-character field definition keyword; see
                      below.

   <count>       ::=  one-byte binary count of number of bytes of
                      <data>.

   <human>       ::=  <h-field> / <h-field> <human>
   <h-field>     ::=  <h-key> <h-rest>

   <h-key>       ::=  Variable-length field definition keyword; see
                      below.

   <h-rest>      ::=  <l-delim> <data> <r-delim>
                      /  <l-delim> <data> <r-delim> <h-rest>

   <l-delim>     ::=  any non-alphabetic printable character that is
                      not in the succeeding <data> subfield and that
                      is acceptable to the object site.  For visual
                      aesthetics and to facilitate human parsing,
                      anything <l-delim> is a left-bracket character
                      (<, [, (, -), <r-delim> must be the
                      complementary right-bracket
                      character (>, ], ), |).

   <r-delim>     ::=  either 1) the same character as <l-delim> or 2)
                      if the <l-delim> character is a left-bracket
                      character (<, [, (, -) then its complementary
                      right-bracket (>, ], ), |).

   <data>        ::=  any sequence of characters acceptable to the
                      object site.  This is the actual data subfield
                      with the file, directory, device (or whatever)
                      attribute value.

Elaboration:

   Case is irrelevant to the syntax, though some sites will care about
   case in <data> subfields.

   They key (<stru-key> or <h-key>) indicates what part of the NSDS the
   next <data> subfield refers to.

   <R-delim> amd <l-delim> are used to delimit the beginning and end of
   the <data> subfield.

   <Fields> for pathnames ARE order dependent, but defaulted ones may be
   omitted.  The order is as indicated for <key>s, below. That is,
   Network, Host, ... Siteparm.

      Keywords are used, even though pathname attributes are ordered, to
      facilitate the addition of new fields and to be consistent with
      the syntax for <otherstuff> fields which are expected to be
      unordered.

   <Field>s or <h-rest> subfields may be repeated, as permitted by the
   object site.  A series of <h-rest> subfields, without any <h-key>
   subfields is interpreted as a series of <h-field>s with identical
   <key>s.

      Also, note that since the syntax does not constrain the contents
      of <data> subfields, compound names within a single <data>
      subfield are allowed.  The delimeter used to separate names within
      a <data> subfield must be different from <l-delim>/<r-delim> and
      the same as that used at the object site, since that is the only
      site which will be able to interpret the <data> subfield.

   The validity of any combinations of <field>s is entirely site-
   dependent.  For example, if a site will accept it, an NSDS with a
   Host field, and nothing more, may be permissible.

      The validity of <data> subfields' contents is generally site-
      dependent.  Some exceptions are noted below.

PATHNAME ATTRIBUTES AND VALUES

   The basic syntax does not need to be altered, to create the ability
   to specify pathnames.  Only <key> values need to be defined.

   Definitions of Pathname <key>s:

      They keyword for semi-structured mode is given first, followed by
      the keyword for highly-structured mode, if different.  For
      highly-structured mode, keywords that are less than four
      characters should be padded with blanks at the right.

      Semi        Highly  Meaning

      NETWORK     NET     Reference to the network (e.g., ARPA)
                          connected to the HOST that contains or will
                          contain the collection of bits.

      HOST                Reference to host machine that contains or
                          will contain the collection of bits. Also see
                          section on "Numbers".

      PERIPHERAL  PERI    Peripheral device being referred to.

      VOLUME ID   VOL     The volume (e.g., specific tape reel or disk
                          pack) associated with the named peripheral
                          device.

      DIRECTORY   DIR     Name of directory which contains a pointer to
                          the entity (directory or filename) specified
                          in the following <field>.

      FILE                Basic name of the file (data set).

      TYPE                Optional modifier to the filename.  (Tenex
                          calls it the Extension.)

      VERSION     VER     Optional third party to basic filename.
                          Usually used to distibguish updated files.
                          The <data> subfield will usually contain a
                          number.

      SITEPARM    SITE    A parameter, such as an access specification
                          or account number, peculiar to the object
                          site.  The contents of the <data> subfield
                          must serve to identify what Siteparm is
                          involved.  Each site will be responsible for
                          defining the syntax of Siteparm <data>
                          subfields it will accept.  Note that the
                          SITEPARM field allows specification of other
                          than pathname data (e.g., access and account
                          number).

Some reserved PERIPHERAL <data>s:

   The alternate forms are merely for typing convenience and are not
   related to the semi/highly structure modes.

   DISK or DSK:               Immediate, direct-access secondary
                              storage.

   ONLINE or ONL:             Whatever immediately-accessible
                              (measured in fractions of a second)
                              storage the user accesses by default;
                              usually disk.

   TAPE or TAP:               Industry-compatible magnetic tape.

   TAPE7 or TP7:              7-Track industry compatible tape.

   TAPE9 or TP9:              9-Track industry compatible tape.

   DECTAPE or DEC:            DEC Tape.

   OFFLINE or OFF:            Any tertiary storage; usually tape,
                              though "devices" like the Datacomputer
                              are permissible.  The user should
                              expect to wait minutes or hours before
                              being able to access OFFLINE files.

   LINE PRINTER or LPT:       Any available line-printer.

   DOCUMENT PRINTER or DOC:   Upper/lower case line printer,
                              preferably with 8 1/2" X 11" unlined
                              paper.

   PAPER TAPE READER or PTR:  Paper tape reader.

   PAPER TAPE PUNCH or PTP:   Paper tape punch.

   CARD PUNCH or PUN:         Standard 80-column card punch.

   CARD READER or RDR:        Standard 80-column card reader.

   OPERATOR or OPR:           System Operator's console.

   CONSULTANT or CON:         On-line consultant.


DEFAULTS FOR PATHNAME <DATA> SUBFIELDS:

   Often, the appropriate default will be the last-used value.  However,
   defaults will generally be context dependent.  Consequently, the
   following defaults are offered only as guidelines:

   Network:       ARPA.

   Host:          The host interpreting the NSDS.

   Peripheral:    ONLINE (DISK).

   Volume id:     Catalogued system space.

   Directory:     The user's current "working" directory, usually set
                  by the logon process.

   Filename:      None.

   Type:          None.

   Siteparm:      None.

NUMBERS

   The following scheme is recommended for specifying numbers in <h-
   field> data subfields:

      A sequence of numberic characters, optionally followed by a
      character indicating the radix.  The default radix is ten. "H"
      indicates hexadecimal; "O" (oh) indicates octal; "B" indicates
      binary; and (gratuitously) "D" indicates decimal.

   In <stru-field> data subfields, the number should be pure binary.
   Therefore, reference to a host on the Arpanet would require one 8-bit
   byte.

GENERAL COMMENTS

   The syntax is intended to be adequate for all hosts, so any given
   portion of it may be inappropriate for any given host.

      A site is expected to permit specifications in a given field if
      that site already has a way of accepting the same information.

      Having two modes of specification (highly- and semi-structured)
      may prove to be unnecessary.  They are defined here merely as a
      convenience for experimentation.

   I believe that modifications to the syntax will be graceful
   additions, rather than wholesale redesign, and thus can be deferred
   for a while.  Currently, any undefined attributes must be specified
   in a Siteparm field.

   The first version of the syntax was a mix of Tenex and Multics
   conventions.  That is:

      (Network)[Host]Peripheral:Directory>Filename.Type;Sireparm

   Through visually more attractive and generally quicker to type, it
   lacks extensibility.  For example, adding a version number as a
   standard field would be difficult.

   It is asserted (conceded) that, as long as extensibility is kept as a
   design goal, no standardized [semi-structured] syntax will be as
   pleasant to use as currently exists on some systems.

SOME SAMPLE PATHNAMES

   Pathnames in NSDS that occupy more than one line, below, do so only
   because they are too long for a single line.  Bracketed numbers
   (e.g., <8>) indicate a single byte with the number as its decimal
   value. Blanks (spaces) are indicated by <sp>.


   My message file at ISI (<DCROCKER>MESSAGE.TXT;P770404):

      Semi-structured

         %H[ISI]D<DCROCKER>F(MESSAGE>T(TXT)S/P770404/<sp>

      Highly-structured

         %%HOST<1><86>DIR<sp><8>DCROCKERFILE<7>MESSAGETYPE<3>TXTSITE<7>P
         770404<sp>

   ARP061.LAD.DOCUMENT at UCLA-CCN.  (Note the use of multiple Directory
   fields):

      Semi-structured

         %H[65]DIR[ARP061][LAD]F[DOCUMENT]<sp>

      Highly-structured

         %%HOST<1><65>DIR<sp><6>ARP061DIR<sp><3>LADFILE<8>DOCUMENT<sp>

   >udd>CompNet>Map>Mail at Mit-Multics.  (Note that the initial NSDS
   Directory <data> subfield is empty, in keeping with Multics' method
   of starting at the top of its directory structure):

      Semi-structured

         %h(540)DI[]DI[udd][CompNet]D(Map)FIL(Mail)<sp>

      Highly-structured

         %%HOST<1><44>DIR<sp><0>DIR<sp><3>uddDIR<sp><7>CompNetDIR<sp><3>
         MapFILE<4>Mail<sp>

            [ This RFC was put into machine readable form for entry ]
               [ into the online RFC archives by Alan Ford 12/99]

AI ELI5

On this page
PROBLEMEach host names files differently, so there was no common way to say exactly where a collection of bits lives on the network.
MECHANISMA Network Standard Data Specification starts with % or %% and is a series of keyed fields such as HOST, DIR and FILE, in a human-friendly form or a fixed-format machine form.
THE CATCHThe RFC defines the basic syntax and the pathname fields only, leaving other file attributes for later, and it replaces RFC 615.

§1Goals and Two Modes

A Network Standard Data Specification (NSDS) is meant to specify all the attributes of a collection of bits. The full syntax needs extended effort, so this document gives only a basic syntactic environment plus a complete syntax for the pathname, meaning the information that specifies the location of the bits. It is essentially the pathname syntax of RFC 615, changed to allow other file attributes to be added and to suit both people and processes.

There are two modes. In semi-structured mode, for humans, keywords are variable length, may be abbreviated if still distinct, and data is surrounded by delimiter characters. In highly-structured mode, for computers, keywords are fixed length and each data subfield begins with a byte count.

There is a version for people, with brackets and short names, and a version for computers, with exact sizes.

§2The Field Syntax

An NSDS begins with a flag of one percent sign (semi-structured) or two (highly-structured), then the fields, and ends with a space. Pathname fields come before any other attribute.

In the machine form each field is a 4-character keyword, a one-byte binary count and then the data. In the human form each field is a keyword followed by data between a left and right delimiter. The delimiter may be any non-alphabetic printable character not in the data, or a bracket pair. Case is irrelevant to the syntax, and pathname fields are order dependent, though defaulted ones may be omitted. Fields may repeat, so several DIR fields can describe nested directories.

Each piece of the address has a label and a value. People wrap the value in brackets, and computers say how many characters it has.

§3Pathname Keys, Devices and Defaults

The pathname keys, in order, are NETWORK, HOST, PERIPHERAL, VOLUME ID, DIRECTORY, FILE, TYPE, VERSION and SITEPARM. The SITEPARM field carries a site-specific item such as an access specification or account number, and any attribute not yet defined must go there.

The RFC reserves peripheral names such as DISK (or DSK), ONLINE, TAPE, OFFLINE, LINE PRINTER and CARD READER. Defaults are guidelines: network ARPA, the host interpreting the NSDS, peripheral ONLINE (DISK), and the user's current working directory. For numbers in human-form fields, a trailing letter gives the radix, H for hexadecimal, O for octal, B for binary and D for decimal, with ten as the default.

The address pieces go in a fixed order, from network and computer down to folder and file name, and missing pieces are filled with sensible guesses.

PATHNAME KEYS IN ORDER (RFC 645)
  • NETWORKNetwork — The network, such as ARPA, connected to the host.
  • HOSTHost — The host machine holding the bits.
  • PERIPHERALPeripheral — The device being referred to.
  • VOLUME IDVolume — The tape reel or disk pack on that device.
  • DIRECTORYDirectory — Directory pointing to the next entity named.
  • FILEFile — Basic name of the file.
  • TYPEType — Optional modifier to the file name.
  • VERSIONVersion — Optional version, usually a number.
  • SITEPARMSite parameter — A site-specific item such as an account number.

§4Sample Pathnames

The RFC shows the same file in both modes. A message file at ISI is written %H[ISI]D<DCROCKER>F(MESSAGE>T(TXT)S/P770404/ followed by a space in the semi-structured form. A file at UCLA-CCN uses several DIR fields, one for each directory level, and a Multics example starts with an empty directory value to mean the top of its directory structure.

The author notes that an earlier first version mixed Tenex and Multics conventions and was easier to type but lacked extensibility, so it was dropped.

The RFC writes out real file addresses both ways so you can see that they describe the same file.

§5References