VirtualBox

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

Last change on this file since 53402 was 33994, checked in by vboxsync, 14 years ago

shfl: Replaced RTFSOBJINFO and RTFSPROPERTIES with shared folder specific versions. IPRT structures like this should never have been exposed to the guest.

  • Property svn:eol-style set to native
  • Property svn:keyword set to Id
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1/* $Id: vboxfs.h 33994 2010-11-11 14:26:08Z vboxsync $ */
2/** @file
3 * VirtualBox File System Driver for Solaris Guests, Internal Header.
4 */
5
6/*
7 * Copyright (C) 2009-2010 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 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef ___VBoxVFS_Solaris_h
28#define ___VBoxVFS_Solaris_h
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#define MAX_HOST_NAME 256
35#define MAX_NLS_NAME 32
36/** Default stat cache ttl (in ms) */
37#define DEF_STAT_TTL_MS 200
38
39/** The module name. */
40#define DEVICE_NAME "vboxfs"
41
42#ifdef _KERNEL
43
44#include "../../common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.h"
45#include <sys/vfs.h>
46
47/** VNode for VBoxVFS */
48typedef struct vboxvfs_vnode
49{
50 vnode_t *pVNode;
51 vattr_t Attr;
52 SHFLSTRING *pPath;
53 kmutex_t MtxContents;
54} vboxvfs_vnode_t;
55
56
57/** Per-file system mount instance data. */
58typedef struct vboxvfs_globinfo
59{
60 VBSFMAP Map;
61 int Ttl;
62 int Uid;
63 int Gid;
64 vfs_t *pVFS;
65 vboxvfs_vnode_t *pVNodeRoot;
66 kmutex_t MtxFS;
67} vboxvfs_globinfo_t;
68
69extern struct vnodeops *g_pVBoxVFS_vnodeops;
70extern const fs_operation_def_t g_VBoxVFS_vnodeops_template[];
71extern VBSFCLIENT g_VBoxVFSClient;
72
73/** Helper functions */
74extern int vboxvfs_Stat(const char *pszCaller, vboxvfs_globinfo_t *pVBoxVFSGlobalInfo, SHFLSTRING *pPath,
75 PSHFLFSOBJINFO pResult, boolean_t fAllowFailure);
76extern void vboxvfs_InitVNode(vboxvfs_globinfo_t *pVBoxVFSGlobalInfo, vboxvfs_vnode_t *pVBoxVNode,
77 PSHFLFSOBJINFO pFSInfo);
78
79
80/** Helper macros */
81#define VFS_TO_VBOXVFS(vfs) ((vboxvfs_globinfo_t *)((vfs)->vfs_data))
82#define VBOXVFS_TO_VFS(vboxvfs) ((vboxvfs)->pVFS)
83#define VN_TO_VBOXVN(vnode) ((vboxvfs_vnode_t *)((vnode)->v_data))
84#define VBOXVN_TO_VN(vboxvnode) ((vboxvnode)->pVNode)
85
86#endif /* _KERNEL */
87
88#ifdef __cplusplus
89}
90#endif
91
92#endif /* !___VBoxVFS_Solaris_h */
93
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