summaryrefslogtreecommitdiffstats
path: root/lib/route/route.c
Commit message (Collapse)AuthorAgeFilesLines
* Add internal wait_for_ack() which only waits for ACK if !NL_NO_AUTO_ACKThomas Graf2008-10-201-2/+2
| | | | | This changeset ensures that internal code properly synchronizes to ACKs if ACKs are enabled and otherwise return immediately.
* Allow parser callbacks to return NL_OK, NL_SKIP, NL_EXITThomas Graf2008-05-151-5/+1
| | | | Obsoletes internal P_ACCEPT/P_IGNORE
* Rename struct nl_handle to struct nl_sockThomas Graf2008-05-151-12/+10
| | | | | | | | The idea of a common handle is long revised and only misleading, nl_handle really represents a socket with some additional action handlers assigned to it. Alias for nl_handle is kept for backwards compatibility.
* Thread-safe error handlingThomas Graf2008-05-141-28/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* Route cache supportThomas Graf2008-05-051-2/+15
| | | | | | This changesets adds the possibility to fill a nl_cache with the contents of the route cache. It also adds the possibility to limit route caches to certain address families.
* Big routing code rework (API/ABI BREAK!)Thomas Graf2008-04-291-265/+9
| | | | | | | | | | 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.
* Represent default route with destination address length zeroThomas Graf2007-12-191-6/+9
| | | | | | | | | | So far the destination address for default routes was NULL which complicated the handling of routes in general. By assigning a address of length zero they can be compared to each other. This allows the cache manager to properly handle default routes.
* Fix memory leak when parsing netlink messages into cachesThomas Graf2007-12-171-3/+4
| | | | The reference created by the parsers was never given back.
* Export interface to define cachesThomas Graf2007-09-171-2/+1
| | | | | | | | | | This interface was internal so far which required all code defining caches to be compiled with the sources available. In order to simplify the interface, the co_msg_parser prototype was changed to take the struct nl_parser_param directly instead of a void *. It used to be void * because the co_msg_parser was directly passed as the NL_CB_VALID callback function.
* Initial importThomas Graf2007-09-151-0/+444