1SLPFindScopes(3SLP)Service Location Protocol Library FunctionSsLPFindScopes(3SLP)
2
3
4
6 SLPFindScopes - return list of configured and discovered scopes
7
9 cc [ flag... ] file... -lslp [ library... ]
10 #include <slp.h>
11
12 SLPError SLPFindScopes(SLPHandle hSLP, char** ppcScopes);
13
14
16 The SLPFindScopes() function sets the ppcScopes parameter to a
17 pointer to a comma-separated list including all available scope
18 names. The list of scopes comes from a variety of sources: the con‐
19 figuration file, the net.slp.useScopes property and the net.slp.DAAd‐
20 dresses property, DHCP, or through the DA discovery process.
21 If there is any order to the scopes, preferred scopes are
22 listed before less desirable scopes. There is always at least
23 one string in the array, the default scope, DEFAULT.
24
25
26 If no error occurs, SLPFindScopes() returns SLP_OK, otherwise, it
27 returns the appropriate error code.
28
30 hSLP The SLPHandle on which to search for scopes. hSLP cannot
31 be NULL.
32
33
34 ppcScopes A pointer to a char pointer into which the buffer
35 pointer is placed upon return. The buffer is null-termi‐
36 nated. The memory should be freed by calling SLPFree().
37 See SLPFree(3SLP)
38
39
41 This function or its callback may return any SLP error code. See the
42 ERRORS section in slp_api(3SLP).
43
45 Example 1 Finding Configured or Discovered Scopes
46
47
48 Use the following example to find configured or discovered scopes:
49
50
51 SLPHandle hSLP;
52 char *ppcScopes;
53 SLPError err;
54
55 error = SLPFindScopes(hSLP, & ppcScopes);
56
57
59 SLP_CONF_FILE When set, use this file for configuration.
60
61
63 See attributes(5) for descriptions of the following attributes:
64
65
66
67
68 ┌─────────────────────────────┬─────────────────────────────┐
69 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
70 ├─────────────────────────────┼─────────────────────────────┤
71 │Availability │SUNWslpu │
72 └─────────────────────────────┴─────────────────────────────┘
73
75 slpd(1M), slp_api(3SLP), SLPFree(3SLP), slp.conf(4), slpd.reg(4),
76 attributes(5)
77
78
79 System Administration Guide: Network Services
80
81
82 Guttman, E., Perkins, C., Veizades, J., and Day, M. RFC 2608, Service
83 Location Protocol, Version 2. The Internet Society. June 1999.
84
85
86 Kempf, J. and Guttman, E. RFC 2614, An API for Service Location. The
87 Internet Society. June 1999.
88
89
90
91SunOS 5.11 16 Jan 2003 SLPFindScopes(3SLP)