VirtualBox

source: vbox/trunk/src/VBox/Additions/darwin/VBoxSF/VBoxSFInternal.h@ 107044

Last change on this file since 107044 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.5 KB
Line 
1/* $Id: VBoxSFInternal.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VBoxSF - Darwin Shared Folders, internal header.
4 */
5
6/*
7 * Copyright (C) 2013-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 GA_INCLUDED_SRC_darwin_VBoxSF_VBoxSFInternal_h
29#define GA_INCLUDED_SRC_darwin_VBoxSF_VBoxSFInternal_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34
35/*********************************************************************************************************************************
36* Header Files *
37*********************************************************************************************************************************/
38#include "VBoxSFMount.h"
39
40#include <libkern/libkern.h>
41#include <iprt/types.h>
42#include <IOKit/IOLib.h>
43#include <IOKit/IOService.h>
44#include <mach/mach_port.h>
45#include <mach/kmod.h>
46#include <mach/mach_types.h>
47#include <sys/errno.h>
48#include <sys/dirent.h>
49#include <sys/lock.h>
50#include <sys/fcntl.h>
51#include <sys/mount.h>
52#include <sys/param.h>
53#include <sys/vnode.h>
54#include <vfs/vfs_support.h>
55#undef PVM
56
57#include <iprt/mem.h>
58#include <VBox/VBoxGuest.h>
59#include <VBox/VBoxGuestLibSharedFolders.h>
60
61
62/*********************************************************************************************************************************
63* Structures and Typedefs *
64*********************************************************************************************************************************/
65/**
66 * Private data we associate with a mount.
67 */
68typedef struct VBOXSFMNTDATA
69{
70 /** The shared folder mapping */
71 VBGLSFMAP hHostFolder;
72 /** The root VNode. */
73 vnode_t pVnRoot;
74 /** User that mounted shared folder (anyone but root?). */
75 uid_t uidMounter;
76 /** The mount info from the mount() call. */
77 VBOXSFDRWNMOUNTINFO MntInfo;
78} VBOXSFMNTDATA;
79/** Pointer to private mount data. */
80typedef VBOXSFMNTDATA *PVBOXSFMNTDATA;
81
82/**
83 * Private data we associate with a VNode.
84 */
85typedef struct VBOXSFDWNVNDATA
86{
87 /** The handle to the host object. */
88 SHFLHANDLE hHandle;
89 ///PSHFLSTRING pPath; /** Path within shared folder */
90 ///lck_attr_t *pLockAttr; /** BSD locking stuff */
91 ///lck_rw_t *pLock; /** BSD locking stuff */
92} VBOXSFDWNVNDATA;
93/** Pointer to private vnode data. */
94typedef VBOXSFDWNVNDATA *PVBOXSFDWNVNDATA;
95
96
97
98/*********************************************************************************************************************************
99* Global Variables *
100*********************************************************************************************************************************/
101extern VBGLSFCLIENT g_SfClientDarwin;
102extern uint32_t volatile g_cVBoxSfMounts;
103extern struct vfsops g_VBoxSfVfsOps;
104extern struct vnodeopv_desc g_VBoxSfVnodeOpvDesc;
105extern int (**g_papfnVBoxSfDwnVnDirOpsVector)(void *);
106
107
108
109/*********************************************************************************************************************************
110* Functions *
111*********************************************************************************************************************************/
112bool vboxSfDwnConnect(void);
113vnode_t vboxSfDwnVnAlloc(mount_t pMount, enum vtype enmType, vnode_t pParent, uint64_t cbFile);
114
115
116#endif /* !GA_INCLUDED_SRC_darwin_VBoxSF_VBoxSFInternal_h */
117
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