1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef DRBD_GENL_STRUCT_H
3 #define DRBD_GENL_STRUCT_H
6 * struct drbd_genlmsghdr - DRBD specific header used in NETLINK_GENERIC requests
8 * For admin requests (user -> kernel): which minor device to operate on.
9 * For (unicast) replies or informational (broadcast) messages
10 * (kernel -> user): which minor device the information is about.
11 * If we do not operate on minors, but on connections or resources,
12 * the minor value shall be (~0), and the attribute DRBD_NLA_CFG_CONTEXT
14 * @flags: possible operation modifiers (relevant only for user->kernel):
15 * DRBD_GENL_F_SET_DEFAULTS
17 * When creating a new minor (adding it to a resource), the resource needs
18 * to know which volume number within the resource this is supposed to be.
19 * The volume number corresponds to the same volume number on the remote side,
20 * whereas the minor number on the remote side may be different
22 * @ret_code: kernel->userland unicast cfg reply return code (union with flags);
24 struct drbd_genlmsghdr {
32 /* To be used in drbd_genlmsghdr.flags */
34 DRBD_GENL_F_SET_DEFAULTS = 1,
37 enum drbd_state_info_bcast_reason {
38 SIB_GET_STATUS_REPLY = 1,
42 SIB_SYNC_PROGRESS = 5,
45 /* hack around predefined gcc/cpp "linux=1",
46 * we cannot possibly include <1/drbd_genl.h> */
49 #include <linux/drbd.h>
50 #define GENL_MAGIC_VERSION API_VERSION
51 #define GENL_MAGIC_FAMILY drbd
52 #define GENL_MAGIC_FAMILY_HDRSZ sizeof(struct drbd_genlmsghdr)
53 #define GENL_MAGIC_INCLUDE_FILE <linux/drbd_genl.h>
54 #include <linux/genl_magic_struct.h>