TestVBoxNATEngine.java revision 7ba82c7d0f6cbcd73aafe4143238673bb569ebe7
/* $Id$ */
* be used to connect to the webservice and (XP)COM APIs. */
/*
* Copyright (C) 2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
import org.virtualbox_4_3.*;
public class TestVBoxNATEngine
{
{
boolean inaccessible = false;
/* different chipsets might have different number of attachments */
new INetworkAdapter[
try
{
/*
* Dump adapters and if it's got NAT attachment
* dump it settings
*/
{
/* select available and NATs only. */
if (n == null)
continue;
{
for (;itPortForward.hasNext();)
{
}
{
/* name,proto,hostip,host,hostport,guestip,guestport */
pfAttributes[2],
new Integer(
pfAttributes[4],
}
}
}
}
catch (VBoxException e)
{
name = "<inaccessible>";
inaccessible = true;
}
}
{
}
{
boolean ws = false;
{
ws = true;
}
if (ws)
{
try {
} catch (VBoxException e) {
e.printStackTrace();
}
}
try
{
{
{
{
{
vm = m;
break;
}
}
}
else
{
//testEvents(mgr, vbox.getEventSource());
}
}
}
catch (VBoxException e)
{
e.printStackTrace();
}
{
e.printStackTrace();
}
if (ws)
{
try {
mgr.disconnect();
} catch (VBoxException e) {
e.printStackTrace();
}
}
/* cleanup do the disconnect */
}
{
new TestVBoxNATEngine(args);
}
}