/*
* 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 {
try {
} catch (Exception e) {
}
//ia6rem1 = InetAddress.getByName ("fe80::a00:20ff:feed:b08d%eth0");
//ia6rem1 = InetAddress.getByName ("129.156.220.63");
} catch (Exception e) {
e.printStackTrace();
}
}
return;
}
dprintln ("Local Addresses");
test1 ();
test2 ();
if (!isLinux()) {
test3 ();
}
test4 ();
}
s1 = new DatagramSocket ();
s2 = new DatagramSocket ();
/* IPv6 */
s1 = new DatagramSocket ();
s2 = new DatagramSocket ();
/* IPv6 only */
/* IPv6 and IPv4 */
s1 = new DatagramSocket ();
s2 = new DatagramSocket ();
/* listen on anyaddr and check receive from IPv4 and IPv6 */
s1 = new DatagramSocket ();
}
/* check timeouts on receive */
s1 = new DatagramSocket ();
s2 = new DatagramSocket ();
try {
throw new Exception ("expected receive timeout ");
} catch (SocketTimeoutException e) {
}
/* check data can be exchanged now */
/* double check timeout still works */
try {
throw new Exception ("expected receive timeout ");
} catch (SocketTimeoutException e) {
}
/* check receive works after a delay < timeout */
final DatagramSocket s = s2;
public void run () {
try {
s.send (p);
} catch (Exception e) {}
}
});
}
/* check connected sockets */
s1 = new DatagramSocket ();
s2 = new DatagramSocket ();
}
/* check PortUnreachable */
s1 = new DatagramSocket ();
try {
} catch (PortUnreachableException e) {
return;
} catch (SocketTimeoutException e) {
}
}
}