Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bfs(5spp) — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

boot(1spp)

bfs(4spp)



BFS(5spp)           RISC/os Reference Manual            BFS(5spp)



NAME
     bfs - description of the boot file server protocol

SYNOPSIS
     #include <saio/bfs.h>

DESCRIPTION
     The bfs protocol is spoken between the bfs protocol module
     of the standalone library and the UMIPS program bfsd(8).
     The bfs protocol allows standalone programs to read files
     across an ethernet from a host UMIPS system.  The bfs proto-
     col is layer on top of the UDP, IP, and ARP protocols and
     relies upon them for establishing datagram service with the
     bfsd server.

     The format of a bfs packet header is:
     struct bfshdr {
          char bh_rev;        /* protocol revision */
          char bh_type;  /* packet type */
          u_short bh_pathlen; /* pathname length */
          short     bh_datalen;    /* data length */
          short     bh_pad;        /* pad to int boundry */
          u_int     bh_offset;     /* file offset */
          int  bh_flags; /* open flags to use */
          char bh_server[BFS_MAXSERVER+1]; /* server */
     };
     A bfs packet consists of a bfs packet header followed by a
     null-terminated UNIX file pathname followed by data.  The
     bfs header fields have the following uses:

     bhrev
          Defines a protocol revision level, currently on revi-
          sion level 1 is supported.

     bhtype
          Indicates the type of packet.  Packet types are
          described below.

     bhpathlen
          Indicates the length in bytes of the UNIX file path-
          name, which follows immediately after the bfs header.

     bhdatalen
          Indicates the length in bytes of the data, which fol-
          lows immediately after the pathname.

     bhpad
          Two bytes of fill to maintain data alignment require-
          ments of the R2000.  The contents is always ignored by
          bfs protocol participants.

     bhoffset



                         Printed 1/6/92                    Page 1





BFS(5spp)           RISC/os Reference Manual            BFS(5spp)



          The file offset for data transfer requests.

     bhflags
          Flag indicating if the file is to be opened for reading
          (0), writing (1), or both (2).

     bhserver
          Filled in by the server to indicate to the standalone
          program the host satisfying the request.

     The following bfs packet types are defined:

     BFSPTENQUIRE
          An enquire packet is broadcast by the standalone system
          to determine systems that can serve the file indicated
          by the UNIX pathname after the bfs header.  The path-
          name may be preceded by a hostname and a colon to res-
          trict the request to a single host.  The bhflags indi-
          cates read/write intentions.  Currently, writing files
          via bfs is not supported.  The bhpathlen field indi-
          cates the length of the pathname.  The bhdatalen,
          bhoffset, and bhserver fields are undefined.

     BFSPTENQRPY
          Sent by a bfsd in reply to an BFSPTENQUIRE packet if
          the bfsd can serve the file.  The bhpathlen and UNIX
          pathname are returned identically to the request.  The
          bhserver field is filled with the name of the host on
          which bfsd is running.

     BFSPTREAD
          Sent by a standalone program to an appropriate bfsd
          server determined by enquiry.  The BFSPTREAD packet
          maintains the UNIX pathname of the file to be served
          after the bfs packet header and has the length of the
          pathname in the bhpathlen field.  The bhoffset field
          indicates the offset into the file at which the data
          transfer should begin.  The bhdatalen field indicates
          the amount of desired.  The data length must be less
          than or equal to 1024 bytes.

     BFSPTRDRPY
          Sent by a bfsd server in response to a BFSPTREAD
          packet.  The BFSPTRDRPY packet maintains the UNIX
          pathname of the file to be served after the bfs packet
          header and has the length of the pathname in the
          bhpathlen field.  The bhoffset field indicates the
          offset into the file at which the data transfer began.
          The bhdatalen field indicates the amount of data actu-
          ally in the packet.  The data length must be less than
          or equal to 1024 bytes.  The bhdatalen field may be
          less than the amount requested in the BFSPTREAD



 Page 2                  Printed 1/6/92





BFS(5spp)           RISC/os Reference Manual            BFS(5spp)



          packet.  A bhdatalen of zero indicates end of file; a
          bhdatalen of -1 indicates an error on attempting to
          read the requested data.

     BFSPTERROR
          A BFSPTERROR packet may be sent by a bfsd server to
          indicate the nature of an error in attempting to
          respond to a BFSPTREAD request.  It should be followed
          by a BFSPTRDRPY packet with a data length of -1.  The
          BFSPTERROR should maint maintain the UNIX pathname of
          the file to being served after the bfs packet header
          and have the length of the pathname in the bhpathlen
          field.  The error message to be sent to the standalone
          program should appear after the pathname and be null-
          terminated.  The length of the error message should be
          assigned to the bhdatalen field.

SEE ALSO
     boot(1spp), bfs(4spp)




































                         Printed 1/6/92                    Page 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026