1SLPFindAttrs(3SLP)Service Location Protocol Library FunctionsSLPFindAttrs(3SLP)
2
3
4

NAME

6       SLPFindAttrs - return service attributes
7

SYNOPSIS

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

DESCRIPTION

18       The  SLPFindAttrs()  function  returns  service attributes matching the
19       attribute tags for the  indicated full or partial  URL.If  pcURL  is  a
20       complete URL, the attribute information returned is for that particular
21       service in the language  locale of the  SLPHandle. If pcURL is  a  ser‐
22       vice  type,  then  all  attributes  for the service type  are returned,
23       regardless of  the  language  of  registration.  Results  are  returned
24       through the callback parameter.
25
26
27       The  result is filtered  with an SLP attribute  request  filter  string
28       parameter,  the  syntax  of  which  is  described  in   RFC  2608.   If
29       the  filter  string  is   the  empty  string,  "",  all  attributes are
30       returned.
31
32
33       If an error occurs in starting the operation, one of the SLPError codes
34       is returned.
35

PARAMETERS

37       hSLP           The  language-specific SLPHandle on which to  search for
38                      attributes. It cannot  be NULL.
39
40
41       pcURL          The full or partial URL. See RFC 2608  for  partial  URL
42                      syntax. It cannot  be NULL.
43
44
45       pcScopeList    A  pointer  to a char containing a comma-separated  list
46                      of scope names. It cannot  be NULL or an  empty  string,
47                      "".
48
49
50       pcAttrIds      The  filter   string indicating  which attribute  values
51                      to  return. Use  empty  string ""  to indicate all  val‐
52                      ues.   Wildcards  matching  all attribute ids  having  a
53                      particular prefix or suffix are also possible. It cannot
54                      be NULL.
55
56
57       callback       A  callback  function  through  which the results of the
58                      operation are reported. It cannot be NULL.
59
60
61       pvCookie       Memory passed to the callback code from the  client.  It
62                      may 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 Returning Service Attributes for a Specific URL
71
72
73       Use the following example to return the attributes "location" and "dpi"
74       for  the  URL  "service:printer:lpr://serv/queue1" through the callback
75       attrReturn:
76
77
78         SLPHandle hSLP;
79         SLPAttrCallback attrReturn;
80         SLPError err;
81
82         err = SLPFindAttrs(hSLP "service:printer:lpr://serv/queue1",
83              "default", "location,dpi", attrReturn, err);
84
85
86       Example 2 Returning Service Attributes for All URLs of a Specific Type
87
88
89       Use the following example to return the attributes "location" and "dpi"
90       for all service URLs having type "service:printer:lpr":
91
92
93         err = SLPFindAttrs(hSLP, "service:printer:lpr",
94              "default", "location, pi",
95              attrReturn, NULL);
96
97

ENVIRONMENT VARIABLES

99       SLP_CONF_FILE    When set, use this file for configuration.
100
101

ATTRIBUTES

103       See attributes(5)  for descriptions of the following attributes:
104
105
106
107
108       ┌─────────────────────────────┬─────────────────────────────┐
109       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
110       ├─────────────────────────────┼─────────────────────────────┤
111       │Availability                 │SUNWslpu                     │
112       └─────────────────────────────┴─────────────────────────────┘
113

SEE ALSO

115       slpd(1M), slp_api(3SLP), slp.conf(4), slpd.reg(4), attributes(5)
116
117
118       System Administration Guide: Network Services
119
120
121       Kempf,  J.  and  Guttman, E. RFC 2614, An API for Service Location. The
122       Internet Society. June 1999.
123
124
125
126SunOS 5.11                        16 Jan 2003               SLPFindAttrs(3SLP)
Impressum