xref: /illumos-gate/usr/src/lib/libslp/clib/slp.h (revision 1da57d55)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1999 by Sun Microsystems, Inc.
24*7c478bd9Sstevel@tonic-gate  * All rights reserved.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef	_SLP_H
28*7c478bd9Sstevel@tonic-gate #define	_SLP_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate /*
31*7c478bd9Sstevel@tonic-gate  * This file contains definitions for the Service Location Protocol
32*7c478bd9Sstevel@tonic-gate  * C API bindings. More detailed descriptions can be found in the
33*7c478bd9Sstevel@tonic-gate  * slp_api(3n) man page.
34*7c478bd9Sstevel@tonic-gate  */
35*7c478bd9Sstevel@tonic-gate 
36*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
37*7c478bd9Sstevel@tonic-gate extern "C" {
38*7c478bd9Sstevel@tonic-gate #endif
39*7c478bd9Sstevel@tonic-gate 
40*7c478bd9Sstevel@tonic-gate /*
41*7c478bd9Sstevel@tonic-gate  * The SLPURLLifetime enum contains URL lifetime values, in seconds,
42*7c478bd9Sstevel@tonic-gate  * that are frequently used. If a service is registered with a lifetime
43*7c478bd9Sstevel@tonic-gate  * of SLP_LIFETIME_MAXIMUM, the registration will be effectively
44*7c478bd9Sstevel@tonic-gate  * permanent, never aging out as long as the SA process is alive.
45*7c478bd9Sstevel@tonic-gate  */
46*7c478bd9Sstevel@tonic-gate typedef enum {
47*7c478bd9Sstevel@tonic-gate 	SLP_LIFETIME_DEFAULT = 10800,
48*7c478bd9Sstevel@tonic-gate 	SLP_LIFETIME_MAXIMUM = 65535
49*7c478bd9Sstevel@tonic-gate } SLPURLLifetime;
50*7c478bd9Sstevel@tonic-gate 
51*7c478bd9Sstevel@tonic-gate /*
52*7c478bd9Sstevel@tonic-gate  *   The SLPBoolean enum is used as a boolean flag.
53*7c478bd9Sstevel@tonic-gate  */
54*7c478bd9Sstevel@tonic-gate typedef enum {
55*7c478bd9Sstevel@tonic-gate 	SLP_FALSE = 0,
56*7c478bd9Sstevel@tonic-gate 	SLP_TRUE = 1
57*7c478bd9Sstevel@tonic-gate } SLPBoolean;
58*7c478bd9Sstevel@tonic-gate 
59*7c478bd9Sstevel@tonic-gate /*
60*7c478bd9Sstevel@tonic-gate  *   The SLPSrvURL structure is filled in by the SLPParseSrvURL() function
61*7c478bd9Sstevel@tonic-gate  *   with information parsed from a character buffer containing URL.
62*7c478bd9Sstevel@tonic-gate  *   The fields correspond to different parts of the URL. Note that
63*7c478bd9Sstevel@tonic-gate  *   the structure is conformant with the standard Berkeley sockets
64*7c478bd9Sstevel@tonic-gate  *   struct servent, with the exception that the pointer to an array of
65*7c478bd9Sstevel@tonic-gate  *   characters for aliases (s_aliases field) is replaced by the pointer
66*7c478bd9Sstevel@tonic-gate  *   to host name (s_pcHost field).
67*7c478bd9Sstevel@tonic-gate  */
68*7c478bd9Sstevel@tonic-gate typedef struct srvurl {
69*7c478bd9Sstevel@tonic-gate 	char	*s_pcSrvType;	/* service type name */
70*7c478bd9Sstevel@tonic-gate 	char	*s_pcHost;	/* host identification information */
71*7c478bd9Sstevel@tonic-gate 	int	s_iPort;	/* port number, or zero if none */
72*7c478bd9Sstevel@tonic-gate 	char	*s_pcNetFamily;	/* network address family identifier */
73*7c478bd9Sstevel@tonic-gate 	char	*s_pcSrvPart;	/* remainder of the URL */
74*7c478bd9Sstevel@tonic-gate } SLPSrvURL;
75*7c478bd9Sstevel@tonic-gate 
76*7c478bd9Sstevel@tonic-gate /*
77*7c478bd9Sstevel@tonic-gate  *   The SLPHandle type is returned by SLPOpen() and is a parameter to all
78*7c478bd9Sstevel@tonic-gate  *   SLP functions.  It serves as a handle for all resources allocated on
79*7c478bd9Sstevel@tonic-gate  *   behalf of the process by the SLP library.  The type is opaque, since
80*7c478bd9Sstevel@tonic-gate  *   the exact nature differs depending on the implementation.
81*7c478bd9Sstevel@tonic-gate  */
82*7c478bd9Sstevel@tonic-gate typedef void* SLPHandle;
83*7c478bd9Sstevel@tonic-gate 
84*7c478bd9Sstevel@tonic-gate /*
85*7c478bd9Sstevel@tonic-gate  *   The SLPError enum contains error codes that are returned from API
86*7c478bd9Sstevel@tonic-gate  *   functions.
87*7c478bd9Sstevel@tonic-gate  */
88*7c478bd9Sstevel@tonic-gate typedef enum {
89*7c478bd9Sstevel@tonic-gate 	SLP_LAST_CALL			= 1,
90*7c478bd9Sstevel@tonic-gate 	SLP_OK				= 0,
91*7c478bd9Sstevel@tonic-gate 	SLP_LANGUAGE_NOT_SUPPORTED	= -1,
92*7c478bd9Sstevel@tonic-gate 	SLP_PARSE_ERROR			= -2,
93*7c478bd9Sstevel@tonic-gate 	SLP_INVALID_REGISTRATION	= -3,
94*7c478bd9Sstevel@tonic-gate 	SLP_SCOPE_NOT_SUPPORTED		= -4,
95*7c478bd9Sstevel@tonic-gate 	SLP_AUTHENTICATION_ABSENT	= -6,
96*7c478bd9Sstevel@tonic-gate 	SLP_AUTHENTICATION_FAILED	= -7,
97*7c478bd9Sstevel@tonic-gate 	SLP_INVALID_UPDATE		= -13,
98*7c478bd9Sstevel@tonic-gate 	SLP_NOT_IMPLEMENTED		= -17,
99*7c478bd9Sstevel@tonic-gate 	SLP_BUFFER_OVERFLOW		= -18,
100*7c478bd9Sstevel@tonic-gate 	SLP_NETWORK_TIMED_OUT		= -19,
101*7c478bd9Sstevel@tonic-gate 	SLP_NETWORK_INIT_FAILED		= -20,
102*7c478bd9Sstevel@tonic-gate 	SLP_MEMORY_ALLOC_FAILED		= -21,
103*7c478bd9Sstevel@tonic-gate 	SLP_PARAMETER_BAD		= -22,
104*7c478bd9Sstevel@tonic-gate 	SLP_NETWORK_ERROR		= -23,
105*7c478bd9Sstevel@tonic-gate 	SLP_INTERNAL_SYSTEM_ERROR	= -24,
106*7c478bd9Sstevel@tonic-gate 	SLP_HANDLE_IN_USE		= -25,
107*7c478bd9Sstevel@tonic-gate 	SLP_TYPE_ERROR			= -26,
108*7c478bd9Sstevel@tonic-gate 	SLP_SECURITY_UNAVAILABLE	= -128
109*7c478bd9Sstevel@tonic-gate } SLPError;
110*7c478bd9Sstevel@tonic-gate 
111*7c478bd9Sstevel@tonic-gate /*
112*7c478bd9Sstevel@tonic-gate  *   The SLPRegReport callback type is the type of the callback function
113*7c478bd9Sstevel@tonic-gate  *   to the SLPReg(), SLPDereg(), and SLPDelAttrs() functions.
114*7c478bd9Sstevel@tonic-gate  */
115*7c478bd9Sstevel@tonic-gate typedef void
116*7c478bd9Sstevel@tonic-gate SLPRegReport(
117*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP,		/* operation SLPHandle */
118*7c478bd9Sstevel@tonic-gate 	SLPError	errCode,	/* error code */
119*7c478bd9Sstevel@tonic-gate 	void		*pvCookie	/* client code cookie */
120*7c478bd9Sstevel@tonic-gate );
121*7c478bd9Sstevel@tonic-gate 
122*7c478bd9Sstevel@tonic-gate /*
123*7c478bd9Sstevel@tonic-gate  *   The SLPSrvTypeCallback type is the type of the callback function
124*7c478bd9Sstevel@tonic-gate  *   parameter to SLPFindSrvTypes() function.
125*7c478bd9Sstevel@tonic-gate  */
126*7c478bd9Sstevel@tonic-gate typedef SLPBoolean
127*7c478bd9Sstevel@tonic-gate SLPSrvTypeCallback(
128*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP,		/* operation SLPHandle */
129*7c478bd9Sstevel@tonic-gate 	const char	*pcSrvTypes,	/* list of service types */
130*7c478bd9Sstevel@tonic-gate 	SLPError	errCode,	/* error code */
131*7c478bd9Sstevel@tonic-gate 	void		*pvCookie	/* client code cookie */
132*7c478bd9Sstevel@tonic-gate );
133*7c478bd9Sstevel@tonic-gate 
134*7c478bd9Sstevel@tonic-gate /*
135*7c478bd9Sstevel@tonic-gate  *   The SLPSrvURLCallback type is the type of the callback function
136*7c478bd9Sstevel@tonic-gate  *   parameter to SLPFindSrvs() function.  The client should return a
137*7c478bd9Sstevel@tonic-gate  */
138*7c478bd9Sstevel@tonic-gate typedef SLPBoolean
139*7c478bd9Sstevel@tonic-gate SLPSrvURLCallback(
140*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP,		/* operation SLPHandle */
141*7c478bd9Sstevel@tonic-gate 	const char	*pcSrvURL,	/* the returned service URL */
142*7c478bd9Sstevel@tonic-gate 	unsigned short	usLifetime,	/* life time of the service advert */
143*7c478bd9Sstevel@tonic-gate 	SLPError	errCode,	/* error code */
144*7c478bd9Sstevel@tonic-gate 	void		*pvCookie	/* client code cookie */
145*7c478bd9Sstevel@tonic-gate );
146*7c478bd9Sstevel@tonic-gate 
147*7c478bd9Sstevel@tonic-gate /*
148*7c478bd9Sstevel@tonic-gate  *   The SLPAttrCallback type is the type of the callback function
149*7c478bd9Sstevel@tonic-gate  *   parameter to SLPFindAttrs() function.
150*7c478bd9Sstevel@tonic-gate  */
151*7c478bd9Sstevel@tonic-gate typedef SLPBoolean
152*7c478bd9Sstevel@tonic-gate SLPAttrCallback(
153*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP,		/* operation SLPHandle */
154*7c478bd9Sstevel@tonic-gate 	const char	*pcAttrList,	/* attribute id/value assignments */
155*7c478bd9Sstevel@tonic-gate 	SLPError	errCode,	/* error code */
156*7c478bd9Sstevel@tonic-gate 	void		*pvCookie	/* client code cookie */
157*7c478bd9Sstevel@tonic-gate );
158*7c478bd9Sstevel@tonic-gate 
159*7c478bd9Sstevel@tonic-gate extern SLPError
160*7c478bd9Sstevel@tonic-gate SLPOpen(
161*7c478bd9Sstevel@tonic-gate 	const char	*pcLang,	/* natural language locale */
162*7c478bd9Sstevel@tonic-gate 	SLPBoolean	isAsync,	/* asynchronous if true */
163*7c478bd9Sstevel@tonic-gate 	SLPHandle	*phSLP		/* pointer to resulting handle */
164*7c478bd9Sstevel@tonic-gate );
165*7c478bd9Sstevel@tonic-gate 
166*7c478bd9Sstevel@tonic-gate /*
167*7c478bd9Sstevel@tonic-gate  * Frees all resources associated with the handle
168*7c478bd9Sstevel@tonic-gate  */
169*7c478bd9Sstevel@tonic-gate extern void SLPClose(
170*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP		/* handle to be closed */
171*7c478bd9Sstevel@tonic-gate );
172*7c478bd9Sstevel@tonic-gate 
173*7c478bd9Sstevel@tonic-gate /*
174*7c478bd9Sstevel@tonic-gate  *   Registers the URL in pcSrvURL having the lifetime usLifetime with the
175*7c478bd9Sstevel@tonic-gate  *   attribute list in pcAttrs.
176*7c478bd9Sstevel@tonic-gate  */
177*7c478bd9Sstevel@tonic-gate extern SLPError
178*7c478bd9Sstevel@tonic-gate SLPReg(
179*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP,		/* operation SLPHandle */
180*7c478bd9Sstevel@tonic-gate 	const char	*pcSrvURL,	/* the URL to register */
181*7c478bd9Sstevel@tonic-gate 	const unsigned short usLifetime, /* life time of the service advert */
182*7c478bd9Sstevel@tonic-gate 	const char	*pcSrvType,	/* the service type */
183*7c478bd9Sstevel@tonic-gate 	const char	*pcAttrs,	/* attributes of the advertisement */
184*7c478bd9Sstevel@tonic-gate 	SLPBoolean	fresh,		/* fresh registration if true */
185*7c478bd9Sstevel@tonic-gate 	SLPRegReport	callback,	/* receives completion status */
186*7c478bd9Sstevel@tonic-gate 	void		*pvCookie	/* client code cookie */
187*7c478bd9Sstevel@tonic-gate );
188*7c478bd9Sstevel@tonic-gate 
189*7c478bd9Sstevel@tonic-gate /*
190*7c478bd9Sstevel@tonic-gate  *   Deregisters the advertisment for URL pURL in all scopes where the
191*7c478bd9Sstevel@tonic-gate  *   service is registered and all language locales, not just the locale
192*7c478bd9Sstevel@tonic-gate  *   of the SLPHandle.
193*7c478bd9Sstevel@tonic-gate  */
194*7c478bd9Sstevel@tonic-gate extern SLPError
195*7c478bd9Sstevel@tonic-gate SLPDereg(
196*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP,		/* operation SLPHandle */
197*7c478bd9Sstevel@tonic-gate 	const char	*pcURL,		/* the URL to deregister */
198*7c478bd9Sstevel@tonic-gate 	SLPRegReport	callback,	/* receives completion status */
199*7c478bd9Sstevel@tonic-gate 	void		*pvCookie	/* client code cookie */
200*7c478bd9Sstevel@tonic-gate );
201*7c478bd9Sstevel@tonic-gate 
202*7c478bd9Sstevel@tonic-gate /*
203*7c478bd9Sstevel@tonic-gate  *   Delete the selected attributes in the locale of the SLPHandle.
204*7c478bd9Sstevel@tonic-gate  */
205*7c478bd9Sstevel@tonic-gate extern SLPError
206*7c478bd9Sstevel@tonic-gate SLPDelAttrs(
207*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP,		/* operation SLPHandle */
208*7c478bd9Sstevel@tonic-gate 	const char	*pcURL,		/* URL for attrs to deregister */
209*7c478bd9Sstevel@tonic-gate 	const char	*pcAttrs,	/* attributes to deregister */
210*7c478bd9Sstevel@tonic-gate 	SLPRegReport	callback,	/* receives completion status */
211*7c478bd9Sstevel@tonic-gate 	void		*pvCookie	/* client code cookie */
212*7c478bd9Sstevel@tonic-gate );
213*7c478bd9Sstevel@tonic-gate 
214*7c478bd9Sstevel@tonic-gate /*
215*7c478bd9Sstevel@tonic-gate  *   The SLPFindSrvType() function issues an SLP service type request
216*7c478bd9Sstevel@tonic-gate  *   for service types in the scopes indicated by the pcScopeList.  The
217*7c478bd9Sstevel@tonic-gate  *   results are returned through the callback parameter.
218*7c478bd9Sstevel@tonic-gate  */
219*7c478bd9Sstevel@tonic-gate extern SLPError
220*7c478bd9Sstevel@tonic-gate SLPFindSrvTypes(
221*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP,		/* operation SLPHandle */
222*7c478bd9Sstevel@tonic-gate 	const char	*pcNamingAuthority, /* naming authority to search */
223*7c478bd9Sstevel@tonic-gate 	const char	*pcScopeList,	/* scopes to search */
224*7c478bd9Sstevel@tonic-gate 	SLPSrvTypeCallback callback,	/* receives results */
225*7c478bd9Sstevel@tonic-gate 	void		*pvCookie	/* client code cookie */
226*7c478bd9Sstevel@tonic-gate );
227*7c478bd9Sstevel@tonic-gate 
228*7c478bd9Sstevel@tonic-gate /*
229*7c478bd9Sstevel@tonic-gate  *   Issue the query for services on the language specific SLPHandle and
230*7c478bd9Sstevel@tonic-gate  *   return the results through the callback.
231*7c478bd9Sstevel@tonic-gate  */
232*7c478bd9Sstevel@tonic-gate extern SLPError
233*7c478bd9Sstevel@tonic-gate SLPFindSrvs(
234*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP,		/* operation SLPHandle */
235*7c478bd9Sstevel@tonic-gate 	const char	*pcServiceType,	/* service type string */
236*7c478bd9Sstevel@tonic-gate 	const char	*pcScopeList,	/* scopes to search */
237*7c478bd9Sstevel@tonic-gate 	const char	*pcSearchFilter, /* LDAPv3 Search Filter */
238*7c478bd9Sstevel@tonic-gate 	SLPSrvURLCallback callback,	/* receives results */
239*7c478bd9Sstevel@tonic-gate 	void		*pvCookie	/* client code cookie */
240*7c478bd9Sstevel@tonic-gate );
241*7c478bd9Sstevel@tonic-gate 
242*7c478bd9Sstevel@tonic-gate /*
243*7c478bd9Sstevel@tonic-gate  *   This function returns service attributes matching the attribute ids
244*7c478bd9Sstevel@tonic-gate  *   for the indicated full or partial URL.
245*7c478bd9Sstevel@tonic-gate  */
246*7c478bd9Sstevel@tonic-gate extern SLPError
247*7c478bd9Sstevel@tonic-gate SLPFindAttrs(
248*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP,		/* operation SLPHandle */
249*7c478bd9Sstevel@tonic-gate 	const char	*pcURL,		/* the full or partial URL */
250*7c478bd9Sstevel@tonic-gate 	const char	*pcScopeList,	/* scopes to search */
251*7c478bd9Sstevel@tonic-gate 	const char	*pcAttrIds,	/* which attribute values to return */
252*7c478bd9Sstevel@tonic-gate 	SLPAttrCallback	callback,	/* receives results */
253*7c478bd9Sstevel@tonic-gate 	void		*pvCookie	/* client code cookie */
254*7c478bd9Sstevel@tonic-gate );
255*7c478bd9Sstevel@tonic-gate 
256*7c478bd9Sstevel@tonic-gate /*
257*7c478bd9Sstevel@tonic-gate  *   Returns the minimum refresh interval, in seconds, that any SA
258*7c478bd9Sstevel@tonic-gate  *   should use when refreshing registrations. If 0, there is no
259*7c478bd9Sstevel@tonic-gate  *   minimum interval, and the SA can use what it pleases.
260*7c478bd9Sstevel@tonic-gate  */
261*7c478bd9Sstevel@tonic-gate extern unsigned short
262*7c478bd9Sstevel@tonic-gate SLPGetRefreshInterval();
263*7c478bd9Sstevel@tonic-gate 
264*7c478bd9Sstevel@tonic-gate /*
265*7c478bd9Sstevel@tonic-gate  *   Sets ppcScopeList parameter to a pointer to a comma separated list
266*7c478bd9Sstevel@tonic-gate  *   including all available scope values.
267*7c478bd9Sstevel@tonic-gate  */
268*7c478bd9Sstevel@tonic-gate extern SLPError
269*7c478bd9Sstevel@tonic-gate SLPFindScopes(
270*7c478bd9Sstevel@tonic-gate 	SLPHandle	hSLP,		/* operation SLPHandle */
271*7c478bd9Sstevel@tonic-gate 	char		**ppcScopeList	/* pointer to result */
272*7c478bd9Sstevel@tonic-gate );
273*7c478bd9Sstevel@tonic-gate 
274*7c478bd9Sstevel@tonic-gate /*
275*7c478bd9Sstevel@tonic-gate  *   Parses the URL passed in as the argument into a service URL structure
276*7c478bd9Sstevel@tonic-gate  *   and return it in the ppSrvURL pointer.
277*7c478bd9Sstevel@tonic-gate  */
278*7c478bd9Sstevel@tonic-gate extern SLPError
279*7c478bd9Sstevel@tonic-gate SLPParseSrvURL(
280*7c478bd9Sstevel@tonic-gate 	char		*pcSrvURL,	/* URL string to parse */
281*7c478bd9Sstevel@tonic-gate 	SLPSrvURL	**ppSrvURL	/* pointer to result */
282*7c478bd9Sstevel@tonic-gate );
283*7c478bd9Sstevel@tonic-gate 
284*7c478bd9Sstevel@tonic-gate /*
285*7c478bd9Sstevel@tonic-gate  *   Frees memory returned from SLPParseSrvURL(), SLPEscape(),
286*7c478bd9Sstevel@tonic-gate  *   SLPUnescape(), and SLPFindScopes().
287*7c478bd9Sstevel@tonic-gate  */
288*7c478bd9Sstevel@tonic-gate extern void
289*7c478bd9Sstevel@tonic-gate SLPFree(
290*7c478bd9Sstevel@tonic-gate 	void	*pvMem			/* pointer to memory to free */
291*7c478bd9Sstevel@tonic-gate );
292*7c478bd9Sstevel@tonic-gate 
293*7c478bd9Sstevel@tonic-gate /*
294*7c478bd9Sstevel@tonic-gate  *   Process the input string in pcInbuf and escape any SLP reserved
295*7c478bd9Sstevel@tonic-gate  *   characters.
296*7c478bd9Sstevel@tonic-gate  */
297*7c478bd9Sstevel@tonic-gate extern SLPError
298*7c478bd9Sstevel@tonic-gate SLPEscape(
299*7c478bd9Sstevel@tonic-gate 	const char	*pcInbuf,	/* buffer to process */
300*7c478bd9Sstevel@tonic-gate 	char		**ppcOutBuf,	/* pointer to result */
301*7c478bd9Sstevel@tonic-gate 	SLPBoolean	isTag		/* if true, check for bad tag chars */
302*7c478bd9Sstevel@tonic-gate );
303*7c478bd9Sstevel@tonic-gate 
304*7c478bd9Sstevel@tonic-gate /*
305*7c478bd9Sstevel@tonic-gate  *   Process the input string in pcInbuf and unescape any SLP reserved
306*7c478bd9Sstevel@tonic-gate  *   characters.
307*7c478bd9Sstevel@tonic-gate  */
308*7c478bd9Sstevel@tonic-gate extern SLPError
309*7c478bd9Sstevel@tonic-gate SLPUnescape(
310*7c478bd9Sstevel@tonic-gate 	const char	*pcInbuf,	/* buffer to process */
311*7c478bd9Sstevel@tonic-gate 	char		**ppcOutbuf,	/* pointer to result */
312*7c478bd9Sstevel@tonic-gate 	SLPBoolean	isTag		/* if true, check for bad tag chars */
313*7c478bd9Sstevel@tonic-gate );
314*7c478bd9Sstevel@tonic-gate 
315*7c478bd9Sstevel@tonic-gate /*
316*7c478bd9Sstevel@tonic-gate  *   Returns the value of the corresponding SLP property name.  The
317*7c478bd9Sstevel@tonic-gate  *   returned string is owned by the library and MUST NOT be freed.
318*7c478bd9Sstevel@tonic-gate  */
319*7c478bd9Sstevel@tonic-gate extern const char *
320*7c478bd9Sstevel@tonic-gate SLPGetProperty(
321*7c478bd9Sstevel@tonic-gate 	const char	*pcName		/* property name */
322*7c478bd9Sstevel@tonic-gate );
323*7c478bd9Sstevel@tonic-gate 
324*7c478bd9Sstevel@tonic-gate /*
325*7c478bd9Sstevel@tonic-gate  *   Sets the value of the SLP property to the new value.  The pcValue
326*7c478bd9Sstevel@tonic-gate  *   parameter should be the property value as a string.
327*7c478bd9Sstevel@tonic-gate  */
328*7c478bd9Sstevel@tonic-gate extern void
329*7c478bd9Sstevel@tonic-gate SLPSetProperty(
330*7c478bd9Sstevel@tonic-gate 	const char	*pcName,	/* property name */
331*7c478bd9Sstevel@tonic-gate 	const char	*pcValue	/* property value */
332*7c478bd9Sstevel@tonic-gate );
333*7c478bd9Sstevel@tonic-gate 
334*7c478bd9Sstevel@tonic-gate /*
335*7c478bd9Sstevel@tonic-gate  * Maps err_code to an SLP error string. The returned string should not
336*7c478bd9Sstevel@tonic-gate  * be overwritten.
337*7c478bd9Sstevel@tonic-gate  */
338*7c478bd9Sstevel@tonic-gate extern const char *
339*7c478bd9Sstevel@tonic-gate slp_strerror(
340*7c478bd9Sstevel@tonic-gate 	SLPError err_code		/* SLP error code */
341*7c478bd9Sstevel@tonic-gate );
342*7c478bd9Sstevel@tonic-gate 
343*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
344*7c478bd9Sstevel@tonic-gate }
345*7c478bd9Sstevel@tonic-gate #endif
346*7c478bd9Sstevel@tonic-gate 
347*7c478bd9Sstevel@tonic-gate #endif	/* _SLP_H */
348