VirtualBox

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

Last change on this file since 106683 was 106061, checked in by vboxsync, 2 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1/* $Id: IntNetSwitchInternal.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VirtualBox internal network switch process - Internal header.
4 */
5
6/*
7 * Copyright (C) 2022-2024 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 * 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#define IN_INTNET_TESTCASE
39#define IN_INTNET_R3
40
41#include <VBox/cdefs.h>
42#include <VBox/types.h>
43
44#undef INTNETR0DECL
45#define INTNETR0DECL INTNETR3DECL
46#undef DECLR0CALLBACKMEMBER
47#define DECLR0CALLBACKMEMBER(type, name, args) DECLR3CALLBACKMEMBER(type, name, args)
48typedef struct SUPDRVSESSION *MYPSUPDRVSESSION;
49#define PSUPDRVSESSION MYPSUPDRVSESSION
50
51#include <VBox/intnet.h>
52#include <VBox/sup.h>
53
54
55/*********************************************************************************************************************************
56* Defined Constants And Macros *
57*********************************************************************************************************************************/
58
59
60/*********************************************************************************************************************************
61* Structures and Typedefs *
62*********************************************************************************************************************************/
63
64/**
65 * Security objectype.
66 */
67typedef enum SUPDRVOBJTYPE
68{
69 /** The usual invalid object. */
70 SUPDRVOBJTYPE_INVALID = 0,
71 /** Internal network. */
72 SUPDRVOBJTYPE_INTERNAL_NETWORK,
73 /** Internal network interface. */
74 SUPDRVOBJTYPE_INTERNAL_NETWORK_INTERFACE,
75 /** The first invalid object type in this end. */
76 SUPDRVOBJTYPE_END,
77 /** The usual 32-bit type size hack. */
78 SUPDRVOBJTYPE_32_BIT_HACK = 0x7ffffff
79} SUPDRVOBJTYPE;
80
81/**
82 * Object destructor callback.
83 * This is called for reference counted objectes when the count reaches 0.
84 *
85 * @param pvObj The object pointer.
86 * @param pvUser1 The first user argument.
87 * @param pvUser2 The second user argument.
88 */
89typedef DECLCALLBACKTYPE(void, FNSUPDRVDESTRUCTOR,(void *pvObj, void *pvUser1, void *pvUser2));
90/** Pointer to a FNSUPDRVDESTRUCTOR(). */
91typedef FNSUPDRVDESTRUCTOR *PFNSUPDRVDESTRUCTOR;
92
93
94RT_C_DECLS_BEGIN
95
96INTNETR3DECL(void *) SUPR0ObjRegister(PSUPDRVSESSION pSession, SUPDRVOBJTYPE enmType,
97 PFNSUPDRVDESTRUCTOR pfnDestructor, void *pvUser1, void *pvUser2);
98INTNETR3DECL(int) SUPR0ObjAddRefEx(void *pvObj, PSUPDRVSESSION pSession, bool fNoBlocking);
99INTNETR3DECL(int) SUPR0ObjAddRef(void *pvObj, PSUPDRVSESSION pSession);
100INTNETR3DECL(int) SUPR0ObjRelease(void *pvObj, PSUPDRVSESSION pSession);
101INTNETR3DECL(int) SUPR0ObjVerifyAccess(void *pvObj, PSUPDRVSESSION pSession, const char *pszObjName);
102INTNETR3DECL(int) SUPR0MemAlloc(PSUPDRVSESSION pSession, uint32_t cb, PRTR0PTR ppvR0, PRTR3PTR ppvR3);
103INTNETR3DECL(int) SUPR0MemFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr);
104
105
106RT_C_DECLS_END
107
108#endif /* !VBOX_INCLUDED_SRC_IntNetSwitch_IntNetSwitchInternal_h */
109
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