1 /*
2 SLPConfigProperties.java
3
4 (C) Copyright IBM Corp. 2006, 2009
5
6 THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
7 ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
8 CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
9
10 You can obtain a current copy of the Eclipse Public License from
11 http://www.opensource.org/licenses/eclipse-1.0.php
12
13 @author : Alexander Wolf-Reber, IBM, a.wolf-reber@de.ibm.com
14 *
15 * Change History
16 * Flag Date Prog Description
17 *-------------------------------------------------------------------------------
18 * 1535793 2006-09-19 lupusalex Fix&Integrate CIM&SLP configuration classes
19 * 1911400 2008-03-10 blaschks-oss Source RPM file on SourceForge is broken
20 * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL
21 * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1)
22 * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors
23 * 2907527 2009-12-02 blaschke-oss Fix SLP properties issues
24 */
25
26 package org.metricshub.wbem.sblim.slp;
27
28 /*-
29 * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲
30 * WBEM Java Client
31 * ჻჻჻჻჻჻
32 * Copyright 2023 - 2025 MetricsHub
33 * ჻჻჻჻჻჻
34 * Licensed under the Apache License, Version 2.0 (the "License");
35 * you may not use this file except in compliance with the License.
36 * You may obtain a copy of the License at
37 *
38 * http://www.apache.org/licenses/LICENSE-2.0
39 *
40 * Unless required by applicable law or agreed to in writing, software
41 * distributed under the License is distributed on an "AS IS" BASIS,
42 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
43 * See the License for the specific language governing permissions and
44 * limitations under the License.
45 * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱
46 */
47
48 /**
49 * The interface SLPConfigProperties holds string constants for the
50 * configuration properties of the SLP package. To set a property call
51 * <code>System.setProperty(name, value)</code>. Note that these properties have
52 * global VM scope.
53 *
54 */
55 public interface SLPConfigProperties {
56 /**
57 * A URL string giving the location of the SLP config file. <br />
58 * <br />
59 * By default the SLP client looks for
60 * <ul>
61 * <li>file:sblim-slp-client2.properties</li>
62 * <li>file:%USER_HOME%/sblim-slp-client2.properties</li>
63 * <li>file:/etc/java/sblim-slp-client2.properties</li>
64 * <li>file:/etc/sblim-slp-client2.properties</li>
65 * </ul>
66 * The first file found will be used. The default search list is not applied
67 * if this property is set, even if the given URL does not exist.<br />
68 * <br />
69 * <i>SBLIM specific extension to RFC 2614</i>
70 */
71 public static final String NET_SLP_CONFIG_URL = "net.slp.configURL";
72
73 /**
74 * A 16 bit positive integer giving the number of seconds the DA url
75 * lifetime should exceed the discovery interval.<br />
76 * <br />
77 * Default is 900 seconds (15 minutes).<br />
78 * <br />
79 * <i>SBLIM specific extension to RFC 2614</i>
80 */
81 public static final String NET_SLP_DA_ACTIVE_DISCOVERY_GRANULARITY = "net.slp.DAActiveDiscoveryGranularity";
82
83 /**
84 * A 16 bit positive integer giving the number of seconds between DA active
85 * discovery queries.<br />
86 * <br />
87 * Default is 900 seconds (15 minutes).<br />
88 * <br />
89 * If the property is set to zero, active discovery is turned off. This is
90 * useful when the DAs available are explicitly restricted to those obtained
91 * from DHCP or the net.slp.DAAddresses property.
92 */
93 public static final String NET_SLP_DA_ACTIVE_DISCOVERY_INTERVAL = "net.slp.DAActiveDiscoveryInterval";
94
95 /**
96 * A value-list of IP addresses or DNS resolvable host names giving the
97 * SLPv2 DAs to use for statically configured UAs and SAs. Ignored by DAs
98 * (unless the DA is also an SA server). <br />
99 * <br />
100 * Default is none.<br />
101 * <br />
102 * The following grammar describes the property:
103 * <p>
104 * <code>
105 * addr-list = addr / addr "," addr-list<br />
106 * addr = fqdn / hostnumber<br />
107 * fqdn = ALPHA / ALPHA *[ anum / "-" ] anum<br />
108 * anum = ALPHA / DIGIT<br />
109 * hostnumber = 1*3DIGIT 3("." 1*3DIGIT)<br />
110 * </code>
111 * </p>
112 * An example is:<br />
113 * <p>
114 * <code>
115 * sawah,mandi,sambal
116 * </code>
117 * </p>
118 * IP addresses can be used instead of host names in networks where DNS is
119 * not deployed, but network administrators are reminded that using IP
120 * addresses will complicate machine renumbering, since the SLP
121 * configuration property files in statically configured networks will have
122 * to be changed. Similarly, if host names are used, implementors must be
123 * careful that a name service is available before SLP starts, in other
124 * words, SLP cannot be used to find the name service.<br/>
125 */
126 public static final String NET_SLP_DA_ADDRESSES = "net.slp.DAAddresses";
127
128 /**
129 * A comma-separated list of parenthesized attribute/value list pairs that
130 * the DA must advertise in DAAdverts. The property must be in the SLP
131 * attribute list wire format, including escapes for reserved characters.<br />
132 * <br />
133 * <i>Not evaluated by SBLIM SLP client</i>
134 */
135 public static final String NET_SLP_DA_ATTRIBUTES = "net.slp.DAAttributes";
136
137 /**
138 * A value-list of 32 bit integers used as timeouts, in milliseconds, to
139 * implement the multicast convergence algorithm during active DA discovery.
140 * Each value specifies the time to wait before sending the next request, or
141 * until nothing new has been learned from two successive requests.<br />
142 * <br/>
143 * Default is: <code>200,200,200,200,300,400</code>.
144 */
145 public static final String NET_SLP_DA_DISCOVERY_TIMEOUTS = "net.slp.DADiscoveryTimeouts";
146
147 /**
148 * A 32 bit integer giving the number of seconds for the DA heartbeat.
149 * Ignored if isDA is false. <br />
150 * <br />
151 * Default is 10800 seconds (3 hours). <br />
152 * <br />
153 * <i>Not evaluated by SBLIM SLP client</i>
154 */
155 public static final String NET_SLP_DA_HEARTBEAT = "net.slp.DAHeartbeat";
156
157 /**
158 * A value-list of 32 bit integers used as timeouts, in milliseconds, to
159 * implement unicast datagram transmission to DAs. The nth value gives the
160 * time to block waiting for a reply on the nth try to contact the DA.<br />
161 * <br />
162 * Default is: <code>100,200,300</code>
163 */
164 public static final String NET_SLP_DATAGRAM_TIMEOUTS = "net.slp.datagramTimeouts";
165
166 /**
167 * Value-list of strings giving the IP addresses of network interfaces on
168 * which the DA or SA should listen on port 427 for multicast, unicast UDP,
169 * and TCP messages.<br />
170 * <br />
171 * Default is empty, i.e. use the default network interface.<br />
172 * <br />
173 * The grammar for this property is:
174 * <p>
175 * <code>
176 * addr-list = hostnumber / hostnumber "," addr-list<br />
177 * hostnumber = 1*3DIGIT 3("." 1*3DIGIT)
178 * </code>
179 * </p>
180 * An example is:
181 * <p>
182 * <code>195.42.42.42,195.42.142.1,195.42.120.1</code>
183 * </p>
184 * The example machine has three interfaces on which the DA should listen.
185 * Note that since this property only takes IP addresses, it will need to be
186 * changed if the network is renumbered.
187 */
188 public static final String NET_SLP_INTERFACES = "net.slp.interfaces";
189
190 /**
191 * A boolean indicating if broadcast should be used instead of multicast.<br />
192 * <br />
193 * Default is <code>false</code>.
194 */
195 public static final String NET_SLP_IS_BROADCAST_ONLY = "net.slp.isBroadcastOnly";
196
197 /**
198 * A boolean indicating if the SLP server is to act as a DA. If
199 * <code>false</code>, run as a SA.<br />
200 * <br />
201 * Default is <code>false</code>.
202 */
203 public static final String NET_SLP_IS_DA = "net.slp.isDA";
204
205 /**
206 * A RFC 1766 Language Tag for the language locale. Setting this property
207 * causes the property value to become the default locale for SLP messages.
208 * This property is also used for SA and DA configuration.<br />
209 * <br />
210 * Default is <code>en</code>. <br />
211 * <br />
212 * <i>Not evaluated by SBLIM SLP client</i>
213 */
214 public static final String NET_SLP_LOCALE = "net.slp.locale";
215
216 /**
217 * A 32 bit integer giving the maximum number of results to accumulate and
218 * return for a synchronous request before the timeout, or the maximum
219 * number of results to return through a callback if the request results are
220 * reported asynchronously.<br />
221 * Positive integers and -1 are legal values. If -1, indicates that all
222 * results should be returned. <br />
223 * <br />
224 * Default value is 2147483647 (2^31 - 1)<br />
225 * <i>SBLIM specific: RFC 2614 recommendation is -1.</i><br />
226 * <br />
227 * DAs and SAs always return all results that match the request. This
228 * configuration value applies only to UAs, that filter incoming results and
229 * only return as many values as net.slp.maxResults indicates.
230 */
231 public static final String NET_SLP_MAX_RESULTS = "net.slp.maxResults";
232
233 /**
234 * A 16 bit integer giving the network packet MTU, in bytes. This is the
235 * maximum size of any datagram to send, but the implementation might
236 * receive a larger datagram. The maximum size includes IP, and UDP or TCP
237 * headers.<br />
238 * <br />
239 * Default is 1400.
240 */
241 public static final String NET_SLP_MTU = "net.slp.MTU";
242
243 /**
244 * A 32 bit integer giving the maximum amount of time to perform multicast,
245 * in milliseconds.<br />
246 * <br />
247 * Default is 2000 ms.
248 */
249 public static final String NET_SLP_MULTICAST_MAXIMUM_WAIT = "net.slp.multicastMaximumWait";
250
251 /**
252 * A value-list of 32 bit integers used as timeouts, in milliseconds, to
253 * implement the multicast convergence algorithm. Each value specifies the
254 * time to wait before sending the next request, or until nothing new has
255 * been learned from two successive requests.<br />
256 * <br />
257 * Default is: 200, 200, 200, 200, 300, 400<br />
258 * <i>SBLIM specific: RFC 2614 recommendation is
259 * 3000,3000,3000,3000,3000.</i><br />
260 * <br />
261 * In a fast network the aggressive values of 1000,1250,1500,2000,4000 allow
262 * better performance.<br />
263 * <br />
264 * Note that the net.slp.DADiscoveryTimeouts property must be used for
265 * active DA discovery.
266 */
267 public static final String NET_SLP_MULTICAST_TIMEOUTS = "net.slp.multicastTimeouts";
268
269 /**
270 * A positive integer less than or equal to 255, giving the multicast TTL.<br />
271 * <br />
272 * Default is 255.
273 */
274 public static final String NET_SLP_MULTICAST_TTL = "net.slp.multicastTTL";
275
276 /**
277 * A boolean indicating whether passive DA detection should be used.<br />
278 * <br />
279 * Default is true.<br />
280 * <br />
281 * <i>Not evaluated by SBLIM SLP client</i>
282 */
283 public static final String NET_SLP_PASSIVE_DA_DETECTION = "net.slp.passiveDADetection";
284
285 /**
286 * A 16 bit integer giving the port used for listening.<br />
287 * <br />
288 * Default is 427.
289 */
290 public static final String NET_SLP_PORT = "net.slp.port";
291
292 /**
293 * A boolean indicating whether IPv6 addresses should be used.<br />
294 * <br />
295 * Default is true.
296 */
297 public static final String NET_SLP_USEIPV6 = "net.slp.useipv6";
298
299 /**
300 * A boolean indicating whether IPv4 addresses should be used.<br />
301 * <br />
302 * Default is true.
303 */
304 public static final String NET_SLP_USEIPV4 = "net.slp.useipv4";
305
306 /**
307 * A 32 bit integer giving the maximum value for all random wait parameters,
308 * in milliseconds. <br />
309 * <br />
310 * Default is 1000 ms. <br />
311 * <br />
312 * <i>Not evaluated by SBLIM SLP client</i>
313 */
314 public static final String NET_SLP_RANDOM_WAIT_BOUND = "net.slp.randomWaitBound";
315
316 /**
317 * A comma-separated list of parenthesized attribute/value list pairs that
318 * the SA must advertise in SAAdverts. The property must be in the SLP
319 * attribute list wire format, including escapes for reserved characters. <br />
320 * <br />
321 * <i>Not evaluated by SBLIM SLP client</i>
322 */
323 public static final String NET_SLP_SA_ATTRIBUTES = "net.slp.SAAttributes";
324
325 /**
326 * A value-list of strings indicating the scopes that are only applied to
327 * SAs. In contradiction the "net.slp.useScopes" specifies the scope for UAs
328 * and SAs.<br />
329 * <br />
330 * <i>SBLIM specific extension to RFC 2614</i>
331 */
332 public static final String NET_SLP_SAONLY_SCOPES = "net.slp.SAOnlyScopes";
333
334 /**
335 * A comma-separated list of parenthesized attribute/value list pairs that
336 * the SA must advertise in SAAdverts. The property must be in the SLP
337 * attribute list wire format, including escapes for reserved characters.<br />
338 * <br />
339 * <i>Not evaluated by SBLIM SLP client</i>
340 */
341 public static final String NET_SLP_SECURITY_ENABLED = "net.slp.securityEnabled";
342
343 /**
344 * A string containing a URL pointing to a document containing serialized
345 * registrations that should be processed when the DA or SA server starts
346 * up.<br />
347 * <br />
348 * Default is none.<br />
349 * <br />
350 * <i>Not evaluated by SBLIM SLP client</i>
351 */
352 public static final String NET_SLP_SERIALIZED_REG_URL = "net.slp.serializedRegUrl";
353
354 /**
355 * A 32 bit integer giving the server socket queue length for SAs/DAs.<br />
356 * <br />
357 * Default is 10.<br />
358 * <br />
359 * <i>SBLIM specific extension to RFC 2614</i>
360 *
361 */
362 public static final String NET_SLP_SERVER_SOCKET_QUEUE_LENGTH = "net.slp.serverSocketQueueLength";
363
364 /**
365 * A 32 bit integer giving the TCP timeout in milliseconds.<br />
366 * <br />
367 * The default is 20000 ms. <br />
368 * <br />
369 * <i>SBLIM specific extension to RFC 2614</i>
370 *
371 */
372 public static final String NET_SLP_TCPTIMEOUT = "net.slp.TCPTimeout";
373
374 /**
375 * A boolean controlling printing of messages about traffic with DAs. <br />
376 * <br />
377 * Default is <code>false</code>.<br />
378 * <br />
379 * <i>Not evaluated by SBLIM SLP client</i>
380 */
381 public static final String NET_SLP_TRACE_DA_TRAFFIC = "net.slp.traceDATraffic";
382
383 /**
384 * A boolean controlling printing details when a SLP message is dropped for
385 * any reason. <br />
386 * <br />
387 * Default is <code>false</code>.<br />
388 * <br />
389 * <i>Not evaluated by SBLIM SLP client</i>
390 */
391 public static final String NET_SLP_TRACE_DROP = "net.slp.traceDrop";
392
393 /**
394 * A boolean controlling printing of details on SLP messages. The fields in
395 * all incoming messages and outgoing replies are printed. <br />
396 * <br />
397 * Default is <code>false</code>.
398 */
399 public static final String NET_SLP_TRACE_MSG = "net.slp.traceMsg";
400
401 /**
402 * A boolean controlling dumps of all registered services upon registration
403 * and deregistration. If true, the contents of the DA or SA server are
404 * dumped after a registration or deregistration occurs. <br />
405 * <br />
406 * Default is false.<br />
407 * <br />
408 * <i>Not evaluated by SBLIM SLP client</i>
409 */
410 public static final String NET_SLP_TRACE_REG = "net.slp.traceReg";
411
412 /**
413 * A value-list of service type names. In the absence of any DAs, UAs
414 * perform SA discovery for finding scopes. These SA discovery requests may
415 * contain a request for service types as an attribute.<br />
416 * <br />
417 * The API implementation will use the service type names supplied by this
418 * property to discover only those SAs (and their scopes) which support the
419 * desired service type or types. For example, if net.slp.typeHint is set to
420 * "service:imap,service:pop3" then SA discovery requests will include the
421 * search filter:<br />
422 * <br />
423 * <code>(|(service-type=service:imap)(service-type=service:pop3))</code><br />
424 * <br />
425 *
426 * The API library can also use unicast to contact the discovered SAs for
427 * subsequent requests for these service types, to optimize network access.<br />
428 * <br />
429 * <i>Not evaluated by SBLIM SLP client</i>
430 */
431 public static final String NET_SLP_TYPE_HINT = "net.slp.typeHint";
432
433 /**
434 * A value-list of strings indicating the only scopes a UA or SA is allowed
435 * to use when making requests or registering, or the scopes a DA must
436 * support.<br />
437 * If not present for the DA and SA, then in the absence of scope
438 * information from DHCP, the default scope "DEFAULT" is used. If not
439 * present for the UA, and there is no scope information available from
440 * DHCP, then the user scoping model is in force. <br />
441 * Active and passive DA discovery or SA discovery are used for scope
442 * discovery, and the scope "DEFAULT" is used if no other information is
443 * available. <br />
444 * If a DA or SA gets another scope in a request, a SCOPE_NOT_SUPPORTED
445 * error should be returned, unless the request was multicast, in which case
446 * it should be dropped. If a DA gets another scope in a registration, a
447 * SCOPE_NOT_SUPPORTED error must be returned.
448 */
449 public static final String NET_SLP_USE_SCOPES = "net.slp.useScopes";
450
451 /**
452 * Trace level. Can be ALL, INFO, WARNING, ERROR, OFF<br />
453 * <br />
454 * <i>Not evaluated by SBLIM SLP client</i>
455 */
456 public static final String NET_SLP_TRC_LEVEL = "net.slp.trc.level";
457 }