dect
/
libnl
Archived
13
0
Fork 0
Commit Graph

17 Commits

Author SHA1 Message Date
Thomas Graf 9680f910f4 Move private header files to <netlink-private/*>
This clarifies the seperation between public and private
header files.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2013-01-24 13:51:24 +01:00
Thomas Graf de213328f8 cache: Take cache_ops lock when modifying cache ops flags
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-12-27 13:19:04 +01:00
Thomas Graf 00132b4696 cache: provide safe variant of nl_cache_mngt_require() and use it
This makes runtime removal of cache operations possible if non-safe
API is not in use by application. The non-safe API will be removed
in the next major version.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-11-16 01:11:55 +01:00
Thomas Graf 23c4ef67c7 Use NL_DBG() instead of printing warnings and errors to stderr
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-11-16 00:42:34 +01:00
Thomas Graf 235aa7ff17 cache: hold a reference to the cache ops while a cache is provided over it
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-11-16 00:29:58 +01:00
Thomas Graf 2b3912a320 cache: Provide safe versions of nl_cache_ops_associate() and nl_cache_ops_lookup()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-11-16 00:19:38 +01:00
Thomas Graf 1a2c3e36a8 cache: Add reference counter to cache operations
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-11-16 00:17:50 +01:00
Thomas Graf f5af5c5ecd cache: rwlock accesses to cache operations
Puts an rwlock around 'cache_ops'.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-11-15 21:42:02 +01:00
Thomas Graf 3ed1f9ab5f cache: Hold cache reference while a cache is being provided
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-11-15 20:49:33 +01:00
Thomas Graf 8ffa257bfa cache: Move nl_cache_ops_set_flags() to cache_mngt.c
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-11-12 22:07:39 +01:00
Thomas Graf fec10a2823 doc: documentation restructuring
- changes the modules hierarchy to better represent the set of libaries
- list the header file that needs to be included
- remove examples/doc from api ref that is included in the guide
- add references to the guide
- fix doxygen api linking for version 1.8.0
- readd doxygen mainpage to config file
- fix a couple of doxygen doc bugs
2012-05-10 12:03:59 +02:00
Thomas Graf 4cb1666fe1 Provide silent variation of nl_cache_require()
Use in addr and tc layer to avoid warnings being printed if no
cache is available.
2011-05-11 09:33:29 +02:00
Thomas Graf 6782b6f709 restructure module documentation order
split hiearchy into one top level module per library
2008-12-10 18:12:30 +01:00
Thomas Graf 8a3efffa5b 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!
2008-05-14 17:49:44 +02:00
Thomas Graf 358e44efa4 Optimize nl_cache_ops_associate by checking protocol early 2008-03-05 14:11:05 +01:00
Thomas Graf d36d396fd0 Cache message type association interface cleanups 2007-10-11 23:09:49 +02:00
Thomas Graf 44d362409d Initial import 2007-09-15 01:28:01 +02:00