/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4868820
* @summary IPv6 support for Windows XP and 2003 server
*/
static {
try {
} catch (Exception e) {
e.printStackTrace();
}
}
return;
}
dprintln ("Local Addresses");
test1 (0);
test1 (5100);
test2();
test3();
test4();
}
if (port == 0) {
}
// try Ipv6 only
// try with both IPv4 and Ipv6
if (s1peer instanceof Inet6Address) {
} else {
}
}
/** bind tests:
* 1. bind to specific address IPv4 only (any port)
* 2. bind to specific address IPv6 only (any port)
* 3. bind to specific address IPv4 only (specific port)
* 4. bind to specific address IPv4 only (specific port)
* 5. bind to any address IPv4 (test collision)
*/
server = new ServerSocket ();
try {
throw new RuntimeException ("connect to IPv6 address should be refused");
} catch (IOException e) { }
/* now try IPv6 only */
server = new ServerSocket ();
try {
throw new RuntimeException ("connect to IPv4 address should be refused");
} catch (IOException e) { }
/* now try IPv6 specific port only */
server = new ServerSocket ();
try {
throw new RuntimeException ("connect to IPv4 address should be refused");
} catch (IOException e) { }
/* now try IPv4 specific port only */
server = new ServerSocket ();
try {
throw new RuntimeException ("connect to IPv6 address should be refused");
} catch (IOException e) { }
}
/* Test timeouts on accept(), connect() */
try {
throw new RuntimeException ("accept should not have returned");
} catch (SocketTimeoutException e) {}
}
/* Test: connect to IPv4 mapped address */
/* create an IPv4 mapped address corresponding to local host */
byte[] b = {0,0,0,0,0,0,0,0,0,0,(byte)0xff,(byte)0xff,0,0,0,0};
}
}