Current File : //usr/man/man3slp/SLPFindScopes.3slp
'\" te
.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
.TH SLPFindScopes 3SLP "16 Jan 2003" "SunOS 5.11" "Service Location Protocol Library Functions"
.SH NAME
SLPFindScopes \- return list of configured and discovered scopes
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... \fB-lslp\fR [ \fIlibrary\fR... ]
#include <slp.h>

\fBSLPError\fR \fBSLPFindScopes\fR(\fBSLPHandle\fR \fIhSLP\fR, \fBchar**\fR \fIppcScopes\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBSLPFindScopes()\fR function sets the \fIppcScopes\fR parameter  to  a pointer to a comma-separated list including  all available scope  names. The list of  scopes comes from  a variety of  sources: the configuration file, the \fBnet.slp.useScopes\fR property and the \fBnet.slp.DAAddresses\fR  property,   \fBDHCP\fR,   or  through the  \fBDA\fR discovery  process.  If  there is  any  order  to the  scopes,  preferred  scopes  are  listed  before less  desirable  scopes.  There  is  always  at  least one  string in the  array, the  default  scope,  \fBDEFAULT\fR.
.sp
.LP
If no error occurs, \fBSLPFindScopes()\fR returns \fBSLP_OK\fR, otherwise, it returns the appropriate error code.
.SH PARAMETERS
.sp
.ne 2
.mk
.na
\fB\fIhSLP\fR\fR
.ad
.RS 13n
.rt  
The \fBSLPHandle\fR on which to search for scopes.  \fIhSLP\fR cannot be \fINULL\fR.
.RE

.sp
.ne 2
.mk
.na
\fB\fIppcScopes\fR\fR
.ad
.RS 13n
.rt  
A  pointer to  a \fBchar\fR  pointer  into  which  the  buffer pointer is placed upon return. The buffer is null-terminated.   The memory should be freed by calling \fBSLPFree()\fR. See \fBSLPFree\fR(3SLP)
.RE

.SH ERRORS
.sp
.LP
This function or its callback may return any \fBSLP\fR error code. See the ERRORS section in \fBslp_api\fR(3SLP).
.SH EXAMPLES
.LP
\fBExample 1 \fRFinding Configured or Discovered Scopes
.sp
.LP
Use the following example to find configured or discovered scopes:

.sp
.in +2
.nf
SLPHandle hSLP;
char *ppcScopes;
SLPError err;

error = SLPFindScopes(hSLP, & ppcScopes);
.fi
.in -2

.SH ENVIRONMENT VARIABLES
.sp
.ne 2
.mk
.na
\fB\fBSLP_CONF_FILE\fR\fR
.ad
.RS 17n
.rt  
When set, use this file for configuration.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5)  for descriptions of the following attributes:
.sp

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Availabilityservice/network/slp
.TE

.SH SEE ALSO
.sp
.LP
\fBslpd\fR(1M), \fBslp_api\fR(3SLP), \fBSLPFree\fR(3SLP), \fBslp.conf\fR(4), \fBslpd.reg\fR(4), \fBattributes\fR(5)
.sp
.LP
\fIManaging Service Location Protocol Services in Oracle Solaris 11.3\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.