2 * Copyright (c) 2011-2012 The DragonFly Project. All rights reserved.
4 * This code is derived from software contributed to The DragonFly Project
5 * by Matthew Dillon <dillon@dragonflybsd.org>
6 * by Venkatesh Srinivas <vsrinivas@dragonflybsd.org>
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
18 * 3. Neither the name of The DragonFly Project nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific, prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
30 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 #ifndef VFS_HAMMER2_IOCTL_H_
36 #define VFS_HAMMER2_IOCTL_H_
38 #ifndef _SYS_IOCCOM_H_
39 #include <sys/ioccom.h>
41 #ifndef _VFS_HAMMER2_DISK_H_
42 #include "hammer2_disk.h"
44 #ifndef _VFS_HAMMER2_MOUNT_H_
45 #include "hammer2_mount.h"
51 struct hammer2_ioc_version {
53 char reserved[256 - 4];
56 typedef struct hammer2_ioc_version hammer2_ioc_version_t;
59 * Ioctls to manage the volume->copyinfo[] array and to associate or
60 * disassociate sockets
62 struct hammer2_ioc_remote {
64 int nextid; /* for iteration (get only) */
65 int fd; /* socket descriptor if applicable */
68 hammer2_copy_data_t copy1; /* copy spec */
69 hammer2_copy_data_t copy2; /* copy spec (rename ops only) */
72 typedef struct hammer2_ioc_remote hammer2_ioc_remote_t;
74 #define HAMMER2IOC_GET_VERSION _IOWR('h', 64, struct hammer2_ioc_version)
76 #define HAMMER2IOC_GET_REMOTE _IOWR('h', 68, struct hammer2_ioc_remote)
77 #define HAMMER2IOC_ADD_REMOTE _IOWR('h', 69, struct hammer2_ioc_remote)
78 #define HAMMER2IOC_DEL_REMOTE _IOWR('h', 70, struct hammer2_ioc_remote)
79 #define HAMMER2IOC_REP_REMOTE _IOWR('h', 71, struct hammer2_ioc_remote)
81 #define HAMMER2IOC_GET_SOCKET _IOWR('h', 76, struct hammer2_ioc_remote)
82 #define HAMMER2IOC_SET_SOCKET _IOWR('h', 77, struct hammer2_ioc_remote)