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
,
38 NBD_ATTR_BACKEND_IDENTIFIER
,
41 #define NBD_ATTR_MAX (__NBD_ATTR_MAX - 1)
44 * This is the format for multiple devices with NBD_ATTR_DEVICE_LIST
46 * [NBD_ATTR_DEVICE_LIST]
49 * [NBD_DEVICE_CONNECTED]
52 NBD_DEVICE_ITEM_UNSPEC
,
54 __NBD_DEVICE_ITEM_MAX
,
56 #define NBD_DEVICE_ITEM_MAX (__NBD_DEVICE_ITEM_MAX - 1)
64 #define NBD_DEVICE_ATTR_MAX (__NBD_DEVICE_MAX - 1)
67 * This is the format for multiple sockets with NBD_ATTR_SOCKETS
80 #define NBD_SOCK_ITEM_MAX (__NBD_SOCK_ITEM_MAX - 1)
87 #define NBD_SOCK_MAX (__NBD_SOCK_MAX - 1)
98 #define NBD_CMD_MAX (__NBD_CMD_MAX - 1)
100 #endif /* _UAPILINUX_NBD_NETLINK_H */