There are two components in the Mini Service Location implementation: The mslpd and mslplib. Configuration properties which are implemented in Mini SLP are:
Properties which begin with "com.sun" are not part of the SLP API. Logging of Errors occurs whether or not the logging properties have been set. Note that Boolean properties are False if they are not defined. They are only True if the property has been defined to be "TRUE". For the mslpd, net.slp.useScopes may either be left as "default" or given a specific value. For mslplib, it is different - see below.
The mslpd is the SA, a network daemon. It loads with a serialized registration file and optionally a configuration file. Both the serialized registration file and the configuration file conform to the format specified in the API Internet Draft. The configuration file is further described in the source code modules where they used:
The mslpd is configured by providing it with a command line option pointing it to the configuration file:
An example configuration file follows:
This would be a useful configuration file for a 'remote client' which is not able to discover DAs using multicast. The DAs are labeled according to the scopes they support. A request specifying the SALES scopes would be sent to da1 or da2 but not da3. The registration file could be:
This configuration file advertises four services for the host pr.foo.org. It has lpr, fingerd, imap services and a phone list that can be accessed through http. Note that the lpr service is registered as an abstract printer service type. It can be discovered by requesting a printer that supports the LPR protocol and has na-letter sized paper, in the scopes supported by the mslpd that reads this file. The fingerd service is explicitely registered in the 'eng' scope. The mslpd would have to be configured with at least this scope or else it would reject this non-default scope registration. A phone list is available using http, but is advertised using a service type with a private naming authority (foo.org). The scope is NY, for folks looking for a phone list in the New York office. An IMAP server is advertised here. Any of the users on the list could find this server by searching for IMAP servers which support them, for example "(user=ratbert)" would find this server. The mslplib is configured using the SLP API, which includes three functions for this purpose:
The final interface is not part of the SLP API Internet Draft, but I added it since it was useful to me and I already had the code. The SLPSetProperty interface can be used to clear a property. To do this simply pass NULL to the pcValue parameter. Caution: Clearing arbitrary configuration properties can make the implementation crash. There are some safeguards against this, but there are some properties which must be set. These include net.slp.MTU, net.slp.multicastMaximumWait, net.slp.multicastTTL and net.slp.locale. Configuration options which have been implemented for the mslplib is the same as for the mslpd, with the exception of the net.slp.useScopes property. net.slp.useScopes can be defined in three ways:
The 'User' scope model allows SLPv2 to have the same behavior as the Macintosh chooser, when it lists the available AppleTalk zones, or the Windows LanManager browsers, which list available workgroups and domains. The default behavior of SLP is to allow UAs to discover only a subset of services on the network. This is controlled by setting the scope to equal those services a user is intended to be able to make use of. The 'User' scope model, on the other hand, provides the user with the ability to see all scopes on the network and select services from them. Note: Support for user configurable scopes is optional and by default it is not compiled when mslplib is built. See Mini Service Location Protocol Building Instructions. One important thing to note about mslplib's configuration is that it is per process. That is, if one process opens SLPHandles with the SLPOpen API, all configuration changes made for any one of the handles applies to all of them. For example, the following effectively changes the scopes of the UA as a whole.
|
© Sun Microsystems, 1998. Send comments to: Erik Guttman |