tstIntNet-1.cpp revision f7e97a8ea8de96814fab985f8b3fd0410e5f6d13
/* $Id$ */
/** @file
* VBox - Testcase for internal networking, simple NetFlt trunk creation.
*/
/*
* Copyright (C) 2006-2007 Sun Microsystems, Inc.
*
* 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.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include <iprt/initterm.h>
/*******************************************************************************
* Global Variables *
*******************************************************************************/
static int g_cErrors = 0;
{
/*
* Init the runtime, open the support driver and load VMMR0.r0.
*/
RTR3Init(false, 0);
RTPrintf("tstIntNet-1: TESTING...\n");
/*
* Open the session, load ring-0 and issue the request.
*/
if (RT_FAILURE(rc))
{
return 1;
}
char szPath[RTPATH_MAX];
if (RT_FAILURE(rc))
{
return 1;
}
if (RT_FAILURE(rc))
{
return 1;
}
/*
* Create the request, picking the network and trunk names from argv[2]
* and argv[1] if present.
*/
if (argc >= 2)
else
if (argc >= 2)
else
#ifdef RT_OS_DARWIN
#elif defined(RT_OS_LINUX)
#else
#endif
/*
* Issue the request.
*/
RTThreadSleep(250);
if (RT_SUCCESS(rc))
{
}
else
{
g_cErrors++;
}
RTThreadSleep(1000);
SUPTerm(false /* not forced */);
/*
* Summary.
*/
if (!g_cErrors)
RTPrintf("tstIntNet-1: SUCCESS\n");
else
return !!g_cErrors;
}