hastd.h revision 218041
1145510Sdarrenr/*-
2145510Sdarrenr * Copyright (c) 2009-2010 The FreeBSD Foundation
3145510Sdarrenr * All rights reserved.
4145510Sdarrenr *
5145510Sdarrenr * This software was developed by Pawel Jakub Dawidek under sponsorship from
6145510Sdarrenr * the FreeBSD Foundation.
7145510Sdarrenr *
8145510Sdarrenr * Redistribution and use in source and binary forms, with or without
9145510Sdarrenr * modification, are permitted provided that the following conditions
10145510Sdarrenr * are met:
11145510Sdarrenr * 1. Redistributions of source code must retain the above copyright
12145510Sdarrenr *    notice, this list of conditions and the following disclaimer.
13145510Sdarrenr * 2. Redistributions in binary form must reproduce the above copyright
14145510Sdarrenr *    notice, this list of conditions and the following disclaimer in the
15145510Sdarrenr *    documentation and/or other materials provided with the distribution.
16145510Sdarrenr *
17145510Sdarrenr * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
18145510Sdarrenr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19145510Sdarrenr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20145510Sdarrenr * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
21145510Sdarrenr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22145510Sdarrenr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23145510Sdarrenr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24145510Sdarrenr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25145510Sdarrenr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26145510Sdarrenr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27145510Sdarrenr * SUCH DAMAGE.
28145510Sdarrenr *
29145510Sdarrenr * $FreeBSD: head/sbin/hastd/hastd.h 218041 2011-01-28 21:48:15Z pjd $
30145510Sdarrenr */
31145510Sdarrenr
32145510Sdarrenr#ifndef	_HASTD_H_
33145510Sdarrenr#define	_HASTD_H_
34145510Sdarrenr
35145510Sdarrenr#include <sys/param.h>
36145510Sdarrenr#include <libutil.h>
37145510Sdarrenr
38145510Sdarrenr#include <nv.h>
39145510Sdarrenr
40145510Sdarrenr#include "hast.h"
41145510Sdarrenr
42145510Sdarrenrextern const char *cfgpath;
43145510Sdarrenrextern bool sigexit_received;
44145510Sdarrenrextern struct pidfh *pfh;
45145510Sdarrenr
46145510Sdarrenrvoid descriptors_cleanup(struct hast_resource *res);
47145510Sdarrenr
48145510Sdarrenrvoid hastd_primary(struct hast_resource *res);
49145510Sdarrenrvoid hastd_secondary(struct hast_resource *res, struct nv *nvin);
50145510Sdarrenr
51145510Sdarrenrvoid primary_config_reload(struct hast_resource *res, struct nv *nv);
52145510Sdarrenr
53145510Sdarrenr#endif	/* !_HASTD_H_ */
54145510Sdarrenr