Service advertising protocol (SAP)

How SAP works

SAP is responsible for maintaining a list of servers and services on an internetwork which it then advertises. The easiest way to understand Service Advertising is to liken the Server Information Table to a telephone directory. NetWare clients must first have the number (address) of a service before they can initiate a session with that service.

When a NetWare server first comes up, it sends out a broadcast packet with its server information stored in the Server Information Structure. This packet informs the SAP agent that the server is now available. The SAP agent uses the information in the packet to add the server to its Server Information Table and then echoes the information to other SAP agents on the internetwork.

SAP also provides a way to terminate Service Advertising. When a server goes down, it sends a packet indicating the service is no longer available.

After the server's initial broadcast packet, the server is then responsible for sending out a periodic broadcast (every 60 seconds) to let the SAP agents know that its services are still available.

Any server or service that does not send a periodic broadcast packet within three minutes is presumed ``downed.'' That server's information is then removed from the SAP agent's table, and the SAP agent sends out a broadcast indicating that the server is down.

In this way, SAP agents use the arrival or non-arrival of these broadcast packets to keep their Server Information Tables up-to-date.

``Dynamic registering of services'' illustrates how a SAP agent uses broadcast packets to keep the Server Information Table up-to-date and how it provides query and response service.

Dynamic registering of services

When a SAP agent is initialized, it binds to IPX(TM) socket 0x0452 and sends a request (in the form of a SAP packet) for all SAP agents to send their server information. The SAP agent then builds a Server Information Table from the reply packets. Every 60 seconds, SAP agents send local broadcasts of the server information for which they are the best or only source for a network. If a new server sends out a SAP packet saying that it is available, the SAP agent verifies that this server is not in its Server Information Table. The SAP agent then adds this server to its Server Information Table and echoes this new server information to all connected networks. Servers loaded on a UNIX machine can make the SAP daemon responsible for their advertising duties. The SAPAdvertiseMyServer function (described in SAPAdvertiseMyServer(3sapd)) adds the information for such servers to the SAP daemon's tables. Their broadcasts are sent out with the SAP daemon's broadcasts until one of the following occurs:

For example, a NetWare server, an NVT2 (Novell Virtual Terminal) server, and an NDS (NetWare Directory Services) server all notify the SAP daemon when they come up. The SAP daemon then performs the advertising. The Print Server (shown in the Server Information Table in ``Dynamic registering of services'') also uses the SAP daemon for advertising.

A server can also notify SAP that it is a Permanent Service server, in which case it is automatically re-advertised after the system boots.


© 1999 The Santa Cruz Operation, Inc. All rights reserved.
UnixWare 7 Release 7.1 - 19 March 1999