1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * Copyright (C) 2017 Facebook. All rights reserved.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public
7 * License v2 as published by the Free Software Foundation.
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 GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 021110-1307, USA.
19 #ifndef _UAPILINUX_NBD_NETLINK_H
20 #define _UAPILINUX_NBD_NETLINK_H
22 #define NBD_GENL_FAMILY_NAME "nbd"
23 #define NBD_GENL_VERSION 0x1
24 #define NBD_GENL_MCAST_GROUP_NAME "nbd_mc_group"
26 /* Configuration policy attributes, used for CONNECT */
31 NBD_ATTR_BLOCK_SIZE_BYTES
,
33 NBD_ATTR_SERVER_FLAGS
,
34 NBD_ATTR_CLIENT_FLAGS
,
36 NBD_ATTR_DEAD_CONN_TIMEOUT
,
40 #define NBD_ATTR_MAX (__NBD_ATTR_MAX - 1)
43 * This is the format for multiple devices with NBD_ATTR_DEVICE_LIST
45 * [NBD_ATTR_DEVICE_LIST]
48 * [NBD_DEVICE_CONNECTED]
51 NBD_DEVICE_ITEM_UNSPEC
,
53 __NBD_DEVICE_ITEM_MAX
,
55 #define NBD_DEVICE_ITEM_MAX (__NBD_DEVICE_ITEM_MAX - 1)
63 #define NBD_DEVICE_ATTR_MAX (__NBD_DEVICE_MAX - 1)
66 * This is the format for multiple sockets with NBD_ATTR_SOCKETS
79 #define NBD_SOCK_ITEM_MAX (__NBD_SOCK_ITEM_MAX - 1)
86 #define NBD_SOCK_MAX (__NBD_SOCK_MAX - 1)
97 #define NBD_CMD_MAX (__NBD_CMD_MAX - 1)
99 #endif /* _UAPILINUX_NBD_NETLINK_H */