rstone
23814e1d4e
Add tests for dnv_get_*
...
Differential Revision: https://reviews.freebsd.org/D1875
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
2015-03-01 00:21:56 +00:00
rstone
3fdab28a2a
Add tests for nvlist_free* functions
...
Differential Revision: https://reviews.freebsd.org/D1874
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
2015-03-01 00:21:50 +00:00
rstone
242db076f5
Add tests for nvlist_take_*
...
Differential Revision: https://reviews.freebsd.org/D1873
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
2015-03-01 00:21:43 +00:00
rstone
7f5e639dad
Add test cases for nvlist_move_*
...
Differential Revision: https://reviews.freebsd.org/D1872
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
2015-03-01 00:21:37 +00:00
rstone
71abcff092
Add tests for nvlist_pack/unpack
...
Differential Revision: https://reviews.freebsd.org/D1871
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
2015-03-01 00:21:30 +00:00
rstone
955949873c
Add tests for nvlist_clone
...
Differential Revision: https://reviews.freebsd.org/D1870
Reviewed by: pjd, jfv
MFC after: 1 month
Sponsored by: Sandvine Inc
2015-03-01 00:21:24 +00:00
rstone
98bbc635e5
Tests of basic nvlist add functions
...
Differential Revision: https://reviews.freebsd.org/D1869
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
2015-03-01 00:20:57 +00:00
rstone
674bfc54dd
Revert r279422. My "apply patch and commit" script wasn't adding
...
new files properly.
Pointy hat to: rstone
2015-03-01 00:05:45 +00:00
rstone
58497ff6a2
Tests of basic nvlist add functions
...
Differential Revision: https://reviews.freebsd.org/D1869
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
2015-03-01 00:01:44 +00:00
rstone
36d118f597
Make libnv headers includable from C++
...
Differential Revision: https://reviews.freebsd.org/D1868
Reviewed by: jfv, pjd
MFC after: 1 month
Sponsored by: Sandvine Inc.
2015-03-01 00:01:36 +00:00
pjd
e4bf748e4c
Make gcc happy.
...
Reported by: bz
2015-01-30 13:03:36 +00:00
pjd
4db5826e21
Add missing nvlist_get_parent(3) link.
...
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
2015-01-30 12:57:35 +00:00
pjd
d9dde7dc21
Handle empty nvlists correctly.
...
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
2015-01-30 12:31:29 +00:00
pjd
798c260360
Modify nvlist_get_parent() API to take additional cookie argument.
...
This allow for non-recursive iteration over nested nvlists, as in documented
example.
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
2015-01-30 10:08:38 +00:00
pjd
d08c53259e
If moving descriptor or binary data to an nvlist fails, we need to close the
...
descriptor or free the memory before returning.
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
While here, protect errno, so it won't be overwritted by close(2) or free(3).
2015-01-30 09:44:29 +00:00
bapt
6adce30d28
Convert libraries to use LIBADD
...
While here reduce a bit overlinking
2014-11-25 11:07:26 +00:00
jmg
d18c9c70cd
fix typo, properly install a link to nv for nvlist_freev...
2014-10-27 23:03:17 +00:00
pjd
22607ea6a6
Fix problem on big endian systems introduced in r271579 - when we were
...
returning from handling a nested nvlist we were resetting big-endian flag.
Reported by: Kuleshov Aleksey @ yandex.ru
Tested by: Kuleshov Aleksey @ yandex.ru
2014-10-09 20:55:05 +00:00
pjd
e0dc7a516e
Document the new nvlist_get_parent() function.
...
Submitted by: Mariusz Zaborski
2014-09-25 10:59:01 +00:00
pjd
094cca2b36
Don't use nvl in case of a failure.
...
Reported by: Coverity
CID: 1238922
2014-09-18 22:34:52 +00:00
pjd
4093472823
Use non-recursive algorithm for traversing nvlists. This also removes
...
the limit on number of nested nvlists.
Submitted by: Mariusz Zaborski
2014-09-14 09:30:09 +00:00
pjd
ac34a053f0
Remove the limit on descriptors that can be send in one nvlist.
...
Submitted by: Mariusz Zaborski
2014-09-14 09:27:12 +00:00
ngie
4d0e4024f5
Include src.opts.mk after SHLIBDIR has been defined so libnv is installed to
...
/lib , not /usr/lib
MFC after: 3 days
Approved by: rpaulo (mentor)
Submitted by: antoine
Pointyhat to: me
Phabric: D739
2014-09-07 22:56:57 +00:00
pjd
ce6400edf1
Use better type for i.
2014-09-03 15:08:33 +00:00
pjd
5992163169
Declare i.
...
Reported by: sbruno
2014-09-03 15:06:47 +00:00
pjd
4509927d18
Fix descriptors leak in case of nvlist_xunpack() failure.
...
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
2014-09-03 14:44:23 +00:00
ngie
9513739a47
Integrate lib/libnv into the build/kyua
...
Rename all of the TAP test applications from <test> to <test>_test
to match the convention described in the TestSuite wiki page
Phabric: D538
Approved by: jmmv (mentor)
Sponsored by: EMC / Isilon Storage Division
2014-08-05 18:41:27 +00:00
bapt
1f77f137dc
use .Mt to mark up email addresses consistently (part3)
...
PR: 191174
Submitted by: Franco Fichtner <franco at lastsummer.de>
2014-06-23 08:23:05 +00:00
rstone
6f8f959106
Correct a typo.
...
MFC after: 1 week
2014-05-17 20:39:39 +00:00
jilles
925e49a64a
libnv: Don't lose big-endian flag when receiving a message.
...
A bug caused the "big endian" flag to be lost when receiving a message. As a
result, the bits are interpreted as little endian and an extremely large
allocation is attempted.
This change fixes ping(8)'s communication to casperd(8) on big-endian
architectures.
Reported by: Anton Shterenlikht
Tested by: danfe
2014-04-01 21:30:54 +00:00
bdrewery
f9dde513df
nv(3) was not in 10.0.
...
It might be MFC'd to stable/10 for 10.1, but for now update the manual to
avoid confusion on its availability.
Discussed with: pjd
2014-03-21 15:30:31 +00:00
pjd
7eae47c978
Assert input arguments to buf_send() and buf_recv().
...
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
2014-02-02 19:06:00 +00:00
pjd
79b0db8823
Fix sending empty nvlist.
...
Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
2014-02-02 19:03:52 +00:00
pjd
edb2f6bf13
MFp4 @1189711:
...
Fix resource leaks on nvlist_destroy().
Reported by: Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after: 3 days
2014-01-03 09:07:03 +00:00
pjd
d2d5bec62c
MFp4 @1189139:
...
Get rid of the msg_peek() function, which has a problem. If there was less
data in the socket buffer than requested by the caller, the function would busy
loop, as select(2) will always return immediately.
We can just receive nvlhdr now, because some time ago we splitted receive of
data from the receive of descriptors.
MFC after: 1 week
2013-12-15 22:58:09 +00:00
pjd
1c22c1352a
Fix double free().
...
Reported by: Coverity
Coverity CID: 1130048
2013-11-25 20:45:30 +00:00
pjd
c4ff8d28a9
Bring in libnv library for managing name/value pairs. The following types
...
are currently supported:
- NV_TYPE_NULL - only name, no data;
- NV_TYPE_BOOL - boolean (true or false);
- NV_TYPE_NUMBER - 64bit unsigned integer;
- NV_TYPE_STRING - C string;
- NV_TYPE_NVLIST - nested nvlist;
- NV_TYPE_DESCRIPTOR - file descriptor;
- NV_TYPE_BINARY - binary data.
For detailed documentation and examples see nv(3) manual page.
Sponsored by: The FreeBSD Foundation
2013-11-12 19:39:14 +00:00