1258065Spjd/*-
2258065Spjd * Copyright (c) 2013 The FreeBSD Foundation
3258065Spjd * All rights reserved.
4258065Spjd *
5258065Spjd * This software was developed by Pawel Jakub Dawidek under sponsorship from
6258065Spjd * the FreeBSD Foundation.
7258065Spjd *
8258065Spjd * Redistribution and use in source and binary forms, with or without
9258065Spjd * modification, are permitted provided that the following conditions
10258065Spjd * are met:
11258065Spjd * 1. Redistributions of source code must retain the above copyright
12258065Spjd *    notice, this list of conditions and the following disclaimer.
13258065Spjd * 2. Redistributions in binary form must reproduce the above copyright
14258065Spjd *    notice, this list of conditions and the following disclaimer in the
15258065Spjd *    documentation and/or other materials provided with the distribution.
16258065Spjd *
17258065Spjd * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
18258065Spjd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19258065Spjd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20258065Spjd * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
21258065Spjd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22258065Spjd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23258065Spjd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24258065Spjd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25258065Spjd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26258065Spjd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27258065Spjd * SUCH DAMAGE.
28258065Spjd *
29258065Spjd * $FreeBSD$
30258065Spjd */
31258065Spjd
32258065Spjd#ifndef	_NVLIST_IMPL_H_
33258065Spjd#define	_NVLIST_IMPL_H_
34258065Spjd
35279438Srstone#ifndef _KERNEL
36258065Spjd#include <stdint.h>
37279438Srstone#endif
38258065Spjd
39258065Spjd#include "nv.h"
40258065Spjd
41258065Spjdvoid *nvlist_xpack(const nvlist_t *nvl, int64_t *fdidxp, size_t *sizep);
42258065Spjdnvlist_t *nvlist_xunpack(const void *buf, size_t size, const int *fds,
43258065Spjd    size_t nfds);
44258065Spjd
45271579Spjdnvpair_t *nvlist_get_nvpair_parent(const nvlist_t *nvl);
46271579Spjdconst unsigned char *nvlist_unpack_header(nvlist_t *nvl,
47272843Spjd    const unsigned char *ptr, size_t nfds, bool *isbep, size_t *leftp);
48271579Spjd
49258065Spjd#endif	/* !_NVLIST_IMPL_H_ */
50