/* drbd outdate peer daemon
 * Copyright (C) 2006 LINBIT <http://www.linbit.com/>
 *
 * Written by Rasto Levrinc <rasto@linbit.at>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses/>
 */

#define T_OUTDATER		"outdater"
#define F_OUTDATER_PEER		"outdater_peer"
#define F_OUTDATER_RES		"outdater_res"
#define F_DOPD_VALUE            "dop_value"
#define F_DOPD_RES              "dop_res"

#define OUTDATE_COMMAND		"drbdadm outdate"

static char dopd_socket[]	= HA_VARRUNDIR "/heartbeat/dopd/outdater";

#include <hb_api.h>

/* Prototypes */
void node_walk(ll_cluster_t *);
gboolean check_drbd_peer(const char *);
void set_signals(ll_cluster_t *);
void gotsig(int);
void set_callbacks(ll_cluster_t *);
void open_api(ll_cluster_t *);
void close_api(ll_cluster_t *);
gboolean dopd_dispatch(IPC_Channel *, gpointer);
void dopd_dispatch_destroy(gpointer);
gboolean dopd_timeout_dispatch(gpointer);
void msg_start_outdate(struct ha_msg *, void *);
void msg_outdate_rc(struct ha_msg *, void *);
