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