"Fossies" - the Fresh Open Source Software Archive

Member "drbd-9.0.21-1/drbd/drbd-headers/linux/drbd_genl_api.h" (25 Jul 2019, 1254 Bytes) of package /linux/misc/drbd-9.0.21-1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "drbd_genl_api.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef DRBD_GENL_STRUCT_H
    2 #define DRBD_GENL_STRUCT_H
    3 
    4 /**
    5  * struct drbd_genlmsghdr - DRBD specific header used in NETLINK_GENERIC requests
    6  * @minor:
    7  *     For admin requests (user -> kernel): which minor device to operate on.
    8  *     For (unicast) replies or informational (broadcast) messages
    9  *     (kernel -> user): which minor device the information is about.
   10  *     If we do not operate on minors, but on connections or resources,
   11  *     the minor value shall be (~0), and the attribute DRBD_NLA_CFG_CONTEXT
   12  *     is used instead.
   13  * @flags: possible operation modifiers (relevant only for user->kernel):
   14  *     DRBD_GENL_F_SET_DEFAULTS
   15  * @ret_code: kernel->userland unicast cfg reply return code (union with flags);
   16  */
   17 struct drbd_genlmsghdr {
   18     __u32 minor;
   19     union {
   20     __u32 flags;
   21     __s32 ret_code;
   22     };
   23 };
   24 
   25 /* To be used in drbd_genlmsghdr.flags */
   26 enum {
   27     DRBD_GENL_F_SET_DEFAULTS = 1,
   28 };
   29 
   30 /* hack around predefined gcc/cpp "linux=1",
   31  * we cannot possibly include <1/drbd_genl.h> */
   32 #undef linux
   33 
   34 #include <linux/drbd.h>
   35 #define GENL_MAGIC_VERSION  2
   36 #define GENL_MAGIC_FAMILY   drbd
   37 #define GENL_MAGIC_FAMILY_HDRSZ sizeof(struct drbd_genlmsghdr)
   38 #define GENL_MAGIC_INCLUDE_FILE <linux/drbd_genl.h>
   39 #include <linux/genl_magic_struct.h>
   40 
   41 #endif