4 * Copyright (C) 2005-2007 Red Hat, Inc. All rights reserved.
6 * This file is part of the device-mapper userspace tools.
8 * This copyrighted material is made available to anyone wishing to use,
9 * modify, copy, or redistribute it subject to the terms and conditions
10 * of the GNU Lesser General Public License v.2.1.
12 * You should have received a copy of the GNU Lesser General Public License
13 * along with this program; if not, write to the Free Software Foundation,
14 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 #ifndef __DMEVENTD_DOT_H__
18 #define __DMEVENTD_DOT_H__
20 /* FIXME This stuff must be configurable. */
22 #define DM_EVENT_DAEMON "/sbin/dmeventd"
23 #define DM_EVENT_LOCKFILE "/var/lock/dmeventd"
24 #define DM_EVENT_FIFO_CLIENT "/var/run/dmeventd-client"
25 #define DM_EVENT_FIFO_SERVER "/var/run/dmeventd-server"
26 #define DM_EVENT_PIDFILE "/var/run/dmeventd.pid"
28 #define DM_EVENT_DEFAULT_TIMEOUT 10
30 /* Commands for the daemon passed in the message below. */
31 enum dm_event_command
{
32 DM_EVENT_CMD_ACTIVE
= 1,
33 DM_EVENT_CMD_REGISTER_FOR_EVENT
,
34 DM_EVENT_CMD_UNREGISTER_FOR_EVENT
,
35 DM_EVENT_CMD_GET_REGISTERED_DEVICE
,
36 DM_EVENT_CMD_GET_NEXT_REGISTERED_DEVICE
,
37 DM_EVENT_CMD_SET_TIMEOUT
,
38 DM_EVENT_CMD_GET_TIMEOUT
,
42 /* Message passed between client and daemon. */
43 struct dm_event_daemon_message
{
49 /* FIXME Is this meant to be exported? I can't see where the
51 /* Fifos for client/daemon communication. */
52 struct dm_event_fifos
{
55 const char *client_path
;
56 const char *server_path
;
59 /* EXIT_SUCCESS 0 -- stdlib.h */
60 /* EXIT_FAILURE 1 -- stdlib.h */
61 #define EXIT_LOCKFILE_INUSE 2
62 #define EXIT_DESC_CLOSE_FAILURE 3
63 #define EXIT_DESC_OPEN_FAILURE 4
64 #define EXIT_OPEN_PID_FAILURE 5
65 #define EXIT_FIFO_FAILURE 6
66 #define EXIT_CHDIR_FAILURE 7
68 #endif /* __DMEVENTD_DOT_H__ */