1
2
3
4
5
6
7
8
9
10 #ifndef _DLM_NETLINK_H
11 #define _DLM_NETLINK_H
12
13 #include <linux/types.h>
14 #include <linux/dlmconstants.h>
15
16 enum {
17 DLM_STATUS_WAITING = 1,
18 DLM_STATUS_GRANTED = 2,
19 DLM_STATUS_CONVERT = 3,
20 };
21
22 #define DLM_LOCK_DATA_VERSION 1
23
24 struct dlm_lock_data {
25 __u16 version;
26 __u32 lockspace_id;
27 int nodeid;
28 int ownpid;
29 __u32 id;
30 __u32 remid;
31 __u64 xid;
32 __s8 status;
33 __s8 grmode;
34 __s8 rqmode;
35 unsigned long timestamp;
36 int resource_namelen;
37 char resource_name[DLM_RESNAME_MAXLEN];
38 };
39
40 enum {
41 DLM_CMD_UNSPEC = 0,
42 DLM_CMD_HELLO,
43 DLM_CMD_TIMEOUT,
44 __DLM_CMD_MAX,
45 };
46
47 #define DLM_CMD_MAX (__DLM_CMD_MAX - 1)
48
49 enum {
50 DLM_TYPE_UNSPEC = 0,
51 DLM_TYPE_LOCK,
52 __DLM_TYPE_MAX,
53 };
54
55 #define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1)
56
57 #define DLM_GENL_VERSION 0x1
58 #define DLM_GENL_NAME "DLM"
59
60 #endif