VirtualBox

source: vbox/trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs.h@ 96407

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

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keyword set to Id
  • Property svn:keywords set to Id Revision
File size: 3.2 KB
Line 
1/* $Id: vboxfs.h 96407 2022-08-22 17:43:14Z vboxsync $ */
2/** @file
3 * VirtualBox File System Driver for Solaris Guests, Internal Header.
4 */
5
6/*
7 * Copyright (C) 2009-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 GA_INCLUDED_SRC_solaris_SharedFolders_vboxfs_h
38#define GA_INCLUDED_SRC_solaris_SharedFolders_vboxfs_h
39#ifndef RT_WITHOUT_PRAGMA_ONCE
40# pragma once
41#endif
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47#define MAX_HOST_NAME 256
48#define MAX_NLS_NAME 32
49/** Default stat cache ttl (in ms) */
50#define DEF_STAT_TTL_MS 200
51
52/** The module name. */
53#define DEVICE_NAME "vboxfs"
54
55#ifdef _KERNEL
56
57#include <VBox/VBoxGuestLibSharedFolders.h>
58#include <sys/vfs.h>
59
60/** VNode for VBoxVFS */
61typedef struct vboxvfs_vnode
62{
63 vnode_t *pVNode;
64 vattr_t Attr;
65 SHFLSTRING *pPath;
66 kmutex_t MtxContents;
67} vboxvfs_vnode_t;
68
69
70/** Per-file system mount instance data. */
71typedef struct vboxvfs_globinfo
72{
73 VBGLSFMAP Map;
74 int Ttl;
75 int Uid;
76 int Gid;
77 vfs_t *pVFS;
78 vboxvfs_vnode_t *pVNodeRoot;
79 kmutex_t MtxFS;
80} vboxvfs_globinfo_t;
81
82extern struct vnodeops *g_pVBoxVFS_vnodeops;
83extern const fs_operation_def_t g_VBoxVFS_vnodeops_template[];
84extern VBGLSFCLIENT g_VBoxVFSClient;
85
86/** Helper functions */
87extern int vboxvfs_Stat(const char *pszCaller, vboxvfs_globinfo_t *pVBoxVFSGlobalInfo, SHFLSTRING *pPath,
88 PSHFLFSOBJINFO pResult, boolean_t fAllowFailure);
89extern void vboxvfs_InitVNode(vboxvfs_globinfo_t *pVBoxVFSGlobalInfo, vboxvfs_vnode_t *pVBoxVNode,
90 PSHFLFSOBJINFO pFSInfo);
91
92
93/** Helper macros */
94#define VFS_TO_VBOXVFS(vfs) ((vboxvfs_globinfo_t *)((vfs)->vfs_data))
95#define VBOXVFS_TO_VFS(vboxvfs) ((vboxvfs)->pVFS)
96#define VN_TO_VBOXVN(vnode) ((vboxvfs_vnode_t *)((vnode)->v_data))
97#define VBOXVN_TO_VN(vboxvnode) ((vboxvnode)->pVNode)
98
99#endif /* _KERNEL */
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif /* !GA_INCLUDED_SRC_solaris_SharedFolders_vboxfs_h */
106
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