History log of /external/libnl/lib/msg.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1ed227d3a9684e84b1c19e083850d5f10e94348b 26-Aug-2009 Marc de Kruijf <mdekruijf@gmail.com> Patch for unexpectedly aligned messages

I found the following bug, where nlmsg_ok() in lib/msg.c would
incorrectly return 'true' when the input argument 'remaining' was a negative
number. This happens when the message is not aligned the way that libnl
expects (although it is still legal).

In the comparison of the signed and unsigned numbers on line 284, the signed
number gets converted to an unsigned number, which is unexpected and
naturally produces a bug. My patch is below. The cast is ugly, but it
fixes the problem.
/external/libnl/lib/msg.c
6782b6f709d03877a5661a4c8d8f8bd1b461f43f 10-Dec-2008 Thomas Graf <tgr@plip.localdomain> restructure module documentation order

split hiearchy into one top level module per library
/external/libnl/lib/msg.c
23ee46ef7115c2e311c36e43a833e6c3deada18a 14-Oct-2008 Thomas Graf <tgr@plip.localdomain> Replace NL_KEEP code with proper message reference counting

Adds reference counting to netlink messages so callbacks
can hold on to a message without using the broken keep
message flag.
/external/libnl/lib/msg.c
8a3efffa5b3fde252675239914118664d36a2c24 14-May-2008 Thomas Graf <tgr@lsx.localdomain> Thread-safe error handling

In order for the interface to become more thread safe, the error
handling was revised to no longer depend on a static errno and
error string buffer.

This patch converts all error paths to return a libnl specific
error code which can be translated to a error message using
nl_geterror(int error). The functions nl_error() and
nl_get_errno() are therefore obsolete.

This change required various sets of function prototypes to be
changed in order to return an error code, the most prominent
are:

struct nl_cache *foo_alloc_cache(...);
changed to:
int foo_alloc_cache(..., struct nl_cache **);

struct nl_msg *foo_build_request(...);
changed to:
int foo_build_request(..., struct nl_msg **);

struct foo *foo_parse(...);
changed to:
int foo_parse(..., struct foo **);

This pretty much only leaves trivial allocation functions to
still return a pointer object which can still return NULL to
signal out of memory.

This change is a serious API and ABI breaker, sorry!
/external/libnl/lib/msg.c
b7c5bf98c4079304f78242d8b3c65451efc12b77 07-May-2008 Thomas Graf <tgr@lsx.localdomain> Improve performance by using malloc() over calloc() in critical places

As pointed out by Regis Hanna, a considerable performance gain can be
achieved by using malloc() over calloc() when allocating netlink message
buffers. This is likely due to the fact that we use a complete page for
each message.
/external/libnl/lib/msg.c
75a26f3fc5a306e39f5244ee24e69936c4b5146d 14-Jan-2008 Thomas Graf <tgr@deb.localdomain> Improve message/attribute construction documentation and add nlmsg_expand()
/external/libnl/lib/msg.c
6de17f3308cfd53ad922d144a1b28ddd962d6678 14-Jan-2008 Thomas Graf <tgr@deb.localdomain> Fix stale data pointers when constructing messages

Patrick McHardy reported a problem where pointers to the
payload of a netlink message as returned by f.e. the
nesting helpers become stale when the payload data
chunk is reallocated.

In order to avoid further problems, the payload chunk is
no longer extended on the fly. Instead the allocation is
made during netlink message object allocation time with
a default size of a page which should be fine for the
majority of all users. Additionally the functions
nlmsg_alloc_size() and nlmsg_set_default_size() have been
added to allocate messages of a particular length and to
modify the default message size.
/external/libnl/lib/msg.c
c8a0a5cdfba51f7de5d203aa13a97377b215515a 10-Jan-2008 Thomas Graf <tgr@deb.localdomain> Added additional parsing and validation functions for generic netlink

Also adds better example documentation for generic netlink
/external/libnl/lib/msg.c
3f0f32bf79612931c37505862fd330bc79758432 17-Dec-2007 Thomas Graf <tgr@deb.localdomain> Fix nl_msg_parse() to not give back a reference it does not own
/external/libnl/lib/msg.c
936c9844b0ff4aab06301f18fe31e08b1818d0a2 13-Dec-2007 Patrick McHardy <kaber@trash.net> [LIBNL]: Fix format strings

Use %td for ptrdiff_t and %zu for size_t.

Signed-off-by: Patrick McHardy <kaber@trash.net>
/external/libnl/lib/msg.c
d36d396fd0ae94aa2269546a02b5973b4ec27775 11-Oct-2007 Thomas Graf <tgraf@suug.ch> Cache message type association interface cleanups
/external/libnl/lib/msg.c
44d362409d5469aed47d19e7908d19bd194493a4 15-Sep-2007 Thomas Graf <tgraf@suug.ch> Initial import
/external/libnl/lib/msg.c