summaryrefslogtreecommitdiffstats
path: root/lib/object.c
Commit message (Collapse)AuthorAgeFilesLines
* Provide nl_object_dump_buf() to easily dump to buffersThomas Graf2011-04-101-0/+10
|
* Documentation updatesThomas Graf2011-03-211-2/+4
| | | | Mostly killing doxygen warnings, some doc updates to caching
* Fix rule attribute comparisonPatrick McHardy2010-04-191-0/+2
| | | | | | | | | | | | Rules don't have unique identifiers, so all attributes are compared by initializing the ID mask to ~0. This doesn't work however since nl_object_identical verifies whether the ID attributes are actually present before comparing the objects, which is never the case. Work around by using the intersection of present attributes when comparing two rule objects. Signed-off-by: Patrick McHardy <kaber@trash.net>
* nl_object_clone: properly clone ce_mask fieldAlexander Sack2009-07-201-0/+1
| | | | | based on my finding, ce_mask needs to be identical on clones; otherwise some functions (like "dump") will treat clones differently.
* nl_object_priv() is inline, so define it in the headerPavel Roskin2009-04-161-5/+0
|
* Thread-safe error handlingThomas Graf2008-05-141-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* Big routing code rework (API/ABI BREAK!)Thomas Graf2008-04-291-1/+1
| | | | | | | | | | Adds all missing routing attributes and brings the routing related code to a working state. In the process the API was broken several times with the justification that nobody is using this code yet. The changes include new example code which is also a prototype for how plain CLI tools could look like to control routes.
* Initial importThomas Graf2007-09-141-0/+386