dlm_netlink.h revision 96c1db7b9d601c31d103389cac074a6cce0d7633
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _DLM_NETLINK_H
20#define _DLM_NETLINK_H
21#include <linux/types.h>
22enum {
23  DLM_STATUS_WAITING = 1,
24  DLM_STATUS_GRANTED = 2,
25  DLM_STATUS_CONVERT = 3,
26};
27#define DLM_LOCK_DATA_VERSION 1
28struct dlm_lock_data {
29  __u16 version;
30  __u32 lockspace_id;
31  int nodeid;
32  int ownpid;
33  __u32 id;
34  __u32 remid;
35  __u64 xid;
36  __s8 status;
37  __s8 grmode;
38  __s8 rqmode;
39  unsigned long timestamp;
40  int resource_namelen;
41  char resource_name[DLM_RESNAME_MAXLEN];
42};
43enum {
44  DLM_CMD_UNSPEC = 0,
45  DLM_CMD_HELLO,
46  DLM_CMD_TIMEOUT,
47  __DLM_CMD_MAX,
48};
49#define DLM_CMD_MAX (__DLM_CMD_MAX - 1)
50enum {
51  DLM_TYPE_UNSPEC = 0,
52  DLM_TYPE_LOCK,
53  __DLM_TYPE_MAX,
54};
55#define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1)
56#define DLM_GENL_VERSION 0x1
57#define DLM_GENL_NAME "DLM"
58#endif
59