![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 #ifndef DRBD_GENL_STRUCT_H 0003 #define DRBD_GENL_STRUCT_H 0004 0005 /** 0006 * struct drbd_genlmsghdr - DRBD specific header used in NETLINK_GENERIC requests 0007 * @minor: 0008 * For admin requests (user -> kernel): which minor device to operate on. 0009 * For (unicast) replies or informational (broadcast) messages 0010 * (kernel -> user): which minor device the information is about. 0011 * If we do not operate on minors, but on connections or resources, 0012 * the minor value shall be (~0), and the attribute DRBD_NLA_CFG_CONTEXT 0013 * is used instead. 0014 * @flags: possible operation modifiers (relevant only for user->kernel): 0015 * DRBD_GENL_F_SET_DEFAULTS 0016 * @volume: 0017 * When creating a new minor (adding it to a resource), the resource needs 0018 * to know which volume number within the resource this is supposed to be. 0019 * The volume number corresponds to the same volume number on the remote side, 0020 * whereas the minor number on the remote side may be different 0021 * (union with flags). 0022 * @ret_code: kernel->userland unicast cfg reply return code (union with flags); 0023 */ 0024 struct drbd_genlmsghdr { 0025 __u32 minor; 0026 union { 0027 __u32 flags; 0028 __s32 ret_code; 0029 }; 0030 }; 0031 0032 /* To be used in drbd_genlmsghdr.flags */ 0033 enum { 0034 DRBD_GENL_F_SET_DEFAULTS = 1, 0035 }; 0036 0037 enum drbd_state_info_bcast_reason { 0038 SIB_GET_STATUS_REPLY = 1, 0039 SIB_STATE_CHANGE = 2, 0040 SIB_HELPER_PRE = 3, 0041 SIB_HELPER_POST = 4, 0042 SIB_SYNC_PROGRESS = 5, 0043 }; 0044 0045 /* hack around predefined gcc/cpp "linux=1", 0046 * we cannot possibly include <1/drbd_genl.h> */ 0047 #undef linux 0048 0049 #include <linux/drbd.h> 0050 #define GENL_MAGIC_VERSION API_VERSION 0051 #define GENL_MAGIC_FAMILY drbd 0052 #define GENL_MAGIC_FAMILY_HDRSZ sizeof(struct drbd_genlmsghdr) 0053 #define GENL_MAGIC_INCLUDE_FILE <linux/drbd_genl.h> 0054 #include <linux/genl_magic_struct.h> 0055 0056 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |