netatalk  4.4.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
vfs.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2004 Didier Gautheron
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17*/
18
23
24#ifndef ATALK_VFS_H
25#define ATALK_VFS_H
26
27#ifdef HAVE_CONFIG_H
28#include "config.h"
29#endif /* HAVE_CONFIG_H */
30
31#include <atalk/acl.h>
32#include <atalk/adouble.h>
33#include <atalk/volume.h>
34
36#define VFS_MODULES_MAX 3
37
38/* Function argument types for VFS operations */
39typedef int (*vfs_validupath_fn)(const struct vol *vol, const char *name);
40typedef int (*vfs_chown_fn)(const struct vol *vol, const char *path, uid_t uid,
41 gid_t gid);
42typedef int (*vfs_renamedir_fn)(const struct vol *vol, int dirfd,
43 const char *oldpath, const char *newpath);
44typedef int (*vfs_deletecurdir_fn)(const struct vol *vol);
45typedef int (*vfs_setfilmode_fn)(const struct vol *vol, const char *name,
46 mode_t mode, struct stat *st);
47typedef int (*vfs_setdirmode_fn)(const struct vol *vol, const char *name,
48 mode_t mode, struct stat *st);
49typedef int (*vfs_setdirunixmode_fn)(const struct vol *vol, const char *name,
50 mode_t mode, struct stat *st);
51typedef int (*vfs_setdirowner_fn)(const struct vol *vol, const char *name,
52 uid_t uid, gid_t gid);
53typedef int (*vfs_deletefile_fn)(const struct vol *vol, int dirfd,
54 const char *file);
55typedef int (*vfs_renamefile_fn)(const struct vol *vol, int dirfd,
56 const char *src, const char *dst);
57typedef int (*vfs_copyfile_fn)(const struct vol *vol, int sfd, const char *src,
58 const char *dst);
59
60#ifdef HAVE_NFSV4_ACLS
61typedef int (*vfs_solaris_acl_fn)(const struct vol *vol, const char *path,
62 int cmd, int count, void *aces);
63#endif
64
65#ifdef HAVE_POSIX_ACLS
66typedef int (*vfs_posix_acl_fn)(const struct vol *vol, const char *path,
67 acl_type_t type, int count, acl_t acl);
68#endif
69
70typedef int (*vfs_remove_acl_fn)(const struct vol *vol, const char *path,
71 int dir);
72
73typedef int (*vfs_ea_getsize_fn)(const struct vol *vol, char *rbuf,
74 size_t *rbuflen, const char *uname,
75 int oflag, const char *attruname, int fd);
76
77typedef int (*vfs_ea_getcontent_fn)(const struct vol *vol, char *rbuf,
78 size_t *rbuflen, const char *uname,
79 int oflag, const char *attruname,
80 int maxreply, int fd);
81
82typedef int (*vfs_ea_list_fn)(const struct vol *vol, char *attrnamebuf,
83 size_t *buflen, const char *uname, int oflag, int fd);
84
85typedef int (*vfs_ea_set_fn)(const struct vol *vol, const char *uname,
86 const char *attruname, const char *ibuf,
87 size_t attrsize, int oflag, int fd);
88
89typedef int (*vfs_ea_remove_fn)(const struct vol *vol, const char *uname,
90 const char *attruname, int oflag, int fd);
91
96struct vol;
97
128
129extern void initvol_vfs(struct vol *vol);
130
131#endif /* ATALK_VFS_H */
Part of Netatalk's AppleDouble implementatation.
static size_t rbuflen
Definition afpfunc_helpers.c:45
static char rbuf[rbufsize]
Definition afpfunc_helpers.c:44
static enum op type
Definition nad_cp.c:96
Definition include/atalk/directory.h:56
Definition include/atalk/directory.h:81
Definition vfs.h:98
vfs_posix_acl_fn vfs_posix_acl
Definition vfs.h:116
vfs_ea_getcontent_fn vfs_ea_getcontent
Definition vfs.h:123
vfs_ea_remove_fn vfs_ea_remove
Definition vfs.h:126
vfs_renamedir_fn vfs_renamedir
Definition vfs.h:101
vfs_chown_fn vfs_chown
Definition vfs.h:100
vfs_ea_getsize_fn vfs_ea_getsize
Definition vfs.h:122
vfs_setdirmode_fn vfs_setdirmode
Definition vfs.h:104
vfs_setfilmode_fn vfs_setfilmode
Definition vfs.h:103
vfs_ea_set_fn vfs_ea_set
Definition vfs.h:125
vfs_deletefile_fn vfs_deletefile
Definition vfs.h:107
vfs_remove_acl_fn vfs_remove_acl
Definition vfs.h:118
vfs_renamefile_fn vfs_renamefile
Definition vfs.h:108
vfs_solaris_acl_fn vfs_solaris_acl
Definition vfs.h:113
vfs_ea_list_fn vfs_ea_list
Definition vfs.h:124
vfs_setdirowner_fn vfs_setdirowner
Definition vfs.h:106
vfs_validupath_fn vfs_validupath
Definition vfs.h:99
vfs_copyfile_fn vfs_copyfile
Definition vfs.h:109
vfs_setdirunixmode_fn vfs_setdirunixmode
Definition vfs.h:105
vfs_deletecurdir_fn vfs_deletecurdir
Definition vfs.h:102
Definition include/atalk/volume.h:30
void initvol_vfs(struct vol *vol)
Definition vfs.c:1285
int(* vfs_copyfile_fn)(const struct vol *vol, int sfd, const char *src, const char *dst)
Definition vfs.h:57
int(* vfs_deletecurdir_fn)(const struct vol *vol)
Definition vfs.h:44
int(* vfs_remove_acl_fn)(const struct vol *vol, const char *path, int dir)
Definition vfs.h:70
int(* vfs_setfilmode_fn)(const struct vol *vol, const char *name, mode_t mode, struct stat *st)
Definition vfs.h:45
int(* vfs_setdirmode_fn)(const struct vol *vol, const char *name, mode_t mode, struct stat *st)
Definition vfs.h:47
int(* vfs_ea_getcontent_fn)(const struct vol *vol, char *rbuf, size_t *rbuflen, const char *uname, int oflag, const char *attruname, int maxreply, int fd)
Definition vfs.h:77
int(* vfs_chown_fn)(const struct vol *vol, const char *path, uid_t uid, gid_t gid)
Definition vfs.h:40
int(* vfs_ea_set_fn)(const struct vol *vol, const char *uname, const char *attruname, const char *ibuf, size_t attrsize, int oflag, int fd)
Definition vfs.h:85
int(* vfs_ea_list_fn)(const struct vol *vol, char *attrnamebuf, size_t *buflen, const char *uname, int oflag, int fd)
Definition vfs.h:82
int(* vfs_ea_getsize_fn)(const struct vol *vol, char *rbuf, size_t *rbuflen, const char *uname, int oflag, const char *attruname, int fd)
Definition vfs.h:73
int(* vfs_renamedir_fn)(const struct vol *vol, int dirfd, const char *oldpath, const char *newpath)
Definition vfs.h:42
int(* vfs_solaris_acl_fn)(const struct vol *vol, const char *path, int cmd, int count, void *aces)
Definition vfs.h:61
int(* vfs_validupath_fn)(const struct vol *vol, const char *name)
Definition vfs.h:39
int(* vfs_posix_acl_fn)(const struct vol *vol, const char *path, acl_type_t type, int count, acl_t acl)
Definition vfs.h:66
int(* vfs_ea_remove_fn)(const struct vol *vol, const char *uname, const char *attruname, int oflag, int fd)
Definition vfs.h:89
int(* vfs_setdirowner_fn)(const struct vol *vol, const char *name, uid_t uid, gid_t gid)
Definition vfs.h:51
int(* vfs_setdirunixmode_fn)(const struct vol *vol, const char *name, mode_t mode, struct stat *st)
Definition vfs.h:49
int(* vfs_deletefile_fn)(const struct vol *vol, int dirfd, const char *file)
Definition vfs.h:53
int(* vfs_renamefile_fn)(const struct vol *vol, int dirfd, const char *src, const char *dst)
Definition vfs.h:55