summaryrefslogtreecommitdiffstats
path: root/lib/cache_mngt.c
Commit message (Collapse)AuthorAgeFilesLines
* cache: assert in nl_cache_mngt_register() for valid oo_keygen() functionThomas Haller2014-11-251-0/+3
| | | | | | | | | oo_keygen() requires oo_compare(). Assert in nl_cache_mngt_register(). http://lists.infradead.org/pipermail/libnl/2014-November/001759.html Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* cache_mngt: Make __nl_cache_ops_lookup() static, it was never declaredThomas Graf2014-07-271-1/+1
| | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* Move private header files to <netlink-private/*>Thomas Graf2013-01-241-1/+1
| | | | | | | This clarifies the seperation between public and private header files. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: Take cache_ops lock when modifying cache ops flagsThomas Graf2012-12-271-0/+2
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: provide safe variant of nl_cache_mngt_require() and use itThomas Graf2012-11-161-6/+26
| | | | | | | | 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>
* Use NL_DBG() instead of printing warnings and errors to stderrThomas Graf2012-11-151-4/+4
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: hold a reference to the cache ops while a cache is provided over itThomas Graf2012-11-151-4/+16
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: Provide safe versions of nl_cache_ops_associate() and ↵Thomas Graf2012-11-151-18/+76
| | | | | | nl_cache_ops_lookup() Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: Add reference counter to cache operationsThomas Graf2012-11-151-3/+29
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: rwlock accesses to cache operationsThomas Graf2012-11-151-8/+46
| | | | | | Puts an rwlock around 'cache_ops'. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: Hold cache reference while a cache is being providedThomas Graf2012-11-151-2/+6
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* cache: Move nl_cache_ops_set_flags() to cache_mngt.cThomas Graf2012-11-121-0/+13
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* doc: documentation restructuringThomas Graf2012-05-101-2/+12
| | | | | | | | | | - 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
* Provide silent variation of nl_cache_require()Thomas Graf2011-05-111-7/+14
| | | | | Use in addr and tc layer to avoid warnings being printed if no cache is available.
* restructure module documentation orderThomas Graf2008-12-101-0/+1
| | | | split hiearchy into one top level module per library
* Thread-safe error handlingThomas Graf2008-05-141-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* Optimize nl_cache_ops_associate by checking protocol earlyThomas Graf2008-03-051-3/+6
|
* Cache message type association interface cleanupsThomas Graf2007-10-111-58/+40
|
* Initial importThomas Graf2007-09-141-0/+266