~ubuntu-branches/ubuntu/trusty/dlm/trusty

« back to all changes in this revision

Viewing changes to dlm_controld/dlm_controld.h

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2013-07-23 15:50:10 UTC
  • Revision ID: package-import@ubuntu.com-20130723155010-khpwf6vc04wjho2a
Tags: upstream-4.0.1
ImportĀ upstreamĀ versionĀ 4.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2004-2012 Red Hat, Inc.
 
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 v2 or (at your option) any later version.
 
7
 */
 
8
 
 
9
#ifndef __DLM_CONTROLD_DOT_H__
 
10
#define __DLM_CONTROLD_DOT_H__
 
11
 
 
12
/* This defines the interface between dlm_controld and libdlmcontrol, and
 
13
   should only be used by libdlmcontrol. */
 
14
 
 
15
#define DLMC_SOCK_PATH                  "dlmc_sock"
 
16
#define DLMC_QUERY_SOCK_PATH            "dlmc_query_sock"
 
17
 
 
18
#define DLMC_MAGIC                      0xD13CD13C
 
19
#define DLMC_VERSION                    0x00010001
 
20
 
 
21
#define DLMC_CMD_DUMP_DEBUG             1
 
22
#define DLMC_CMD_DUMP_PLOCKS            2
 
23
#define DLMC_CMD_LOCKSPACE_INFO         3
 
24
#define DLMC_CMD_NODE_INFO              4
 
25
#define DLMC_CMD_LOCKSPACES             5
 
26
#define DLMC_CMD_LOCKSPACE_NODES        6
 
27
#define DLMC_CMD_FS_REGISTER            7
 
28
#define DLMC_CMD_FS_UNREGISTER          8
 
29
#define DLMC_CMD_FS_NOTIFIED            9
 
30
#define DLMC_CMD_DEADLOCK_CHECK         10
 
31
#define DLMC_CMD_DUMP_LOG_PLOCK         11
 
32
#define DLMC_CMD_FENCE_ACK              12
 
33
#define DLMC_CMD_DUMP_STATUS            13
 
34
#define DLMC_CMD_DUMP_CONFIG            14
 
35
 
 
36
struct dlmc_header {
 
37
        unsigned int magic;
 
38
        unsigned int version;
 
39
        unsigned int command;
 
40
        unsigned int option;
 
41
        unsigned int len;
 
42
        int data;       /* embedded command-specific data, for convenience */
 
43
        int unused1;
 
44
        int unsued2;
 
45
        char name[DLM_LOCKSPACE_LEN]; /* no terminating null space */
 
46
};
 
47
 
 
48
#define DLMC_STATE_MAXSTR       4096
 
49
#define DLMC_STATE_MAXBIN       4096
 
50
 
 
51
#define DLMC_STATE_DAEMON       1
 
52
#define DLMC_STATE_DAEMON_NODE  2
 
53
#define DLMC_STATE_STARTUP_NODE 3
 
54
 
 
55
struct dlmc_state {
 
56
        uint32_t type; /* DLMC_STATE_ */
 
57
        uint32_t flags;
 
58
        int32_t nodeid;
 
59
        uint32_t data32;
 
60
        uint32_t data64;
 
61
        uint32_t str_len;
 
62
        uint32_t bin_len;
 
63
};
 
64
 
 
65
#endif
 
66