VirtualBox

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

Last change on this file since 97058 was 97058, checked in by vboxsync, 3 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 [scm and svn property fixes]

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1/* $Id: IntNetSwitchInternal.h 97058 2022-10-08 07:01:53Z 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.215389.xyz.
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 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef VBOX_INCLUDED_SRC_IntNetSwitch_IntNetSwitchInternal_h
29#define VBOX_INCLUDED_SRC_IntNetSwitch_IntNetSwitchInternal_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34
35/*********************************************************************************************************************************
36* Header Files *
37*********************************************************************************************************************************/
38#include <VBox/cdefs.h>
39#include <VBox/types.h>
40
41#undef INTNETR0DECL
42#define INTNETR0DECL INTNETR3DECL
43#undef DECLR0CALLBACKMEMBER
44#define DECLR0CALLBACKMEMBER(type, name, args) DECLR3CALLBACKMEMBER(type, name, args)
45typedef struct SUPDRVSESSION *MYPSUPDRVSESSION;
46#define PSUPDRVSESSION MYPSUPDRVSESSION
47
48#include <VBox/sup.h>
49
50
51/*********************************************************************************************************************************
52* Defined Constants And Macros *
53*********************************************************************************************************************************/
54
55
56/*********************************************************************************************************************************
57* Structures and Typedefs *
58*********************************************************************************************************************************/
59
60/**
61 * Security objectype.
62 */
63typedef enum SUPDRVOBJTYPE
64{
65 /** The usual invalid object. */
66 SUPDRVOBJTYPE_INVALID = 0,
67 /** Internal network. */
68 SUPDRVOBJTYPE_INTERNAL_NETWORK,
69 /** Internal network interface. */
70 SUPDRVOBJTYPE_INTERNAL_NETWORK_INTERFACE,
71 /** The first invalid object type in this end. */
72 SUPDRVOBJTYPE_END,
73 /** The usual 32-bit type size hack. */
74 SUPDRVOBJTYPE_32_BIT_HACK = 0x7ffffff
75} SUPDRVOBJTYPE;
76
77/**
78 * Object destructor callback.
79 * This is called for reference counted objectes when the count reaches 0.
80 *
81 * @param pvObj The object pointer.
82 * @param pvUser1 The first user argument.
83 * @param pvUser2 The second user argument.
84 */
85typedef DECLCALLBACKTYPE(void, FNSUPDRVDESTRUCTOR,(void *pvObj, void *pvUser1, void *pvUser2));
86/** Pointer to a FNSUPDRVDESTRUCTOR(). */
87typedef FNSUPDRVDESTRUCTOR *PFNSUPDRVDESTRUCTOR;
88
89
90RT_C_DECLS_BEGIN
91
92INTNETR3DECL(void *) SUPR0ObjRegister(PSUPDRVSESSION pSession, SUPDRVOBJTYPE enmType,
93 PFNSUPDRVDESTRUCTOR pfnDestructor, void *pvUser1, void *pvUser2);
94INTNETR3DECL(int) SUPR0ObjAddRefEx(void *pvObj, PSUPDRVSESSION pSession, bool fNoBlocking);
95INTNETR3DECL(int) SUPR0ObjAddRef(void *pvObj, PSUPDRVSESSION pSession);
96INTNETR3DECL(int) SUPR0ObjRelease(void *pvObj, PSUPDRVSESSION pSession);
97INTNETR3DECL(int) SUPR0ObjVerifyAccess(void *pvObj, PSUPDRVSESSION pSession, const char *pszObjName);
98INTNETR3DECL(int) SUPR0MemAlloc(PSUPDRVSESSION pSession, uint32_t cb, PRTR0PTR ppvR0, PRTR3PTR ppvR3);
99INTNETR3DECL(int) SUPR0MemFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr);
100
101
102RT_C_DECLS_END
103
104#endif /* !VBOX_INCLUDED_SRC_IntNetSwitch_IntNetSwitchInternal_h */
105
Note: See TracBrowser for help on using the repository browser.

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