path: root/lib/object.c
AgeCommit message (Collapse)AuthorFilesLines
2010-04-19Fix rule attribute comparisonPatrick McHardy1-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 <>
2009-07-20nl_object_clone: properly clone ce_mask fieldAlexander Sack1-0/+1
based on my finding, ce_mask needs to be identical on clones; otherwise some functions (like "dump") will treat clones differently.
2009-04-16nl_object_priv() is inline, so define it in the headerPavel Roskin1-5/+0
2008-05-14Thread-safe error handlingThomas Graf1-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!
2008-04-29Big routing code rework (API/ABI BREAK!)Thomas Graf1-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.
2007-09-15Initial importaosp-new/nougat-mr1-arcThomas Graf1-0/+386