PDMNetShaper.cpp revision 8980aa28561182fb74d04933f92587f7e28e9ca8
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * PDM Network Shaper - Limit network traffic according to bandwidth
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * group settings.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Copyright (C) 2011-2012 Oracle Corporation
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * available from http://www.virtualbox.org. This file is free software;
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * you can redistribute it and/or modify it under the terms of the GNU
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * General Public License (GPL) as published by the Free Software
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/*******************************************************************************
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync* Header Files *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync*******************************************************************************/
typedef struct PDMNETSHAPER
} PDMNETSHAPER;
while ( pBwGroup
return pBwGroup;
while ( pPrev
static int pdmNsBwGroupCreate(PPDMNETSHAPER pShaper, const char *pcszBwGroup, uint64_t cbTransferPerSecMax)
int rc;
if (!pBwGroup)
return VINF_SUCCESS;
return rc;
while (pFilter)
while ( pPrev
if (pcszBwGroup)
if (pBwGroupNew)
if (pBwGroupOld)
return rc;
if (pBwGroup)
return rc;
VMMR3DECL(int) PDMR3NsBwGroupSetLimit(PVM pVM, const char *pcszBwGroup, uint64_t cbTransferPerSecMax)
if (pBwGroup)
return rc;
while (pBwGroup)
return VINF_SUCCESS;
return VINF_SUCCESS;
while (pBwGroup)
return VINF_SUCCESS;
sizeof(PDMNETSHAPER),
(void **)&pNetShaper);
if (pCfgBwGrp)
if (!pszBwGrpId)
static unsigned iThread;
return VINF_SUCCESS;
return rc;