183812f67SIngo Weinhold// userlandfs_ioctl.h
283812f67SIngo Weinhold
383812f67SIngo Weinhold#ifndef USERLAND_FS_IOCTL_H
483812f67SIngo Weinhold#define USERLAND_FS_IOCTL_H
583812f67SIngo Weinhold
683812f67SIngo Weinhold#include <Drivers.h>
783812f67SIngo Weinhold
883812f67SIngo Weinhold// the ioctl command we use for tunnelling our commands
983812f67SIngo Weinholdenum {
1083812f67SIngo Weinhold	USERLANDFS_IOCTL	= B_DEVICE_OP_CODES_END + 666,
1183812f67SIngo Weinhold};
1283812f67SIngo Weinhold
1383812f67SIngo Weinhold// the supported commands
1483812f67SIngo Weinholdenum {
1583812f67SIngo Weinhold	USERLAND_IOCTL_PUT_ALL_PENDING_VNODES	= 1,
1683812f67SIngo Weinhold};
1783812f67SIngo Weinhold
1883812f67SIngo Weinhold// the length of the magic we use
1983812f67SIngo Weinholdenum {
2083812f67SIngo Weinhold	USERLAND_IOCTL_MAGIC_LENGTH	= 20,
2183812f67SIngo Weinhold};
2283812f67SIngo Weinhold
2383812f67SIngo Weinhold// the version of the ioctl protocol
2483812f67SIngo Weinholdenum {
2583812f67SIngo Weinhold	USERLAND_IOCTL_CURRENT_VERSION	= 1,
2683812f67SIngo Weinhold};
2783812f67SIngo Weinhold
2883812f67SIngo Weinhold// the errors
2983812f67SIngo Weinholdenum {
3083812f67SIngo Weinhold	USERLAND_IOCTL_STILL_CONNECTED				= B_ERRORS_END + 666,
3183812f67SIngo Weinhold	USERLAND_IOCTL_VNODE_COUNTING_DISABLED,
3283812f67SIngo Weinhold	USERLAND_IOCTL_OPEN_FILES,
3383812f67SIngo Weinhold	USERLAND_IOCTL_OPEN_DIRECTORIES,
3483812f67SIngo Weinhold	USERLAND_IOCTL_OPEN_ATTRIBUTE_DIRECTORIES,
35617ed3e4SIngo Weinhold	USERLAND_IOCTL_OPEN_ATTRIBUTES,
3683812f67SIngo Weinhold	USERLAND_IOCTL_OPEN_INDEX_DIRECTORIES,
3783812f67SIngo Weinhold	USERLAND_IOCTL_OPEN_QUERIES,
3883812f67SIngo Weinhold};
3983812f67SIngo Weinhold
4083812f67SIngo Weinholdnamespace UserlandFSUtil {
4183812f67SIngo Weinhold
4283812f67SIngo Weinholdstruct userlandfs_ioctl {
4383812f67SIngo Weinhold	char		magic[USERLAND_IOCTL_MAGIC_LENGTH];
4483812f67SIngo Weinhold	int			version;
4583812f67SIngo Weinhold	int			command;
4683812f67SIngo Weinhold	status_t	error;
4783812f67SIngo Weinhold};
4883812f67SIngo Weinhold
4983812f67SIngo Weinholdextern const char kUserlandFSIOCtlMagic[USERLAND_IOCTL_MAGIC_LENGTH];
5083812f67SIngo Weinhold
5183812f67SIngo Weinhold}	// namespace UserlandFSUtil
5283812f67SIngo Weinhold
5383812f67SIngo Weinholdusing UserlandFSUtil::userlandfs_ioctl;
5483812f67SIngo Weinholdusing UserlandFSUtil::kUserlandFSIOCtlMagic;
5583812f67SIngo Weinhold
5683812f67SIngo Weinhold#endif	// USERLAND_FS_IOCTL_H
57