1 | /* $Id: PDMNetShaperR0.cpp 42064 2012-07-09 15:31:05Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * PDM Network Shaper - Limit network traffic according to bandwidth
|
---|
4 | * group settings [R0 part].
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2011-2012 Oracle Corporation
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | */
|
---|
18 |
|
---|
19 |
|
---|
20 | /*******************************************************************************
|
---|
21 | * Header Files *
|
---|
22 | *******************************************************************************/
|
---|
23 | #define LOG_GROUP LOG_GROUP_NET_SHAPER
|
---|
24 |
|
---|
25 | #include <VBox/vmm/pdm.h>
|
---|
26 | #include <VBox/log.h>
|
---|
27 | #include <iprt/time.h>
|
---|
28 |
|
---|
29 | #include <VBox/vmm/pdmnetshaper.h>
|
---|
30 | #include <VBox/vmm/pdmnetshaperint.h>
|
---|
31 |
|
---|
32 |
|
---|
33 | /**
|
---|
34 | * Obtain bandwidth in a bandwidth group (R0 version).
|
---|
35 | *
|
---|
36 | * @returns VBox status code.
|
---|
37 | * @param pFilter Pointer to the filter that allocates bandwidth.
|
---|
38 | * @param cbTransfer Number of bytes to allocate.
|
---|
39 | */
|
---|
40 | VMMR0DECL(bool) PDMR0NsAllocateBandwidth(PPDMNSFILTER pFilter, size_t cbTransfer)
|
---|
41 | {
|
---|
42 | return pdmNsAllocateBandwidth(pFilter, cbTransfer);
|
---|
43 | }
|
---|