nvpair_impl.h (285139) | nvpair_impl.h (286796) |
---|---|
1/*- 2 * Copyright (c) 2009-2013 The FreeBSD Foundation | 1/*- 2 * Copyright (c) 2009-2013 The FreeBSD Foundation |
3 * Copyright (c) 2013-2015 Mariusz Zaborski <oshogbo@FreeBSD.org> |
|
3 * All rights reserved. 4 * 5 * This software was developed by Pawel Jakub Dawidek under sponsorship from 6 * the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 10 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 4 * All rights reserved. 5 * 6 * This software was developed by Pawel Jakub Dawidek under sponsorship from 7 * the FreeBSD Foundation. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: --- 10 unchanged lines hidden (view full) --- 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * |
29 * $FreeBSD: head/sys/contrib/libnv/nvpair_impl.h 285139 2015-07-04 16:33:37Z oshogbo $ | 30 * $FreeBSD: head/sys/contrib/libnv/nvpair_impl.h 286796 2015-08-15 06:34:49Z oshogbo $ |
30 */ 31 32#ifndef _NVPAIR_IMPL_H_ 33#define _NVPAIR_IMPL_H_ 34 35#include <sys/nv.h> 36#include <sys/queue.h> 37 --- 28 unchanged lines hidden (view full) --- 66 size_t *leftp); 67unsigned char *nvpair_pack_string(const nvpair_t *nvp, unsigned char *ptr, 68 size_t *leftp); 69unsigned char *nvpair_pack_descriptor(const nvpair_t *nvp, unsigned char *ptr, 70 int64_t *fdidxp, size_t *leftp); 71unsigned char *nvpair_pack_binary(const nvpair_t *nvp, unsigned char *ptr, 72 size_t *leftp); 73unsigned char *nvpair_pack_nvlist_up(unsigned char *ptr, size_t *leftp); | 31 */ 32 33#ifndef _NVPAIR_IMPL_H_ 34#define _NVPAIR_IMPL_H_ 35 36#include <sys/nv.h> 37#include <sys/queue.h> 38 --- 28 unchanged lines hidden (view full) --- 67 size_t *leftp); 68unsigned char *nvpair_pack_string(const nvpair_t *nvp, unsigned char *ptr, 69 size_t *leftp); 70unsigned char *nvpair_pack_descriptor(const nvpair_t *nvp, unsigned char *ptr, 71 int64_t *fdidxp, size_t *leftp); 72unsigned char *nvpair_pack_binary(const nvpair_t *nvp, unsigned char *ptr, 73 size_t *leftp); 74unsigned char *nvpair_pack_nvlist_up(unsigned char *ptr, size_t *leftp); |
75unsigned char *nvpair_pack_bool_array(const nvpair_t *nvp, unsigned char *ptr, 76 size_t *leftp); 77unsigned char *nvpair_pack_number_array(const nvpair_t *nvp, unsigned char *ptr, 78 size_t *leftp); 79unsigned char *nvpair_pack_string_array(const nvpair_t *nvp, unsigned char *ptr, 80 size_t *leftp); 81unsigned char *nvpair_pack_descriptor_array(const nvpair_t *nvp, 82 unsigned char *ptr, int64_t *fdidxp, size_t *leftp); 83unsigned char *nvpair_pack_nvlist_array_next(unsigned char *ptr, size_t *leftp); |
|
74 75/* Unpack data functions. */ 76const unsigned char *nvpair_unpack_header(bool isbe, nvpair_t *nvp, 77 const unsigned char *ptr, size_t *leftp); 78const unsigned char *nvpair_unpack_null(bool isbe, nvpair_t *nvp, 79 const unsigned char *ptr, size_t *leftp); 80const unsigned char *nvpair_unpack_bool(bool isbe, nvpair_t *nvp, 81 const unsigned char *ptr, size_t *leftp); 82const unsigned char *nvpair_unpack_number(bool isbe, nvpair_t *nvp, 83 const unsigned char *ptr, size_t *leftp); 84const unsigned char *nvpair_unpack_string(bool isbe, nvpair_t *nvp, 85 const unsigned char *ptr, size_t *leftp); 86const unsigned char *nvpair_unpack_nvlist(bool isbe, nvpair_t *nvp, 87 const unsigned char *ptr, size_t *leftp, size_t nfds, nvlist_t **child); 88const unsigned char *nvpair_unpack_descriptor(bool isbe, nvpair_t *nvp, 89 const unsigned char *ptr, size_t *leftp, const int *fds, size_t nfds); 90const unsigned char *nvpair_unpack_binary(bool isbe, nvpair_t *nvp, 91 const unsigned char *ptr, size_t *leftp); | 84 85/* Unpack data functions. */ 86const unsigned char *nvpair_unpack_header(bool isbe, nvpair_t *nvp, 87 const unsigned char *ptr, size_t *leftp); 88const unsigned char *nvpair_unpack_null(bool isbe, nvpair_t *nvp, 89 const unsigned char *ptr, size_t *leftp); 90const unsigned char *nvpair_unpack_bool(bool isbe, nvpair_t *nvp, 91 const unsigned char *ptr, size_t *leftp); 92const unsigned char *nvpair_unpack_number(bool isbe, nvpair_t *nvp, 93 const unsigned char *ptr, size_t *leftp); 94const unsigned char *nvpair_unpack_string(bool isbe, nvpair_t *nvp, 95 const unsigned char *ptr, size_t *leftp); 96const unsigned char *nvpair_unpack_nvlist(bool isbe, nvpair_t *nvp, 97 const unsigned char *ptr, size_t *leftp, size_t nfds, nvlist_t **child); 98const unsigned char *nvpair_unpack_descriptor(bool isbe, nvpair_t *nvp, 99 const unsigned char *ptr, size_t *leftp, const int *fds, size_t nfds); 100const unsigned char *nvpair_unpack_binary(bool isbe, nvpair_t *nvp, 101 const unsigned char *ptr, size_t *leftp); |
102const unsigned char *nvpair_unpack_bool_array(bool isbe, nvpair_t *nvp, 103 const unsigned char *ptr, size_t *leftp); 104const unsigned char *nvpair_unpack_number_array(bool isbe, nvpair_t *nvp, 105 const unsigned char *ptr, size_t *leftp); 106const unsigned char *nvpair_unpack_string_array(bool isbe, nvpair_t *nvp, 107 const unsigned char *ptr, size_t *leftp); 108const unsigned char *nvpair_unpack_descriptor_array(bool isbe, nvpair_t *nvp, 109 const unsigned char *ptr, size_t *leftp, const int *fds, size_t nfds); 110const unsigned char *nvpair_unpack_nvlist_array(bool isbe, nvpair_t *nvp, 111 const unsigned char *ptr, size_t *leftp, nvlist_t **firstel); |
|
92 93#endif /* !_NVPAIR_IMPL_H_ */ | 112 113#endif /* !_NVPAIR_IMPL_H_ */ |