Procedure 8

Read Names

capability

 

pathname length

 

pathname

 

cookie

count

REQUEST

If the access capability is valid those names identified to the server by pathname are returned with a total size of up to count bytes.

success = 0

valid = true

name length

 

name

 

entry type

cookie

:

valid = false

eod

RESPONSE - success

Each entry contains the name of the spectrum or file, the type of file and a cookie which is an opaque pointer to the next entry.
The cookie can be used in the next Read Names call to get more entries starting at a given point. The special cookie zero (all bits zero) can be used to get the entries starting at the beginning.
valid is used to mark the end of the entries.
eod has a value of TRUE if there are no more names to be returned and FALSE if there are more.

1

spectrum

2

directory file

entry type

procedure status

RESPONSE - failure

procedure status which is non zero indicates the cause of the failure.

3

invalid capability

4

invalid pathname

5

invalid parameter value

7

pathname not a directory

procedure status

XDR Specification

procedure   ReadNames (cap, path, k, n)   returns(reply)
            capability   cap;
            pathname   path;
            cookie   k;
            unsigned   n;

            union switch (stat status)  {
                OK:
                typedef   union switch (boolean valid)  {
                   TRUE:
                   struct {
                      string   name <255>;
                      unsigned   entrytype;
                      cookie   kk;
                      entry   nextentry;
                   }
                   FALSE:
                   struct {}
                } entry;
                boolean   eod;
                default:
                struct   {}
            }  reply;

Implementation

For on-line spectrum servers which have only a single level name structure pathname should be a null length string and all names known to the server will be returned. For off-line spectrum servers (ie disc-based spectra) pathname must define a directory file and the names of the spectrum files and directory files within that directory will be returned. All other files will be ignored.