1 | /* $Id: SrvIntNetWrapper.cpp 97084 2022-10-11 06:51:17Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * Internal networking - Wrapper for the R0 network service.
|
---|
4 | *
|
---|
5 | * This is a bit hackish as we're mixing context here, however it is
|
---|
6 | * very useful when making changes to the internal networking service.
|
---|
7 | */
|
---|
8 |
|
---|
9 | /*
|
---|
10 | * Copyright (C) 2006-2022 Oracle and/or its affiliates.
|
---|
11 | *
|
---|
12 | * This file is part of VirtualBox base platform packages, as
|
---|
13 | * available from https://www.virtualbox.org.
|
---|
14 | *
|
---|
15 | * This program is free software; you can redistribute it and/or
|
---|
16 | * modify it under the terms of the GNU General Public License
|
---|
17 | * as published by the Free Software Foundation, in version 3 of the
|
---|
18 | * License.
|
---|
19 | *
|
---|
20 | * This program is distributed in the hope that it will be useful, but
|
---|
21 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
23 | * General Public License for more details.
|
---|
24 | *
|
---|
25 | * You should have received a copy of the GNU General Public License
|
---|
26 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
27 | *
|
---|
28 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
29 | */
|
---|
30 |
|
---|
31 |
|
---|
32 | /*********************************************************************************************************************************
|
---|
33 | * Header Files *
|
---|
34 | *********************************************************************************************************************************/
|
---|
35 | #include "IntNetSwitchInternal.h"
|
---|
36 |
|
---|
37 | #include <iprt/asm.h>
|
---|
38 | #include <iprt/mp.h>
|
---|
39 |
|
---|
40 |
|
---|
41 | /*********************************************************************************************************************************
|
---|
42 | * Structures and Typedefs *
|
---|
43 | *********************************************************************************************************************************/
|
---|
44 |
|
---|
45 |
|
---|
46 | /*********************************************************************************************************************************
|
---|
47 | * Global Variables *
|
---|
48 | *********************************************************************************************************************************/
|
---|
49 |
|
---|
50 | /* Fake non-existing ring-0 APIs. */
|
---|
51 | #define RTThreadIsInInterrupt(hThread) false
|
---|
52 | #define RTThreadPreemptIsEnabled(hThread) true
|
---|
53 | #define RTMpCpuId() 0
|
---|
54 |
|
---|
55 | /* No CLI/POPF, please. */
|
---|
56 | #include <iprt/spinlock.h>
|
---|
57 | #undef RTSPINLOCK_FLAGS_INTERRUPT_SAFE
|
---|
58 | #define RTSPINLOCK_FLAGS_INTERRUPT_SAFE RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE
|
---|
59 |
|
---|
60 |
|
---|
61 | /* ugly but necessary for making R0 code compilable for R3. */
|
---|
62 | #undef LOG_GROUP
|
---|
63 | #include "../../Devices/Network/SrvIntNetR0.cpp"
|
---|