**
SSPLIB

The BCPL source library obtained by GET "BCPL.SSPLIB" contains routines for
performing ring SSP calls, name lookups in the nameserver, and reverse name
lookups.  The header "RINGHDR" should be got first.

Another SSP library, compatible with that developed on RSX is available
in the SOURCELIB libraries (use HELP SOURCELIB RINGSSP)

The routines are:

SSP                Perform a Single Shot Protocol call to a ring service.

LOOKUP.NAME        Look up a text name in the nameserver to yield a ring 
                   address.

GLOBAL.LOOKUP      Gives info on non-local names, and does not set up bridge 
                   path

GENERAL.LOOKUP     Does a local or global nameserver lookup, switched by a 
                   parameter

WRITE.MACHINE.NAME Write out the name of a machine from its ring station 
                   number.

------------------------
result := SSP(SERVICE.NAME, TXBUFF, TXWORDS, RXBUFF, RXWORDS, NSVEC,
              FUNC, STATION, PORT)

  Do an SSP transaction to the named service.
  The data part of the basic block to be transmitted is in TXBUFF,
  with the SSP arguments starting at (ring word) offset 3.
  TXBUFF is TXWORDS ring words long in total.
  RXBUFF is a buffer for the data part of the reply basic block.
  It is RXWORDS ring words long.
  NSVEC is a 4-word vector in which the results of the nameserver lookup
  of SERVICE.NAME are returned.  If zero is passed in this parameter the
  routine will use its own vector and discard the address on exit.
  FUNC is used as the function code iff the service is one with
  no specified function code.

  SERVICE.NAME may be zero instead of a string.  In this case,
  the machine address and port of the service should be supplied
  in STATION and PORT, and the function code in FUNC.

  The result is TRUE if the transaction is completely successful,
  FALSE otherwise (error code in RESULT2).

------------------------
result := LOOKUP.NAME(STRING, RESVEC)

  Uses the name server to look up the given string.

  Result TRUE => success:
    resvec!0 = station number
    resvec!1 = flags
    resvec!2 = port number
    resvec!3 = function code

  Result FALSE => failure:  reason in result2

------------------------
result := GLOBAL.LOOKUP(STRING, RESVEC, NEWNAME.LEN, NEWNAME)

  Uses the nameserver global lookup to look up the given string.

  Result TRUE => success:
    resvec!0 = station number
    resvec!1 = flags
    resvec!2 = port number
    resvec!3 = function code
    resvec!4 = site
    resvec!5 = subnet
    If NEWNAME.LEN is nonzero then the transformed name string returned by
    the nameserver will be filled into buffer NEWNAME up to the specified
    number of characters.  If too long it will be truncated and an error
    indicated.

  Result FALSE => failure:  reason in result2

------------------------
result := GENERAL.LOOKUP(TYPE, STRING, RESVEC, NEWNAME.LEN, NEWNAME)

  This is the procedure used by LOOKUP.NAME and GLOBAL.LOOKUP.  It will
  perform either type, under the control of the TYPE parameter, which should
  be set to GL.LOCAL or GL.GLOBAL (these are manifests in RINGHDR).

  If the lookup is local then the site and subnet fields in RESVEC are not
  affected, but the transformed name is dealt with as for GLOBAL.LOOKUP.

------------------------
length := WRITE.MACHINE.NAME(ID)

  Uses the name server to look up the given station number,
  and write out the machine name returned.
  If the nameserver call fails for any reason, the machine
  name is written out as "station <n>".
  The result of the call is the number of characters written.
   

