blob: 19276332707a1976dfe8733287d6e7a1ee0dea4c [file] [log] [blame]
David Teigland3ae1acf2007-05-18 08:59:31 -05001/*
2 * Copyright (C) 2007 Red Hat, Inc. All rights reserved.
3 *
4 * This copyrighted material is made available to anyone wishing to use,
5 * modify, copy, or redistribute it subject to the terms and conditions
6 * of the GNU General Public License v.2.
7 */
8
9#ifndef _DLM_NETLINK_H
10#define _DLM_NETLINK_H
11
12enum {
13 DLM_STATUS_WAITING = 1,
14 DLM_STATUS_GRANTED = 2,
15 DLM_STATUS_CONVERT = 3,
16};
17
18#define DLM_LOCK_DATA_VERSION 1
19
20struct dlm_lock_data {
21 uint16_t version;
22 uint32_t lockspace_id;
23 int nodeid;
24 int ownpid;
25 uint32_t id;
26 uint32_t remid;
27 uint64_t xid;
28 int8_t status;
29 int8_t grmode;
30 int8_t rqmode;
31 unsigned long timestamp;
32 int resource_namelen;
33 char resource_name[DLM_RESNAME_MAXLEN];
34};
35
36enum {
37 DLM_CMD_UNSPEC = 0,
38 DLM_CMD_HELLO, /* user->kernel */
39 DLM_CMD_TIMEOUT, /* kernel->user */
40 __DLM_CMD_MAX,
41};
42
43#define DLM_CMD_MAX (__DLM_CMD_MAX - 1)
44
45enum {
46 DLM_TYPE_UNSPEC = 0,
47 DLM_TYPE_LOCK,
48 __DLM_TYPE_MAX,
49};
50
51#define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1)
52
53#define DLM_GENL_VERSION 0x1
54#define DLM_GENL_NAME "DLM"
55
56#endif /* _DLM_NETLINK_H */