1219351Spjd/*-
2219351Spjd * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>
3219351Spjd * All rights reserved.
4219351Spjd *
5219351Spjd * Redistribution and use in source and binary forms, with or without
6219351Spjd * modification, are permitted provided that the following conditions
7219351Spjd * are met:
8219351Spjd * 1. Redistributions of source code must retain the above copyright
9219351Spjd *    notice, this list of conditions and the following disclaimer.
10219351Spjd * 2. Redistributions in binary form must reproduce the above copyright
11219351Spjd *    notice, this list of conditions and the following disclaimer in the
12219351Spjd *    documentation and/or other materials provided with the distribution.
13219351Spjd *
14219351Spjd * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
15219351Spjd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16219351Spjd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17219351Spjd * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
18219351Spjd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19219351Spjd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20219351Spjd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21219351Spjd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22219351Spjd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23219351Spjd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24219351Spjd * SUCH DAMAGE.
25219351Spjd *
26219351Spjd * $FreeBSD$
27219351Spjd */
28219351Spjd
29219351Spjd#ifndef	_HAST_CHECKSUM_H_
30219351Spjd#define	_HAST_CHECKSUM_H_
31219351Spjd
32219351Spjd#include <stdlib.h>	/* size_t */
33219351Spjd
34219351Spjd#include <hast.h>
35219351Spjd#include <nv.h>
36219351Spjd
37219351Spjdconst char *checksum_name(int num);
38219351Spjd
39219351Spjdint checksum_send(const struct hast_resource *res, struct nv *nv,
40219351Spjd    void **datap, size_t *sizep, bool *freedatap);
41219351Spjdint checksum_recv(const struct hast_resource *res, struct nv *nv,
42219351Spjd    void **datap, size_t *sizep, bool *freedatap);
43219351Spjd
44219351Spjd#endif	/* !_HAST_CHECKSUM_H_ */
45