xref: /haiku/headers/private/userlandfs/private/userlandfs_ioctl.h (revision 617ed3e4a9ea91cf5be9b9e55d465840c36b1639)
1 // userlandfs_ioctl.h
2 
3 #ifndef USERLAND_FS_IOCTL_H
4 #define USERLAND_FS_IOCTL_H
5 
6 #include <Drivers.h>
7 
8 // the ioctl command we use for tunnelling our commands
9 enum {
10 	USERLANDFS_IOCTL	= B_DEVICE_OP_CODES_END + 666,
11 };
12 
13 // the supported commands
14 enum {
15 	USERLAND_IOCTL_PUT_ALL_PENDING_VNODES	= 1,
16 };
17 
18 // the length of the magic we use
19 enum {
20 	USERLAND_IOCTL_MAGIC_LENGTH	= 20,
21 };
22 
23 // the version of the ioctl protocol
24 enum {
25 	USERLAND_IOCTL_CURRENT_VERSION	= 1,
26 };
27 
28 // the errors
29 enum {
30 	USERLAND_IOCTL_STILL_CONNECTED				= B_ERRORS_END + 666,
31 	USERLAND_IOCTL_VNODE_COUNTING_DISABLED,
32 	USERLAND_IOCTL_OPEN_FILES,
33 	USERLAND_IOCTL_OPEN_DIRECTORIES,
34 	USERLAND_IOCTL_OPEN_ATTRIBUTE_DIRECTORIES,
35 	USERLAND_IOCTL_OPEN_ATTRIBUTES,
36 	USERLAND_IOCTL_OPEN_INDEX_DIRECTORIES,
37 	USERLAND_IOCTL_OPEN_QUERIES,
38 };
39 
40 namespace UserlandFSUtil {
41 
42 struct userlandfs_ioctl {
43 	char		magic[USERLAND_IOCTL_MAGIC_LENGTH];
44 	int			version;
45 	int			command;
46 	status_t	error;
47 };
48 
49 extern const char kUserlandFSIOCtlMagic[USERLAND_IOCTL_MAGIC_LENGTH];
50 
51 }	// namespace UserlandFSUtil
52 
53 using UserlandFSUtil::userlandfs_ioctl;
54 using UserlandFSUtil::kUserlandFSIOCtlMagic;
55 
56 #endif	// USERLAND_FS_IOCTL_H
57