PageRenderTime 51ms CodeModel.GetById 48ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/core/10.4/fusefs/common/fuse_ioctl.h

http://macfuse.googlecode.com/
C++ Header | 64 lines | 27 code | 15 blank | 22 comment | 0 complexity | 7af6e01fe70d5624490029e91c9cdd8d MD5 | raw file
 1/*
 2 * Copyright (C) 2006-2008 Google. All Rights Reserved.
 3 * Amit Singh <singh@>
 4 */
 5
 6#ifndef _FUSE_IOCTL_H_
 7#define _FUSE_IOCTL_H_
 8
 9#include <stdint.h>
10#include <sys/ioctl.h>
11
12/* FUSEDEVIOCxxx */
13
14/* Get mounter's pid. */
15#define FUSEDEVGETMOUNTERPID           _IOR('F', 1,  u_int32_t)
16
17/* Check if FUSE_INIT kernel-user handshake is complete. */
18#define FUSEDEVIOCGETHANDSHAKECOMPLETE _IOR('F', 2,  u_int32_t)
19
20/* Mark the daemon as dead. */
21#define FUSEDEVIOCSETDAEMONDEAD        _IOW('F', 3,  u_int32_t)
22
23/* Tell the kernel which operations the daemon implements. */
24#define FUSEDEVIOCSETIMPLEMENTEDBITS   _IOW('F', 4,  u_int64_t)
25
26/* Get device's random "secret". */
27#define FUSEDEVIOCGETRANDOM            _IOR('F', 5, u_int32_t)
28
29/*
30 * The 'AVFI' (alter-vnode-for-inode) ioctls all require an inode number
31 * as an argument. In the user-space library, you can get the inode number
32 * from a path by using fuse_lookup_inode_by_path_np() [lib/fuse.c].
33 *
34 * To see an example of using this, see the implementation of
35 * fuse_purge_path_np() in lib/fuse_darwin.c.
36 */
37
38struct fuse_avfi_ioctl {
39    uint64_t inode;
40    uint64_t cmd;
41    uint32_t ubc_flags;
42    uint32_t note;
43    off_t    size;
44};
45
46/* Alter the vnode (if any) specified by the given inode. */
47#define FUSEDEVIOCALTERVNODEFORINODE  _IOW('F', 6,  struct fuse_avfi_ioctl)
48#define FSCTLALTERVNODEFORINODE       IOCBASECMD(FUSEDEVIOCALTERVNODEFORINODE)
49
50/*
51 * Possible cmd values for AVFI.
52 */
53
54#define FUSE_AVFI_MARKGONE       0x00000001 /* no ubc_flags   */
55#define FUSE_AVFI_PURGEATTRCACHE 0x00000002 /* no ubc_flags   */
56#define FUSE_AVFI_PURGEVNCACHE   0x00000004 /* no ubc_flags   */
57#define FUSE_AVFI_UBC            0x00000008 /* uses ubc_flags */
58#define FUSE_AVFI_UBC_SETSIZE    0x00000010 /* uses ubc_flags, size */
59#define FUSE_AVFI_KNOTE          0x00000020 /* uses note */
60
61#define FUSE_SETACLSTATE              _IOW('h', 10, int32_t)
62#define FSCTLSETACLSTATE              IOCBASECMD(FUSE_SETACLSTATE)
63
64#endif /* _FUSE_IOCTL_H_ */