136849Sdfr/*- 238357Sjdp * Copyright (c) 2009-2010 The FreeBSD Foundation 336849Sdfr * All rights reserved. 436849Sdfr * 536849Sdfr * This software was developed by Pawel Jakub Dawidek under sponsorship from 636849Sdfr * the FreeBSD Foundation. 736849Sdfr * 836849Sdfr * Redistribution and use in source and binary forms, with or without 936849Sdfr * modification, are permitted provided that the following conditions 1036849Sdfr * are met: 1136849Sdfr * 1. Redistributions of source code must retain the above copyright 1236849Sdfr * notice, this list of conditions and the following disclaimer. 1336849Sdfr * 2. Redistributions in binary form must reproduce the above copyright 1436849Sdfr * notice, this list of conditions and the following disclaimer in the 1536849Sdfr * documentation and/or other materials provided with the distribution. 1636849Sdfr * 1736849Sdfr * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 1836849Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1936849Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2036849Sdfr * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 2136849Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2236849Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2336849Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2436849Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2536849Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2650477Speter * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2736849Sdfr * SUCH DAMAGE. 2836849Sdfr * 2936849Sdfr * $FreeBSD$ 3036849Sdfr */ 3136849Sdfr 3238357Sjdp#ifndef _HAST_PROTO_H_ 3338357Sjdp#define _HAST_PROTO_H_ 3436849Sdfr 3536849Sdfr#include <stdlib.h> /* size_t */ 3636849Sdfr 3736849Sdfr#include <nv.h> 3836849Sdfr#include <proto.h> 3938873Sjb 4036849Sdfrint hast_proto_send(const struct hast_resource *res, struct proto_conn *conn, 4138873Sjb struct nv *nv, const void *data, size_t size); 4238873Sjbint hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp); 4336849Sdfrint hast_proto_recv_data(const struct hast_resource *res, 4438873Sjb struct proto_conn *conn, struct nv *nv, void *data, size_t size); 4536849Sdfr 4636849Sdfr#endif /* !_HAST_PROTO_H_ */ 4736849Sdfr