'\" te
.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH SLP_API 3SLP "Jan 16, 2003"
.SH NAME
slp_api \- Service Location Protocol Application Programming Interface
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-l\fRslp  [ \fIlibrary\fR ... ]
#include <slp.h>
.fi

.SH DESCRIPTION
.sp
.LP
The \fBslp_api\fR is a C  language  binding  that  maps directly into the
Service  Location Protocol ("\fBSLP\fR") defined  by  \fIRFC 2614\fR. This
implementation requires minimal overhead. With  the exception  of the
\fBSLPDereg()\fR and \fBSLPDelAttrs()\fR functions,  which  map into  different
uses  of  the  \fBSLP\fR deregister  request, there is  one C  language
function  per protocol  request.   Parameters are for the most part character
buffers.  Memory management is kept simple because the client allocates most
memory and client callback functions are required to copy incoming parameters
into memory allocated by the client code. Any memory returned directly from the
\fBAPI\fR functions is deallocated using the \fBSLPFree()\fR function.
.sp
.LP
To conform with standard C practice, all character strings passed to and
returned through the \fBAPI\fR are null-terminated, even though the \fBSLP\fR
protocol does not use null-terminated strings.  Strings passed as parameters
are \fBUTF-8\fR but they may still be passed as a C string (a null-terminated
sequence of bytes.)  Escaped characters must be encoded by the \fBAPI\fR client
as \fBUTF-8\fR.  In the common case of \fBUS-ASCII\fR, the usual one byte per
character C strings work.  \fBAPI\fR functions assist in escaping and
unescaping strings.
.sp
.LP
Unless otherwise noted, parameters to \fBAPI\fR functions and callbacks are
non-\fINULL\fR. Some parameters may have other restrictions.  If any parameter
fails to satisfy the restrictions on its value, the operation returns a
\fBPARAMETER_BAD\fR error.
.SS "Syntax for String Parameters"
.sp
.LP
Query strings, attribute registration lists, attribute deregistration lists,
scope lists, and attribute selection lists follow the syntax described in
\fIRFC 2608\fR. The \fBAPI\fR reflects the strings passed from clients directly
into protocol  requests, and reflects out strings returned from protocol
replies directly to clients. As a consequence, clients are responsible for
formatting request strings, including escaping and converting opaque values to
escaped byte-encoded strings. Similarly, on output, clients are required  to
unescape strings and convert escaped string-encoded opaques to binary. The
\fBSLPEscape()\fR and \fBSLPUnescape()\fR functions can be used for escaping
\fBSLP\fR reserved characters, but they perform no opaque processing.
.sp
.LP
Opaque values consist of a character buffer that contains a \fBUTF-8\fR-encoded
string, the first characters of which are the non \fBUTF-8\fR encoding
"\fB\ff\fR". Subsequent characters are the escaped values for the original
bytes in the opaque.  The escape convention is relatively simple. An escape
consists of a backslash followed by the two hexadecimal digits encoding the
byte. An example is "\fB\2c\fR" for the byte \fB0x2c\fR. Clients handle opaque
processing themselves, since the algorithm is relatively simple and uniform.
.SS "System Properties"
.sp
.LP
The system properties established in \fBslp.conf\fR(4), the configuration file,
are accessible through the \fBSLPGetProperty()\fR and \fBSLPSetProperty()\fR
functions. The \fBSLPSetProperty()\fR function modifies properties only in the
running process, not in the configuration file. Errors are checked when the
property is used and, as with parsing the configuration file, are logged at the
\fBLOG_INFO\fR priority. Program execution continues without interruption by
substituting the default for the erroneous parameter. In general, individual
agents should rarely be required to override these properties, since they
reflect properties of the \fBSLP\fR network that are not  of concern to
individual agents. If changes are required, system administrators should modify
the configuration file.
.sp
.LP
Properties are global to the process, affecting all threads and all handles
created with \fBSLPOpen()\fR.
.SS "Memory Management"
.sp
.LP
The only \fBAPI\fR functions that return memory specifically requiring
deallocation on the part of the client are \fBSLPParseSrvURL()\fR,
\fBSLPFindScope()\fR, \fBSLPEscape()\fR, and \fBSLPUnescape()\fR. Free this
memory with \fBSLPFree()\fR when it is no longer needed. Do not free character
strings returned by means of the \fBSLPGetProperty()\fR function.
.sp
.LP
Any memory passed to callbacks belongs to the library, and it must not be
retained by the client code. Otherwise, crashes are possible. Clients must copy
data out of the callback parameters. No other use of the memory in callback
parameters is allowed.
.SS "Asynchronous and Incremental Return Semantics"
.sp
.LP
If a handle parameter to an \fBAPI\fR function is opened asynchronously, the
\fBAPI\fR function calls on the handle to check the other parameters, opens the
appropriate operation, and returns immediately. If an error occurs in the
process of starting the operation, the error code is returned. If the handle
parameter is opened synchronously, the function call is blocked until all
results are available, and it returns only after the results are reported
through the callback function. The return code indicates whether any errors
occurred during the operation.
.sp
.LP
The callback function is called whenever the \fBAPI\fR library has results to
report. The callback code is required to check the error code parameter before
looking at the other parameters. If the error code is not \fBSLP_OK\fR, the
other parameters  may be \fINULL\fR or otherwise invalid. The \fBAPI\fR library
can terminate any outstanding operation on which an error occurs. The callback
code can similarly indicate that the operation should be terminated by passing
back \fBSLP_FALSE\fR to indicate that it is not interested in receiving more
results. Callback functions are not permitted to recursively call into the
\fBAPI\fR on the same \fBSLPHandle\fR. If an attempt is made to call into the
\fBAPI\fR, the \fBAPI\fR function returns \fBSLP_HANDLE_IN_USE\fR. Prohibiting
recursive callbacks on the same handle simplifies implementation of thread safe
code, since locks held on the handle will not be in place during a second
outcall on the handle.
.sp
.LP
The total number of results received can be controlled by setting the
\fBnet.slp.maxResults\fR parameter.
.sp
.LP
On the last call to a callback, whether asynchronous or synchronous, the status
code passed to the callback has value \fBSLP_LAST_CALL\fR. There are four
reasons why the call can terminate:
.sp
.ne 2
.na
\fBDA reply received\fR
.ad
.RS 26n
A reply from a \fBDA\fR has been received and therefore nothing more is
expected.
.RE

.sp
.ne 2
.na
\fBMulticast terminated\fR
.ad
.RS 26n
The multicast convergence time has elapsed and the \fBAPI\fR library multicast
code is giving up.
.RE

.sp
.ne 2
.na
\fBMulticast null results\fR
.ad
.RS 26n
Nothing new has been received during multicast for awhile and the \fBAPI\fR
library multicast code is giving up on that (as an optimization).
.RE

.sp
.ne 2
.na
\fBMaximum results\fR
.ad
.RS 26n
The user has set the \fBnet.slp.maxResults\fR property and that number of
replies has been collected and returned.
.RE

.SS "Configuration Files"
.sp
.LP
The \fBAPI\fR library reads \fBslp.conf\fR(4), the default configuration file,
to obtain the operating parameters. You can specify the location of this file
with the \fBSLP_CONF_FILE\fR environment variable. If you do not set this
variable, or the file it refers to is invalid, the \fBAPI\fR will use the
default configuration file at \fB/etc/inet/slp.conf\fR instead.
.SS "Data Structures"
.sp
.LP
The data structures used by the \fBSLP\fR \fBAPI\fR are as follows:
.SS "The URL Lifetime Type"
.sp
.in +2
.nf
typedef enum {
     SLP_LIFETIME_DEFAULT = 10800,
     SLP_LIFETIME_MAXIMUM = 65535
} SLPURLLifetime;
.fi
.in -2

.sp
.LP
The enumeration \fBSLPURLLifetime\fR  contains  \fBURL\fR  lifetime values, in
seconds, that are frequently used. \fBSLP_LIFETIME_DEFAULT\fR is 3 hours, while
\fBSLP_LIFETIME_MAXIMUM\fR is  18 hours, which corresponds to the maximum size
of the \fBlifetime\fR field in \fBSLP\fR messages. Note that on registration
\fBSLP_LIFETIME_MAXIMUM\fR causes the advertisement to be continually
reregistered until the process exits.
.SS "The SLPBoolean Type"
.sp
.in +2
.nf
typedef enum {
     SLP_FALSE = 0,
     SLP_TRUE = 1
} SLPBoolean;
.fi
.in -2

.sp
.LP
The enumeration \fBSLPBoolean\fR is used as a Boolean flag.
.SS "The Service URL Structure"
.sp
.in +2
.nf
typedef struct srvurl {
     char *s_pcSrvType;
     char *s_pcHost;
     int   s_iPort;
     char *s_pcNetFamily;
     char *s_pcSrvPart;
} SLPSrvURL;
.fi
.in -2

.sp
.LP
The \fBSLPSrvURL\fR structure is filled in by the \fBSLPParseSrvURL()\fR
function with information parsed from a character buffer containing a service
\fBURL\fR. The fields correspond to different parts of the \fBURL\fR, as
follows:
.sp
.ne 2
.na
\fB\fBs_pcSrvType\fR\fR
.ad
.RS 17n
A pointer to a character string containing the service type name, including
naming authority.
.RE

.sp
.ne 2
.na
\fB\fBs_pcHost\fR\fR
.ad
.RS 17n
A pointer to a character string containing the host identification information.
.RE

.sp
.ne 2
.na
\fB\fBs_iPort\fR\fR
.ad
.RS 17n
The port number, or zero, if none. The port is only available if the transport
is \fBIP\fR.
.RE

.sp
.ne 2
.na
\fB\fBs_pcNetFamily\fR\fR
.ad
.RS 17n
A pointer to a character string containing the network address family
identifier. Possible values are "\fBipx\fR" for the \fBIPX\fR family,
"\fBat\fR" for the Appletalk family, and \fB""\fR, the empty string, for the
\fBIP\fR address family.
.RE

.sp
.ne 2
.na
\fB\fBs_pcSrvPart\fR\fR
.ad
.RS 17n
The remainder of the \fBURL\fR, after the host identification.
.sp
The host and port should be sufficient to open a socket to the machine hosting
the service; the remainder of the \fBURL\fR should allow further
differentiation of the service.
.RE

.SS "The SLPHandle"
.sp
.in +2
.nf
typedef void* SLPHandle;
.fi
.in -2

.sp
.LP
The \fBSLPHandle\fR type is returned by \fBSLPOpen()\fR and is a parameter to
all \fBSLP\fR functions. It serves as a handle for all resources allocated on
behalf of the process by the \fBSLP\fR library. The type is opaque.
.SS "Callbacks"
.sp
.LP
Include a function pointer to a callback function specific to a particular
\fBAPI\fR operation in the parameter list when the \fBAPI\fR function is
invoked. The callback function is called with the results of the operation in
both the synchronous and asynchronous cases.  When the callback function is
invoked, the memory included in the callback parameters is owned by the
\fBAPI\fR library, and the client code in the callback must copy out the
contents if it wants to maintain the information longer than the duration of
the current callback call.
.sp
.LP
Each callback parameter list contains parameters for reporting the results of
the operation, as well as an error code parameter and a cookie parameter. The
error code parameter reports the error status of the ongoing (for asynchronous)
or completed (for synchronous) operation. The cookie parameter allows the
client code that starts the operation by invoking the \fBAPI\fR function to
pass information down to the callback without using global variables. The
callback returns an \fBSLPBoolean\fR to indicate whether the \fBAPI\fR library
should continue processing the operation. If the value returned from the
callback is \fBSLP_TRUE\fR, asynchronous operations are terminated. Synchronous
operations ignore the return since the operation is already complete.
.SS "\fBSLPRegReport()\fR"
.sp
.in +2
.nf
typedef void SLPRegReport(SLPHandle hSLP,
     SLPError errCode,
     void *pvCookie);
.fi
.in -2

.sp
.LP
\fBSLPRegReport()\fR is the callback function to the \fBSLPReg()\fR,
\fBSLPDereg()\fR, and \fBSLPDelAttrs()\fR functions. The \fBSLPRegReport()\fR
callback has the following parameters:
.sp
.ne 2
.na
\fB\fIhSLP\fR\fR
.ad
.RS 12n
The\fBSLPHandle()\fR used to initiate the operation.
.RE

.sp
.ne 2
.na
\fB\fIerrCode\fR\fR
.ad
.RS 12n
An error code indicating if an error occurred during the operation.
.RE

.sp
.ne 2
.na
\fB\fIpvCookie\fR\fR
.ad
.RS 12n
Memory passed down from the client code that called the original \fBAPI\fR
function, starting the operation. It may be \fINULL\fR.
.RE

.SS "\fBSLPSrvTypeCallback()\fR"
.sp
.in +2
.nf
typedef SLPBoolean SLPSrvTypeCallback(SLPHandle hSLP,
     const char* pcSrvTypes,
     SLPError errCode,
     void *pvCookie);
.fi
.in -2

.sp
.LP
The \fBSLPSrvTypeCallback()\fR type is the type of the callback function
parameter to the \fBSLPFindSrvTypes()\fR function. The results are collated
when the \fIhSLP\fR handle is opened either synchronously or asynchronously.
The \fBSLPSrvTypeCallback()\fR callback has the following parameters:
.sp
.ne 2
.na
\fB\fIhSLP\fR\fR
.ad
.RS 14n
The \fBSLPHandle\fR used to initiate the operation.
.RE

.sp
.ne 2
.na
\fB\fIpcSrvTypes\fR\fR
.ad
.RS 14n
A character buffer containing a comma-separated, null-terminated list of
service types.
.RE

.sp
.ne 2
.na
\fB\fIerrCode\fR\fR
.ad
.RS 14n
An error code indicating if an error occurred during the operation. The
callback should check this error code before processing the parameters. If the
error code is other than \fBSLP_OK\fR, then the \fBAPI\fR library may choose to
terminate the outstanding operation.
.RE

.sp
.ne 2
.na
\fB\fIpvCookie\fR\fR
.ad
.RS 14n
emory passed down from the client code that called the original \fBAPI\fR
function, starting the operation. It can be \fINULL\fR.
.RE

.SS "SLPSrvURLCallback"
.sp
.in +2
.nf
typedef SLPBoolean SLPSrvURLCallback(SLPHandle hSLP,
     const char* pcSrvURL,
     unsigned short usLifetime,
     SLPError errCode,
     void *pvCookie);
.fi
.in -2

.sp
.LP
The \fBSLPSrvURLCallback()\fR type is the type of the callback function
parameter to the \fBSLPFindSrvs()\fR function. The results are collated,
regardless of whether the \fIhSLP\fR was opened collated or uncollated. The
\fBSLPSrvURLCallback()\fR callback has the following parameters:
.sp
.ne 2
.na
\fB\fIhSLP\fR\fR
.ad
.RS 14n
The \fBSLPHandle\fR used to initiate the operation.
.RE

.sp
.ne 2
.na
\fB\fIpcSrvURL\fR\fR
.ad
.RS 14n
A character buffer containing the returned service \fBURL\fR.
.RE

.sp
.ne 2
.na
\fB\fIusLifetime\fR\fR
.ad
.RS 14n
An unsigned short giving the life time of the service advertisement. The value
must be an unsigned integer less than or equal to \fBSLP_LIFETIME_MAXIMUM\fR.
.RE

.sp
.ne 2
.na
\fB\fIerrCode\fR\fR
.ad
.RS 14n
An error code indicating if an error occurred during the operation. The
callback should check this error code before processing the parameters. If the
error code is other than \fBSLP_OK\fR, then the \fBAPI\fR library may choose to
terminate the outstanding operation.
.RE

.sp
.ne 2
.na
\fB\fIpvCookie\fR\fR
.ad
.RS 14n
Memory passed down from the client code that called the original \fBAPI\fR
function, starting the operation. It can be \fINULL\fR.
.RE

.SS "SLPAttrCallback"
.sp
.in +2
.nf
typedef SLPBoolean SLPAttrCallback(SLPHandle hSLP,
     const char* pcAttrList,
     SLPError errCode,
     void *pvCookie);
.fi
.in -2

.sp
.LP
The \fBSLPAttrCallback()\fR type is the type of the callback function parameter
to the \fBSLPFindAttrs()\fR function.
.sp
.LP
The behavior of the callback differs depending upon whether the attribute
request was by \fBURL\fR or by service type. If the \fBSLPFindAttrs()\fR
operation was originally called with a \fBURL\fR, the callback is called once,
in addition to the last call, regardless of whether the handle was opened
asynchronously or synchronously. The \fIpcAttrList\fR parameter contains the
requested attributes as a comma-separated list. It is empty if no attributes
match the original tag list.
.sp
.LP
If the \fBSLPFindAttrs()\fR operation was originally called with a service
type, the value of \fIpcAttrList\fR and the calling behavior depend upon
whether the handle was opened asynchronously or synchronously. If the handle
was opened asynchronously, the callback is called every time the \fBAPI\fR
library has results from a remote agent. The \fIpcAttrList\fR parameter is
collated between calls, and contains a comma-separated list of the results from
the agent that immediately returned. If the handle was opened synchronously,
the results are collated from all returning agents, the callback is called
once, and the \fIpcAttrList\fR parameter is set to the collated result.
.sp
.LP
\fBSLPAttrCallback()\fR callback has the following parameters:
.sp
.ne 2
.na
\fB\fIhSLP\fR\fR
.ad
.RS 14n
The \fBSLPHandle\fR used to initiate the operation.
.RE

.sp
.ne 2
.na
\fB\fIpcAttrList\fR\fR
.ad
.RS 14n
A character buffer containing a comma-separated and null-terminated list of
attribute id/value assignments, in \fBSLP\fR wire format.
.RE

.sp
.ne 2
.na
\fB\fIerrCode\fR\fR
.ad
.RS 14n
An error code indicating if an error occurred during the operation. The
callback should check this error code before processing the parameters. If the
error code is other than \fBSLP_OK\fR, then the \fBAPI\fR library may choose to
terminate the outstanding operation.
.RE

.sp
.ne 2
.na
\fB\fIpvCookie\fR\fR
.ad
.RS 14n
Memory passed down from the client code that called the original \fBAPI\fR
function, starting the operation. It can be \fINULL\fR.
.RE

.SH ERRORS
.sp
.LP
An interface that is part of the \fBSLP\fR \fBAPI\fR may return one of the
following values.
.sp
.ne 2
.na
\fB\fBSLP_LAST_CALL\fR\fR
.ad
.RS 30n
The \fBSLP_LAST_CALL\fR code is passed to callback functions when the \fBAPI\fR
library has no more data for them and therefore no further calls will be made
to the callback on the currently outstanding operation. The callback uses this
to signal the main body of the client code that no more data will be
forthcoming on the operation, so that the main body of the client code can
break out of data collection loops. On the last call of a callback during both
a synchronous and asynchronous call, the error code parameter has value
\fBSLP_LAST_CALL\fR, and the other parameters are all \fINULL\fR. If no results
are returned by an \fBAPI\fR operation, then only one call is made, with the
error parameter set to \fBSLP_LAST_CALL\fR.
.RE

.sp
.ne 2
.na
\fB\fBSLP_OK\fR\fR
.ad
.RS 30n
The \fBSLP_OK\fR code indicates that the no error occurred during the
operation.
.RE

.sp
.ne 2
.na
\fB\fBSLP_LANGUAGE_NOT_SUPPORTED\fR\fR
.ad
.RS 30n
No \fBDA\fR or \fBSA\fR has service advertisement information in the language
requested, but at least one \fBDA\fR or \fBSA\fR might have information for
that service in another language.
.RE

.sp
.ne 2
.na
\fB\fBSLP_PARSE_ERROR\fR\fR
.ad
.RS 30n
The \fBSLP\fR message was rejected by a remote \fBSLP\fR agent. The \fBAPI\fR
returns this error only when no information was retrieved, and at least one
\fBSA\fR or \fBDA\fR indicated a protocol error. The data supplied through the
\fBAPI\fR may be malformed or damaged in transit.
.RE

.sp
.ne 2
.na
\fB\fBSLP_INVALID_REGISTRATION\fR\fR
.ad
.RS 30n
The \fBAPI\fR may return this error if an attempt to register a service was
rejected by all \fBDA\fRs because of a malformed \fBURL\fR or
attributes.\fBSLP\fR does not return the error if at least one \fBDA\fR accepts
the registration.
.RE

.sp
.ne 2
.na
\fB\fBSLP_SCOPE_NOT_SUPPORTED\fR\fR
.ad
.RS 30n
The \fBAPI\fR returns this error if the \fBUA\fR or \fBSA\fR has been
configured with the \fBnet.slp.useScopes\fR list of scopes and the \fBSA\fR
request did not specify one or more of these allowable scopes, and no others.
It may also be returned by a \fBDA\fR if the scope included in a request is not
supported by a \fBDA\fR.
.RE

.sp
.ne 2
.na
\fB\fBSLP_AUTHENTICATION_ABSENT\fR\fR
.ad
.RS 30n
This error arises when the \fBUA\fR or \fBSA \fRfailed to send an authenticator
for requests or registrations when security is enabled and thus required.
.RE

.sp
.ne 2
.na
\fB\fBSLP_AUTHENTICATION_FAILED\fR\fR
.ad
.RS 30n
This error arises when a authentication on an \fBSLP\fR message received from a
remote \fBSLP\fR agent failed.
.RE

.sp
.ne 2
.na
\fB\fBSLP_INVALID_UPDATE\fR\fR
.ad
.RS 30n
An update for a nonexisting registration was issued, or the update includes a
service type or scope different than that in the initial registration.
.RE

.sp
.ne 2
.na
\fB\fBSLP_REFRESH_REJECTED\fR\fR
.ad
.RS 30n
The \fBSA\fR attempted to refresh a registration more frequently than the
minimum refresh interval. The \fBSA\fR should call the appropriate \fBAPI\fR
function to obtain the minimum refresh interval to use.
.RE

.sp
.ne 2
.na
\fB\fBSLP_NOT_IMPLEMENTED\fR\fR
.ad
.RS 30n
An outgoing request overflowed the maximum network \fBMTU\fR size. The request
should be reduced in size or broken into pieces and tried again.
.RE

.sp
.ne 2
.na
\fB\fBSLP_BUFFER_OVERFLOW\fR\fR
.ad
.RS 30n
An outgoing request overflowed the maximum network \fBMTU\fR size. The request
should be reduced in size or broken into pieces and tried again.
.RE

.sp
.ne 2
.na
\fB\fBSLP_NETWORK_TIMED_OUT\fR\fR
.ad
.RS 30n
When no reply can be obtained in the time specified by the configured timeout
interval, this error is returned.
.RE

.sp
.ne 2
.na
\fB\fBSLP_NETWORK_INIT_FAILED\fR\fR
.ad
.RS 30n
If the network cannot initialize properly, this error is returned.
.RE

.sp
.ne 2
.na
\fB\fBSLP_MEMORY_ALLOC_FAILED\fR\fR
.ad
.RS 30n
If the \fBAPI\fR fails to allocate memory, the operationis aborted and returns
this.
.RE

.sp
.ne 2
.na
\fB\fBSLP_PARAMETER_BAD\fR\fR
.ad
.RS 30n
If a parameter passed into an interface is bad, this  error is returned.
.RE

.sp
.ne 2
.na
\fB\fBSLP_NETWORK_ERROR\fR\fR
.ad
.RS 30n
The failure of networking during normal operations causes this error to be
returned.
.RE

.sp
.ne 2
.na
\fB\fBSLP_INTERNAL_SYSTEM_ERROR\fR\fR
.ad
.RS 30n
A basic failure of the \fBAPI\fR causes this error to be returned. This occurs
when a system call or library fails. The operation could not recover.
.RE

.sp
.ne 2
.na
\fB\fBSLP_HANDLE_IN_USE\fR\fR
.ad
.RS 30n
In the C \fBAPI\fR, callback functions are not permitted to recursively call
into the \fBAPI\fR on the same \fBSLPHandle\fR, either directly or indirectly.
If an attempt is made to do so, this error is returned from the called
\fBAPI\fR function
.RE

.SH LIST OF ROUTINES
.sp
.ne 2
.na
\fB\fBSLPOpen()\fR\fR
.ad
.RS 27n
open an \fBSLP\fR handle
.RE

.sp
.ne 2
.na
\fB\fBSLPClose()\fR\fR
.ad
.RS 27n
close an open \fBSLP\fR handle
.RE

.sp
.ne 2
.na
\fB\fBSLPReg()\fR\fR
.ad
.RS 27n
register a service advertisement
.RE

.sp
.ne 2
.na
\fB\fBSLPDereg()\fR\fR
.ad
.RS 27n
deregister a service advertisement
.RE

.sp
.ne 2
.na
\fB\fBSLPDelAttrs()\fR\fR
.ad
.RS 27n
delete attributes
.RE

.sp
.ne 2
.na
\fB\fBSLPFindSrvTypes()\fR\fR
.ad
.RS 27n
return service types
.RE

.sp
.ne 2
.na
\fB\fBSLPFindSrvs()\fR\fR
.ad
.RS 27n
return service URLs
.RE

.sp
.ne 2
.na
\fB\fBSLPFindAttrs()\fR\fR
.ad
.RS 27n
return service attributes
.RE

.sp
.ne 2
.na
\fB\fBSLPGetRefreshInterval()\fR\fR
.ad
.RS 27n
return the maximum allowed refresh interval for \fBSA\fRs
.RE

.sp
.ne 2
.na
\fB\fBSLPFindScopes()\fR\fR
.ad
.RS 27n
return list of configured and discovered scopes
.RE

.sp
.ne 2
.na
\fB\fBSLPParseSrvURL()\fR\fR
.ad
.RS 27n
parse service \fBURL\fR
.RE

.sp
.ne 2
.na
\fB\fBSLPEscape()\fR\fR
.ad
.RS 27n
escape special characters
.RE

.sp
.ne 2
.na
\fB\fBSLPUnescape()\fR\fR
.ad
.RS 27n
translate escaped characters into \fBUTF-8\fR
.RE

.sp
.ne 2
.na
\fB\fBSLPGetProperty()\fR\fR
.ad
.RS 27n
return \fBSLP\fR configuration property
.RE

.sp
.ne 2
.na
\fB\fBSLPSetProperty()\fR\fR
.ad
.RS 27n
set an \fBSLP\fR configuration property
.RE

.sp
.ne 2
.na
\fB\fBslp_strerror()\fR\fR
.ad
.RS 27n
map \fBSLP\fR error code to message
.RE

.sp
.ne 2
.na
\fB\fBSLPFree()\fR\fR
.ad
.RS 27n
free memory
.RE

.SH ENVIRONMENT VARIABLES
.sp
.LP
When \fBSLP_CONF_FILE\fR is set, use this file for configuration.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
CSI	CSI-enabled
_
MT-Level	Safe
.TE

.SH SEE ALSO
.sp
.LP
\fBslpd\fR(1M), \fBslp.conf\fR(4), \fBslpd.reg\fR(4), \fBattributes\fR(5)
.sp
.LP
\fISystem Administration Guide: Network Services\fR
.sp
.LP
Guttman, E., Perkins, C., Veizades, J., and Day, M. \fIRFC 2608, Service
Location Protocol, Version 2\fR. The Internet Society. June 1999.
.sp
.LP
Kempf, J. and Guttman, E. \fIRFC 2614, An API for Service Location\fR. The
Internet Society. June 1999.