VirtualBox

source: vbox/trunk/src/VBox/NetworkServices/IntNetSwitch/IntNetSwitchInternal.h@ 97046

Last change on this file since 97046 was 97046, checked in by vboxsync, 2 years ago

Devices/DrvIntNet,NetworkServices,Installer/darwin: First rough attempt at making the internal networking option work on macOS after all KEXTs got removed, bugref:10297

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
Line 
1/* $Id: IntNetSwitchInternal.h 97046 2022-10-07 12:57:59Z vboxsync $ */
2/** @file
3 * VirtualBox internal network switch process - Internal header.
4 */
5
6/*
7 * Copyright (C) 2022 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * The contents of this file may alternatively be used under the terms
26 * of the Common Development and Distribution License Version 1.0
27 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
28 * in the VirtualBox distribution, in which case the provisions of the
29 * CDDL are applicable instead of those of the GPL.
30 *
31 * You may elect to license modified versions of this file under the
32 * terms and conditions of either the GPL or the CDDL or both.
33 *
34 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35 */
36
37#ifndef VBOX_INCLUDED_SRC_IntNetSwitch_IntNetSwithInternal_h
38#define VBOX_INCLUDED_SRC_IntNetSwitch_IntNetSwithInternal_h
39#ifndef RT_WITHOUT_PRAGMA_ONCE
40# pragma once
41#endif
42
43
44/*********************************************************************************************************************************
45* Header Files *
46*********************************************************************************************************************************/
47#include <VBox/cdefs.h>
48#include <VBox/types.h>
49
50#undef INTNETR0DECL
51#define INTNETR0DECL INTNETR3DECL
52#undef DECLR0CALLBACKMEMBER
53#define DECLR0CALLBACKMEMBER(type, name, args) DECLR3CALLBACKMEMBER(type, name, args)
54typedef struct SUPDRVSESSION *MYPSUPDRVSESSION;
55#define PSUPDRVSESSION MYPSUPDRVSESSION
56
57#include <VBox/sup.h>
58
59
60/*********************************************************************************************************************************
61* Defined Constants And Macros *
62*********************************************************************************************************************************/
63
64
65/*********************************************************************************************************************************
66* Structures and Typedefs *
67*********************************************************************************************************************************/
68
69/**
70 * Security objectype.
71 */
72typedef enum SUPDRVOBJTYPE
73{
74 /** The usual invalid object. */
75 SUPDRVOBJTYPE_INVALID = 0,
76 /** Internal network. */
77 SUPDRVOBJTYPE_INTERNAL_NETWORK,
78 /** Internal network interface. */
79 SUPDRVOBJTYPE_INTERNAL_NETWORK_INTERFACE,
80 /** The first invalid object type in this end. */
81 SUPDRVOBJTYPE_END,
82 /** The usual 32-bit type size hack. */
83 SUPDRVOBJTYPE_32_BIT_HACK = 0x7ffffff
84} SUPDRVOBJTYPE;
85
86/**
87 * Object destructor callback.
88 * This is called for reference counted objectes when the count reaches 0.
89 *
90 * @param pvObj The object pointer.
91 * @param pvUser1 The first user argument.
92 * @param pvUser2 The second user argument.
93 */
94typedef DECLCALLBACKTYPE(void, FNSUPDRVDESTRUCTOR,(void *pvObj, void *pvUser1, void *pvUser2));
95/** Pointer to a FNSUPDRVDESTRUCTOR(). */
96typedef FNSUPDRVDESTRUCTOR *PFNSUPDRVDESTRUCTOR;
97
98
99RT_C_DECLS_BEGIN
100
101INTNETR3DECL(void *) SUPR0ObjRegister(PSUPDRVSESSION pSession, SUPDRVOBJTYPE enmType,
102 PFNSUPDRVDESTRUCTOR pfnDestructor, void *pvUser1, void *pvUser2);
103INTNETR3DECL(int) SUPR0ObjAddRefEx(void *pvObj, PSUPDRVSESSION pSession, bool fNoBlocking);
104INTNETR3DECL(int) SUPR0ObjAddRef(void *pvObj, PSUPDRVSESSION pSession);
105INTNETR3DECL(int) SUPR0ObjRelease(void *pvObj, PSUPDRVSESSION pSession);
106INTNETR3DECL(int) SUPR0ObjVerifyAccess(void *pvObj, PSUPDRVSESSION pSession, const char *pszObjName);
107INTNETR3DECL(int) SUPR0MemAlloc(PSUPDRVSESSION pSession, uint32_t cb, PRTR0PTR ppvR0, PRTR3PTR ppvR3);
108INTNETR3DECL(int) SUPR0MemFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr);
109
110
111RT_C_DECLS_END
112
113#endif /* !VBOX_INCLUDED_SRC_IntNetSwitch_IntNetSwithInternal_h */
114
Note: See TracBrowser for help on using the repository browser.

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