xref: /netbsd-src/sys/external/bsd/libnv/dist/nvlist_impl.h (revision 22c09424bfe25746b7defaeb3784c965f63d0a19)
1 /*	$NetBSD: nvlist_impl.h,v 1.3 2018/09/11 02:20:31 christos Exp $	*/
2 
3 /*-
4  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
5  *
6  * Copyright (c) 2013 The FreeBSD Foundation
7  * Copyright (c) 2013-2015 Mariusz Zaborski <oshogbo@FreeBSD.org>
8  * All rights reserved.
9  *
10  * This software was developed by Pawel Jakub Dawidek under sponsorship from
11  * the FreeBSD Foundation.
12  *
13  * Redistribution and use in source and binary forms, with or without
14  * modification, are permitted provided that the following conditions
15  * are met:
16  * 1. Redistributions of source code must retain the above copyright
17  *    notice, this list of conditions and the following disclaimer.
18  * 2. Redistributions in binary form must reproduce the above copyright
19  *    notice, this list of conditions and the following disclaimer in the
20  *    documentation and/or other materials provided with the distribution.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32  * SUCH DAMAGE.
33  *
34  * $FreeBSD: head/sys/contrib/libnv/nvlist_impl.h 328474 2018-01-27 12:58:21Z oshogbo $
35  */
36 
37 #ifndef	_NVLIST_IMPL_H_
38 #define	_NVLIST_IMPL_H_
39 
40 #ifdef __FreeBSD__
41 #include <sys/nv.h>
42 #else
43 #include "nv.h"
44 #endif
45 
46 #if !defined(_KERNEL) && !defined(_STANDALONE)
47 #include <stdint.h>
48 #endif
49 
50 __dead void nvlist_report_missing(int type, const char *name);
51 nvpair_t *nvlist_get_nvpair_parent(const nvlist_t *nvl);
52 const unsigned char *nvlist_unpack_header(nvlist_t *nvl,
53     const unsigned char *ptr, size_t nfds, bool *isbep, size_t *leftp);
54 
55 #endif	/* !_NVLIST_IMPL_H_ */
56