1 | /* $Id: vboxvfs.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * Description.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2023 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_freebsd_vboxvfs_vboxvfs_h
|
---|
29 | #define GA_INCLUDED_SRC_freebsd_vboxvfs_vboxvfs_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | #define VBOXVFS_VFSNAME "vboxvfs"
|
---|
35 | #define VBOXVFS_VERSION 1
|
---|
36 |
|
---|
37 | #define MAX_HOST_NAME 256
|
---|
38 | #define MAX_NLS_NAME 32
|
---|
39 |
|
---|
40 | struct vboxvfs_mount_info {
|
---|
41 | char name[MAX_HOST_NAME];
|
---|
42 | char nls_name[MAX_NLS_NAME];
|
---|
43 | int uid;
|
---|
44 | int gid;
|
---|
45 | int ttl;
|
---|
46 | };
|
---|
47 |
|
---|
48 | #ifdef _KERNEL
|
---|
49 |
|
---|
50 | #include <VBox/VBoxGuestLibSharedFolders.h>
|
---|
51 | #include <sys/mount.h>
|
---|
52 | #include <sys/vnode.h>
|
---|
53 |
|
---|
54 | struct vboxvfsmount {
|
---|
55 | uid_t uid;
|
---|
56 | gid_t gid;
|
---|
57 | mode_t file_mode;
|
---|
58 | mode_t dir_mode;
|
---|
59 | struct mount *mp;
|
---|
60 | struct ucred *owner;
|
---|
61 | u_int flags;
|
---|
62 | long nextino;
|
---|
63 | int caseopt;
|
---|
64 | int didrele;
|
---|
65 | };
|
---|
66 |
|
---|
67 | /* structs - stolen from the linux shared module code */
|
---|
68 | struct sf_glob_info {
|
---|
69 | VBGLSFMAP map;
|
---|
70 | /* struct nls_table *nls;*/
|
---|
71 | int ttl;
|
---|
72 | int uid;
|
---|
73 | int gid;
|
---|
74 | struct vnode *vnode_root;
|
---|
75 | };
|
---|
76 |
|
---|
77 | struct sf_inode_info {
|
---|
78 | SHFLSTRING *path;
|
---|
79 | int force_restat;
|
---|
80 | };
|
---|
81 |
|
---|
82 | #if 0
|
---|
83 | struct sf_dir_info {
|
---|
84 | struct list_head info_list;
|
---|
85 | };
|
---|
86 | #endif
|
---|
87 |
|
---|
88 | struct sf_dir_buf {
|
---|
89 | size_t nb_entries;
|
---|
90 | size_t free_bytes;
|
---|
91 | size_t used_bytes;
|
---|
92 | void *buf;
|
---|
93 | #if 0
|
---|
94 | struct list_head head;
|
---|
95 | #endif
|
---|
96 | };
|
---|
97 |
|
---|
98 | struct sf_reg_info {
|
---|
99 | SHFLHANDLE handle;
|
---|
100 | };
|
---|
101 |
|
---|
102 | #endif /* KERNEL */
|
---|
103 |
|
---|
104 | #endif /* !GA_INCLUDED_SRC_freebsd_vboxvfs_vboxvfs_h */
|
---|
105 |
|
---|