/*
* 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.
*/
public class Tests {
/**
* performs a simple exchange of data between the two sockets
* and throws an exception if there is any problem.
*/
throws Exception {
}
public void run() {
catch (Exception e) {unexpected(e); }
}}, threadName)).start();
}
e.printStackTrace();
}
/**
* Send a packet from s1 to s2 (ia2/s2.localPort) and check it
* Send a packet from s2 to s1 (ia1/s1.localPort) and check it
*/
throws Exception {
}
/**
* Send a packet from s1 to s2 (ia2/s2.localPort) and send same packet
* back from s2 to sender. Check s1 receives original packet
*/
throws Exception {
} else {
}
}
throws Exception {
for (int i=0; i<len; i++) {
throw new Exception ("packets not the same");
}
}
}
/* check the time got is within 50% of the time expected */
}
}
static boolean debug = false;
}
if (debug) {
}
}
if (debug) {
}
}
static int numberInterfaces () {
try {
int nifs=0;
while (ifs.hasMoreElements()) {
nifs++;
ifs.nextElement();
}
return nifs;
} catch (SocketException e) {
return 0;
}
}
return new AddrEnum (Inet4Address.class);
}
Enumeration e = ipv4Addresses();
if (!e.hasMoreElements()) {
return null;
}
return (Inet4Address)e.nextElement();
}
Enumeration e = ipv6Addresses();
if (!e.hasMoreElements()) {
return null;
}
return (Inet6Address)e.nextElement();
}
return new AddrEnum (Inet6Address.class);
}
/* enumerates the Inet4Addresses or Inet6Addresses on the system */
static final byte[] fe80_loopback = new byte [] {
(byte)0xfe,(byte)0x80,0,0,0,0,0,0,0,0,0,0,0,0,0,1
};
try {
} catch (SocketException e) {}
}
public boolean hasMoreElements () {
}
}
if (!hasMoreElements()) {
throw new NoSuchElementException ("no more addresses");
}
return next;
}
while (true) {
return null;
}
}
while (addrs.hasMoreElements()) {
&& !addr.isAnyLocalAddress()) {
continue;
}
return addr;
}
}
}
}
while (ifs.hasMoreElements()) {
try {
return nic;
} catch (SocketException e) {
// ignore
}
}
}
return null;
}
}
/**
* Throws a RuntimeException if the boolean condition is false
*/
if (assertion) {
return;
}
throw new RuntimeException (msg);
}
byte b[] = new byte [2];
if (x == 1) {
}
if (x!=2) {
throw new Exception ("read error");
}
if (r != i) {
}
}
}
/* convert signed bytes to unisigned int */
}
byte b[] = new byte [2];
b[0] = (byte) (i / 256);
b[1] = (byte) (i % 256);
}
}
long delay;
super();
}
public void run () {
try {
} catch (Exception e) {
e.printStackTrace();
}
}
}
/*
* Take the given Runnable and run it in a spawned thread
* after the given time has elapsed. runAfter() returns immediately
*/
}
static {
}
static boolean isLinux () {
}
static boolean isWindows () {
}
}