'\" te .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. .TH SLPFindSrvs 3SLP "16 Jan 2003" "SunOS 5.11" "Service Location Protocol Library Functions" .SH NAME SLPFindSrvs \- return service URLs .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lslp\fR [ \fIlibrary\fR... ] #include \fBSLPError\fR \fBSLPFindSrvs\fR(\fBSLPHandle\fR \fIhSLP\fR, \fBconst char *\fR\fIpcServiceType\fR, \fBconst char *\fR\fIpcScopeList\fR,\ \fBconst char *\fR\fIpcSearchFilter\fR, \fBSLPSrvURLCallback *\fR\fIcallback\fR, \fBvoid *\fR\fIpvCookie\fR); .fi .SH DESCRIPTION .sp .LP The \fBSLPFindSrvs()\fR function issues a request for \fBSLP\fR services. The query is for services on a language-specific \fBSLPHandle\fR. It returns the results through the \fIcallback\fR. The parameters will determine the results. .sp .LP If an error occurs in starting the operation, one of the \fBSLPError\fR codes is returned. .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIhSLP\fR\fR .ad .RS 18n .rt The language-specific \fBSLPHandle\fR on which to search for services. It cannot be \fINULL\fR. .RE .sp .ne 2 .mk .na \fB\fIpcServiceType\fR\fR .ad .RS 18n .rt The service type string for the request. The \fIpcServiceType\fR can be discovered by a call to \fBSLPSrvTypes()\fR. Examples of service type strings include .sp .in +2 .nf "service:printer:lpr" .fi .in -2 or .sp .in +2 .nf "service:nfs" .fi .in -2 \fIpcServiceType\fR cannot be \fINULL\fR. .RE .sp .ne 2 .mk .na \fB\fIpcScopeList\fR\fR .ad .RS 18n .rt A pointer to a \fBchar\fR containing a comma-separated list of scope names. It cannot be \fINULL\fR or an empty string, \fB""\fR. .RE .sp .ne 2 .mk .na \fB\fIpcSearchFilter\fR\fR .ad .RS 18n .rt A query formulated of attribute pattern matching expressions in the form of a \fBLDAPv3\fR search filter. See \fIRFC 2254\fR. If this filter is empty, \fB""\fR, all services of the requested type in the specified scopes are returned. It cannot be \fINULL\fR. .RE .sp .ne 2 .mk .na \fB\fIcallback\fR\fR .ad .RS 18n .rt A callback through which the results of the operation are reported. It cannot be \fINULL\fR. .RE .sp .ne 2 .mk .na \fB\fIpvCookie\fR\fR .ad .RS 18n .rt Memory passed to the callback code from the client. It can be \fINULL\fR. .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 \fRUsing \fBSLPFindSrvs()\fR .sp .LP The following example finds all advertisements for printers supporting the \fBLPR\fR protocol with the dpi attribute 300 in the default scope: .sp .in +2 .nf SLPError err; SLPHandle hSLP; SLPSrvURLCallback srvngst; err = SLPFindSrvs(hSLP, "service:printer:lpr", "default", "(dpi=300)", srvngst, NULL); .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), \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 Howes, T. \fIRFC 2254, The String Representation of LDAP Search Filters\fR. The Internet Society. 1997. .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.