SAP library
One of the design goals for NetWare® transports for the
UNIX® environment has been to provide an easy to use
application programming interface for NetWare service
advertising and service queries.
The SAP library has been written to accomplish this goal.
The SAP library provides functionality in
two modes. The mode used by the library is dependent
upon the status of the NetWare SAP daemon
(SAPD).
-
If the SAP daemon is not active,
the SAP library is unable to advertise
any services to the network.
In this mode, all service queries are handled by
passing the request to the network and processing
the responses.
-
If the SAP daemon is active, all of the
SAP library functions are supported.
In this mode, the SAP library is an Inter
Process Communication (IPC) library designed
for processes running on the same platform as the
NetWare protocol stack. It provides fast and convenient
access to the information that the SAP daemon
maintains.
As these functions become part of the Application
Programming Interface (API) and Transport
products, application developers can use them for
the following tasks:
-
Obtaining SAP information
-
Authorizing the SAP daemon to advertise an application server
-
Informing the SAP daemon that the application server is going down
For example, SAP implementations for UNIX processes,
such as the Server Advertiser daemon and the Print Server daemon,
use these functions.
With the SAP daemon running, none of the SAP
library query functions send SAP packets out on the wire;
they all obtain their information directly from tables maintained
by the SAP daemon in a mapped memory region.
Those functions that use mapped memory automatically attach
to the mapped memory region at the beginning of each call and
detach at the end of the call.
For those processes that desire multiple accesses to the
SAP information, SAPMapMemory allows
the process to attach to the mapped memory region and
remain attached to the mapped memory region until a
detach function is used.
All functions in the SAP library use this
mapped memory region except for the following:
-
SAPAdvertiseMyServer
-
SAPNotifyOfChange
-
Advertise Service
-
ShutdownSAP
The functions that use the mapped memory region can
only read information; they cannot update or write to it.
Hence, the functions that require the updating of information
(the four functions listed above) do not use the
mapped memory region.
© 1999 The Santa Cruz Operation, Inc. All rights reserved.
UnixWare 7 Release 7.1 - 19 March 1999