VirtualBox

source: vbox/trunk/src/VBox/Additions/solaris/SharedFolders/vboxvfs.h@ 11444

Last change on this file since 11444 was 10347, checked in by vboxsync, 16 years ago

Solaris vboxvfs bits.

  • Property svn:eol-style set to native
  • Property svn:keyword set to Id
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1/* $Id: vboxvfs.h 10347 2008-07-08 06:23:10Z vboxsync $ */
2/** @file
3 * VirtualBox File System Driver for Solaris Guests, Internal Header.
4 */
5
6/*
7 * Copyright (C) 2008 Sun Microsystems, Inc.
8 *
9 * Sun Microsystems, Inc. confidential
10 * All rights reserved
11 */
12
13#ifndef ___VBoxVFS_Solaris_h
14#define ___VBoxVFS_Solaris_h
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#define MAX_HOST_NAME 256
21#define MAX_NLS_NAME 32
22
23/** The module name. */
24#define DEVICE_NAME "vboxvfs"
25/** The module description as seen in 'modinfo'. */
26#define DEVICE_DESC "filesystem for VirtualBox Shared Folders"
27
28/* Not sure if we need this; it seems only necessary for kernel mounts. */
29#if 0
30typedef struct vboxvfs_mountinfo
31{
32 char name[MAX_HOST_NAME];
33 char nls_name[MAX_NLS_NAME];
34 int uid;
35 int gid;
36 int ttl;
37} vboxvfs_mountinfo_t;
38#endif
39
40#ifdef _KERNEL
41
42#include "../../common/VBoxGuestLib/VBoxCalls.h"
43#include <sys/vfs.h>
44#include <sys/vfs_opreg.h>
45
46/** VNode for VBoxVFS */
47typedef struct vboxvfs_vnode
48{
49 vnode_t *pVNode;
50 vattr_t Attr;
51 SHFLSTRING *pPath;
52 kmutex_t MtxContents;
53} vboxvfs_vnode_t;
54
55
56/** Per-file system mount instance data. */
57typedef struct vboxvfs_globinfo
58{
59 VBSFMAP Map;
60 int Ttl;
61 int Uid;
62 int Gid;
63 vfs_t *pVFS;
64 vboxvfs_vnode_t *pVNodeRoot;
65 kmutex_t MtxFS;
66} vboxvfs_globinfo_t;
67
68extern struct vnodeops *g_pVBoxVFS_vnodeops;
69extern const fs_operation_def_t g_VBoxVFS_vnodeops_template[];
70extern VBSFCLIENT g_VBoxVFSClient;
71
72/** Helper functions */
73extern int vboxvfs_Stat(const char *pszCaller, vboxvfs_globinfo_t *pVBoxVFSGlobalInfo, SHFLSTRING *pPath,
74 RTFSOBJINFO *pResult, boolean_t fAllowFailure);
75extern void vboxvfs_InitVNode(vboxvfs_globinfo_t *pVBoxVFSGlobalInfo, vboxvfs_vnode_t *pVBoxVNode,
76 RTFSOBJINFO *pFSInfo);
77
78
79/** Helper macros */
80#define VFS_TO_VBOXVFS(vfs) ((vboxvfs_globinfo_t *)((vfs)->vfs_data))
81#define VBOXVFS_TO_VFS(vboxvfs) ((vboxvfs)->pVFS)
82#define VN_TO_VBOXVN(vnode) ((vboxvfs_vnode_t *)((vnode)->v_data))
83#define VBOXVN_TO_VN(vboxvnode) ((vboxvnode)->pVNode)
84
85#endif /* _KERNEL */
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif /* ___VBoxVFS_Solaris_h */
92
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