2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 1999 by Sun Microsystems, Inc. 2N/A * All rights reserved. 2N/A// Author: James Kempf 2N/A// Created On: Fri Oct 10 10:48:05 1997 2N/A// Last Modified By: James Kempf 2N/A// Last Modified On: Fri Jan 29 09:24:50 1999 2N/A * The CDAAdvert class models the SLP DAAdvert message, client side. 2N/A * We need to accommodate SLPv1 by using an initialize() method. 2N/A * @author James Kempf 2N/A // Construct a CDAAdvert from the input stream. 2N/A // Initialize the object from the input stream. 2N/A // Parse in the timestamp. Save bytes for auth block. 2N/A // Parse in DA's service URL. 2N/A // Parse in the scope list. 2N/A // Unescape scope strigns. 2N/A // Validate scope list. 2N/A // Parse in attribute list. 2N/A // Parse in the SPI list 2N/A // Construct bytes for auth. 2N/A // None of the strings have leading length fields, so add them here 2N/A // Parse in an auth block, if there. 2N/A // Validate the service URL. 2N/A // Set number of replies to one. 2N/A // Get the timestamp. 2N/A // Return true if the advert indicates that the DA is going down. 2N/A // Return true if the advert was unsolicited. 2N/A // Set is solicited. No-op for V2, since messages already know. 2N/A // Calcualte DA URL lifetime, based on active discovery interval and 2N/A // Calculate lifetime based on maximum length of time between 2N/A // active discoveries. We add a fudge factor to avoid problems 2N/A // with scheduler granularity. 2N/A // If the discovery interval is zero, then the granularity will be 2N/A // also, and active discovery is off. In principle, it doesn't 2N/A // matter what the DA URL interval is because active discovery 2N/A // won't find any, because its off.