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 2006 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * Provides accessors to configuration properties. 2N/A * slp_readConfig: attempts to locate slp.conf, and reads in all 2N/A * properties specified therein. 2N/A * slp_get_mtu: returns the MTU 2N/A * slp_get_next_onlist: parses a comma separated list of integers (in 2N/A * string form), returning one at a time. 2N/A * slp_parse_static_das: parses the list of DAs given in the DAAddresses 2N/A * Reads from fp and dynamically reallocates the buffer if necessary. 2N/A * Returns 1 on success, 0 on read completion, and -1 on failure. 2N/A /* else buf is too small */ 2N/A * Reads into the local property store all properties defined in 2N/A /* check env for alternate config file */ 2N/A "cannot open config file");
2N/A "error reading file: %d",
2N/A /* skip comments and newlines */ 2N/A if (*p ==
'#' || *p ==
';' || *p ==
'\n')
2N/A /* get property and value */ 2N/A /* remove the trailing newline */ 2N/A * Config convenience wrappers 2N/A * On the first invocation, *state should == the value of the property 2N/A * If there are no more timeouts, returns -1, otherwise the timeout. 2N/A * If the value in the property is invalid, returns the default 2000. 2N/A l = (l >
32 ?
32 : l);