4632N/A * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 4632N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4632N/A * This code is free software; you can redistribute it and/or modify it 4632N/A * under the terms of the GNU General Public License version 2 only, as 4632N/A * published by the Free Software Foundation. Oracle designates this 4632N/A * particular file as subject to the "Classpath" exception as provided 4632N/A * by Oracle in the LICENSE file that accompanied this code. 4632N/A * This code is distributed in the hope that it will be useful, but WITHOUT 4632N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4632N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 4632N/A * version 2 for more details (a copy is included in the LICENSE file that 4632N/A * You should have received a copy of the GNU General Public License version 4632N/A * 2 along with this work; if not, write to the Free Software Foundation, 4632N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 4632N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 4632N/A// need dlopen/dlsym trick to avoid pulling in JavaRuntimeSupport before libjava.dylib is loaded 4632N/A/* There are several toolkit options on Mac OS X, so we should try to 4632N/A * pick the "best" one, given what we know about the environment Java 4632N/A // Is the WindowServer available? 4632N/A /* See if the proxy is enabled. */ 4632N/A // If cf_host is null, that means the checkbox is set, 4632N/A // but no host was entered. We'll treat that as NOT ENABLED. 4632N/A // If cf_port is null or cf_port isn't a number, that means 4632N/A // no port number was entered. Treat this as ENABLED with the 4632N/A // protocol's default port. 4632N/A // bad port or no port - leave *ioProxyPort unchanged 4632N/A// Return TRUE if str is a syntactically valid IP address. 4632N/A// Using inet_pton() instead of inet_aton() for IPv6 support. 4632N/A// len is only a hint; cstr must still be nul-terminated 4632N/A// Convert Mac OS X proxy exception entry to Java syntax. 4632N/A// See Radar #3441134 for details. 4632N/A// Returns NULL if this exception should be ignored by Java. 4632N/A// May generate a string with multiple exceptions separated by '|'. 4632N/A // This is done with char* instead of CFString because inet_pton() 4632N/A // 1. sanitize exception prefix 4632N/A // 2. pre-reject other exception wildcards 4632N/A // 4. allow domain suffixes 4632N/A // c_exception is now "str\0" - change to "str|*.str\0" 4632N/A * Method for fetching proxy info and storing it in the propery list. 4632N/A char buf[
16];
/* Used for %d of an int - 16 is plenty */ 4632N/A /* Read the proxy exceptions list */ 4632N/A /* Convert this exception from Mac OS X syntax to Java syntax. 4632N/A See Radar #3441134 for details. This may generate a string 4632N/A with multiple Java exceptions separated by '|'. */ 4632N/A /* Append the host to the list of exclusions. */