VirtualBox

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

Last change on this file since 78043 was 76563, checked in by vboxsync, 6 years ago

Additions: Use GA_INCLUDED_ and variations_ as header guard prefixes with scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1/* $Id: VBoxSFInternal.h 76563 2019-01-01 03:53:56Z vboxsync $ */
2/** @file
3 * VBoxSF - Darwin Shared Folders, internal header.
4 */
5
6/*
7 * Copyright (C) 2013-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef GA_INCLUDED_SRC_darwin_VBoxSF_VBoxSFInternal_h
19#define GA_INCLUDED_SRC_darwin_VBoxSF_VBoxSFInternal_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24
25/*********************************************************************************************************************************
26* Header Files *
27*********************************************************************************************************************************/
28#include "VBoxSFMount.h"
29
30#include <libkern/libkern.h>
31#include <iprt/types.h>
32#include <IOKit/IOLib.h>
33#include <IOKit/IOService.h>
34#include <mach/mach_port.h>
35#include <mach/kmod.h>
36#include <mach/mach_types.h>
37#include <sys/errno.h>
38#include <sys/dirent.h>
39#include <sys/lock.h>
40#include <sys/fcntl.h>
41#include <sys/mount.h>
42#include <sys/param.h>
43#include <sys/vnode.h>
44#include <vfs/vfs_support.h>
45#undef PVM
46
47#include <iprt/mem.h>
48#include <VBox/VBoxGuest.h>
49#include <VBox/VBoxGuestLibSharedFolders.h>
50
51
52/*********************************************************************************************************************************
53* Structures and Typedefs *
54*********************************************************************************************************************************/
55/**
56 * Private data we associate with a mount.
57 */
58typedef struct VBOXSFMNTDATA
59{
60 /** The shared folder mapping */
61 VBGLSFMAP hHostFolder;
62 /** The root VNode. */
63 vnode_t pVnRoot;
64 /** User that mounted shared folder (anyone but root?). */
65 uid_t uidMounter;
66 /** The mount info from the mount() call. */
67 VBOXSFDRWNMOUNTINFO MntInfo;
68} VBOXSFMNTDATA;
69/** Pointer to private mount data. */
70typedef VBOXSFMNTDATA *PVBOXSFMNTDATA;
71
72/**
73 * Private data we associate with a VNode.
74 */
75typedef struct VBOXSFDWNVNDATA
76{
77 /** The handle to the host object. */
78 SHFLHANDLE hHandle;
79 ///PSHFLSTRING pPath; /** Path within shared folder */
80 ///lck_attr_t *pLockAttr; /** BSD locking stuff */
81 ///lck_rw_t *pLock; /** BSD locking stuff */
82} VBOXSFDWNVNDATA;
83/** Pointer to private vnode data. */
84typedef VBOXSFDWNVNDATA *PVBOXSFDWNVNDATA;
85
86
87
88/*********************************************************************************************************************************
89* Global Variables *
90*********************************************************************************************************************************/
91extern VBGLSFCLIENT g_SfClientDarwin;
92extern uint32_t volatile g_cVBoxSfMounts;
93extern struct vfsops g_VBoxSfVfsOps;
94extern struct vnodeopv_desc g_VBoxSfVnodeOpvDesc;
95extern int (**g_papfnVBoxSfDwnVnDirOpsVector)(void *);
96
97
98
99/*********************************************************************************************************************************
100* Functions *
101*********************************************************************************************************************************/
102bool vboxSfDwnConnect(void);
103vnode_t vboxSfDwnVnAlloc(mount_t pMount, enum vtype enmType, vnode_t pParent, uint64_t cbFile);
104
105
106#endif /* !GA_INCLUDED_SRC_darwin_VBoxSF_VBoxSFInternal_h */
107
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