VirtualBox

source: vbox/trunk/include/VBox/vmm/pdmnetshaper.h@ 76404

最後變更 在這個檔案從76404是 76404,由 vboxsync 提交於 6 年 前

VBox/vmm/pdmnetshaper.h,pdmdev.h: Don't include err.h and assert.h in the former, and don't include the former from the latter. bugref:9344

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.5 KB
 
1/** @file
2 * PDM - Pluggable Device Manager, Network Shaper.
3 */
4
5/*
6 * Copyright (C) 2011-2017 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.alldomusa.eu.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef ___VBox_vmm_pdmnetshaper_h
27#define ___VBox_vmm_pdmnetshaper_h
28
29#include <VBox/types.h>
30#include <VBox/vmm/pdmnetifs.h>
31#include <iprt/sg.h>
32
33
34/** @defgroup grp_pdm_net_shaper The PDM Network Shaper API
35 * @ingroup grp_pdm
36 * @{
37 */
38
39
40#define PDM_NETSHAPER_MIN_BUCKET_SIZE UINT32_C(65536) /**< bytes */
41#define PDM_NETSHAPER_MAX_LATENCY UINT32_C(100) /**< milliseconds */
42
43RT_C_DECLS_BEGIN
44
45typedef struct PDMNSFILTER
46{
47 /** Pointer to the next group in the list (ring-3). */
48 R3PTRTYPE(struct PDMNSFILTER *) pNextR3;
49 /** Pointer to the bandwidth group (ring-3). */
50 R3PTRTYPE(struct PDMNSBWGROUP *) pBwGroupR3;
51 /** Pointer to the bandwidth group (ring-0). */
52 R0PTRTYPE(struct PDMNSBWGROUP *) pBwGroupR0;
53 /** Set when the filter fails to obtain bandwidth. */
54 bool fChoked;
55 /** Aligment padding. */
56 bool afPadding[HC_ARCH_BITS == 32 ? 3 : 7];
57 /** The driver this filter is aggregated into (ring-3). */
58 R3PTRTYPE(PPDMINETWORKDOWN) pIDrvNetR3;
59} PDMNSFILTER;
60
61VMMDECL(bool) PDMNsAllocateBandwidth(PPDMNSFILTER pFilter, size_t cbTransfer);
62VMMR3_INT_DECL(int) PDMR3NsAttach(PUVM pUVM, PPDMDRVINS pDrvIns, const char *pcszBwGroup, PPDMNSFILTER pFilter);
63VMMR3_INT_DECL(int) PDMR3NsDetach(PUVM pUVM, PPDMDRVINS pDrvIns, PPDMNSFILTER pFilter);
64VMMR3DECL(int) PDMR3NsBwGroupSetLimit(PUVM pUVM, const char *pszBwGroup, uint64_t cbPerSecMax);
65
66/** @} */
67
68RT_C_DECLS_END
69
70#endif
71
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette