]> git.ipfire.org Git - thirdparty/mdadm.git/blame - msg.h
Remove mon_pipe for communicating from monitor to manager
[thirdparty/mdadm.git] / msg.h
CommitLineData
f7dd881f
DW
1/*
2 * Copyright (C) 2008 Intel Corporation
3 *
4 * mdmon socket / message handling
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
3e70c845
DW
20
21struct mdinfo;
b109d928 22
f7dd881f
DW
23struct mdinfo;
24struct md_message {
25 int seq;
26 int num_bytes;
27 void *buf;
28};
29
30enum md_message_action {
31 md_action_ping_monitor,
f7dd881f
DW
32};
33
34struct md_generic_cmd {
35 enum md_message_action action;
36};
37
f7dd881f
DW
38/* union of all known command types, used to sanity check ->num_bytes
39 * on the receive path
40 */
41union md_message_commands {
42 struct md_generic_cmd generic;
f7dd881f
DW
43};
44
45extern const int start_magic;
46extern const int end_magic;
47
48extern int receive_message(int fd, struct md_message *msg, int tmo);
49extern int send_message(int fd, struct md_message *msg, int tmo);
50extern int ack(int fd, int seq, int tmo);
51extern int nack(int fd, int err, int tmo);
52extern int connect_monitor(char *devname);
53extern int ping_monitor(char *devname);
f7dd881f 54