1SLPFindSrvs(3SLP) Service Location Protocol Library FunctionsSLPFindSrvs(3SLP)
2
3
4

NAME

6       SLPFindSrvs - return service URLs
7

SYNOPSIS

9       cc [ flag... ] file... -lslp [ library... ]
10       #include <slp.h>
11
12       SLPError SLPFindSrvs(SLPHandle hSLP, const char *pcServiceType,
13            const char *pcScopeList, const char *pcSearchFilter,
14            SLPSrvURLCallback *callback, void *pvCookie);
15
16

DESCRIPTION

18       The SLPFindSrvs() function issues a request for SLP services. The query
19       is for services  on  a  language-specific  SLPHandle.  It  returns  the
20       results  through  the  callback.  The  parameters  will  determine  the
21       results.
22
23
24       If an error occurs  in starting the operation, one   of   the  SLPError
25       codes is returned.
26

PARAMETERS

28       hSLP              The  language-specific  SLPHandle on which to  search
29                         for services. It cannot  be NULL.
30
31
32       pcServiceType     The service type string for the request.  The  pcSer‐
33                         viceType  can  be  discovered  by  a  call to SLPSrv‐
34                         Types(). Examples of service type strings include
35
36                           "service:printer:lpr"
37
38                         or
39
40                           "service:nfs"
41
42                         pcServiceType cannot be NULL.
43
44
45       pcScopeList       A pointer to  a  char  containing  a  comma-separated
46                         list   of  scope names. It cannot be NULL or an empty
47                         string, "".
48
49
50       pcSearchFilter    A query  formulated  of  attribute  pattern  matching
51                         expressions  in  the  form of a LDAPv3 search filter.
52                         See RFC 2254. If this filter is empty, "",  all  ser‐
53                         vices  of  the requested type in the specified scopes
54                         are returned. It cannot be NULL.
55
56
57       callback          A callback through which the results of the operation
58                         are reported. It cannot be NULL.
59
60
61       pvCookie          Memory  passed  to the callback code from the client.
62                         It can be NULL.
63
64

ERRORS

66       This function or its callback may return any SLP error  code.  See  the
67       ERRORS section in slp_api(3SLP).
68

EXAMPLES

70       Example 1 Using SLPFindSrvs()
71
72
73       The  following example finds all advertisements for printers supporting
74       the LPR protocol with the dpi attribute 300 in the default scope:
75
76
77         SLPError err;
78         SLPHandle hSLP;
79         SLPSrvURLCallback srvngst;
80
81         err = SLPFindSrvs(hSLP,
82                           "service:printer:lpr",
83                           "default",
84                           "(dpi=300)",
85                           srvngst,
86                           NULL);
87
88

ENVIRONMENT VARIABLES

90       SLP_CONF_FILE    When set, use this file for configuration.
91
92

ATTRIBUTES

94       See attributes(5)  for descriptions of the following attributes:
95
96
97
98
99       ┌─────────────────────────────┬─────────────────────────────┐
100       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
101       ├─────────────────────────────┼─────────────────────────────┤
102       │Availability                 │SUNWslpu                     │
103       └─────────────────────────────┴─────────────────────────────┘
104

SEE ALSO

106       slpd(1M), slp_api(3SLP), slp.conf(4), slpd.reg(4), attributes(5)
107
108
109       System Administration Guide: Network Services
110
111
112       Howes, T. RFC 2254, The String Representation of LDAP  Search  Filters.
113       The Internet Society. 1997.
114
115
116       Guttman,  E.,  Perkins, C., Veizades, J., and Day, M. RFC 2608, Service
117       Location Protocol, Version 2. The Internet Society. June 1999.
118
119
120       Kempf, J. and Guttman, E. RFC 2614, An API for  Service  Location.  The
121       Internet Society. June 1999.
122
123
124
125SunOS 5.11                        16 Jan 2003                SLPFindSrvs(3SLP)
Impressum